Oembed. Rate Limited



I am using Twitter Oembed API from the server side. Their docs https://dev.twitter.com/rest/reference/get/statuses/oembed specify that there isn’t any rate limits imposed on this particular API. But I am keep getting “Rate limit exceeded” with code 88 in my requests. FYI, I cache my results. Am I missing anything?


Hi there! I’m looking into this now.

Are you calling api.twitter.com or publish.twitter.com?

I believe there could be an error in the docs - if you check the rate-limiting documentation it states that endpoints not listed in the chart default to 180 requests in a standard 15 minute window.


Hi Andy,

I believe I am calling it from api.twitter.com.
And not the publish.twitter.com using url params as stated on your docs.

Will it make a difference?



If you check the headers, you will see that on api.twitter.com, the statuses/oembed endpoint is indeed subject to the default rate limit of 180 calls in 15 minutes, e.g.

-> "x-rate-limit-limit: 180\r\n"
-> "x-rate-limit-remaining: 176\r\n"
-> "x-rate-limit-reset: 1465549655\r\n"

If you’re still using that endpoint, but want to switch over, you should note that the format of the oEmbed response from the newer publish.twitter.com oembed endpoint is different.

I’m making a note that we should clarify the documentation around this recent change to the API.


Hi Andy,

Can I find out from you what is the rate limit if its from ‘publish.twitter.com’ endpoint?
Sorry to trouble. Thanks!



I believe that if there is no explicit rate-limit specified for an endpoint, it should be the default 180 calls in 15 minutes per the rate limit documentation. I will work with the team to clarify and confirm, but you should assume that is the case otherwise.