Oembed tweet rate limit


#1

Hello,

I develop an application where I need a lot of tweets to be embeded. I know there is a user-limit of 180 requests per 15 minutes.
I want to have embeded 10 tweets per page but the total embeded tweets of my site may be thousand.
So if a user hits more than 18 different pages on 15 minutes than he hits the rate limit.
My question is:
Is it allowed to make a direct call to https://platform.twitter.com/widgets.js and call

for these requestes instead of using the twitter api statuses/oembed?
Is it rate limited?

Thanks a lot for your answer.


#2

@koutourou

The preferred way to embed tweets (and timelines) is to user Twitter’s Embedded Tweets feature. See: https://dev.twitter.com/docs/embedded-tweets.

These embedded tweets can be embedded across a variety of pages without fear of hitting any rate limits.

Cheers,

Vince


#3

Dear @vincentchu,

thanks a lot for your quick reply. The problem is that I embed the tweets dynamically and not statically, so I could just copy-paste the code from the embedded tweet. I store the tweets number on a database and then I call

with the link of each tweet. I think this is acceptable, right?

#4

Hi!

You should find that you’re able to fetch as many embed codes as you need from the unauthenticated OEmbed endpoint. Rate limits are not applied to this endpoint in the same way as for API v1.1.

Ben


#5

thank you very much @benward.


#6

Ben, you say the unauthenticated OEmbed endpoint is NOT rate limited?

However, right on the bottom of the page you linked:
https://dev.twitter.com/docs/embedded-tweets

It says:
Cache the oEmbed response on your server. The oEmbed endpoint is rate-limited, so make sure you are not fetching it for every pageview you render.


#7

Thanks for pointing out that outdated documentation. I’ve updated it. You should still use a cached OEmbed response.