Extract all Likes


I’m trying to use parameters which mentioned at developer.twitter.com/en/docs/tweets/get-favorites-list such as created at and since_id to get specific tweets at current time, but it seems keep gathering the same tweets every time and ignore the specific time that i wrote…
Just in case these are the methods that I used:

api.favorites(screen_name = USERNAME,count=200,max_id=‘XXX’,created at=2015,since_id=‘XXX’)

for status in tweepy.Cursor(api.favorites, id=‘USERNAME’,created_at=‘2012’).items(20000):


Hi @Arwa - created_at is not a parameter that you can pass here, but an attribute that will be returned in the response payload.

As mentioned in the documentation, the parameters that can be passed are:

  1. user_id (optional)
  2. screen_name (optional)
  3. count (optional)
  4. since_id (optional)
  5. max_id (optional)
  6. include_entities (optional)

I suggest you try again, but remove created at=2015 and created_at='2012'

Also note that the since_id and max_id parameters require Tweet IDs (not dates).


Hi Aurelia,

Thank you for your response…

I have tried what you mentioned here, but still get tweets outside date range…

yes, maybe I did not clarify what I faced here, the issue here same as above, I know the value should be string of numbers,
I took since_id and max_id to make tweets show between these two ids; to bring me new tweets every time, but it is not working, still bring same tweets.

Thank you in advance…


Hi @Arwa - Have you tried running your query with Insomnia or Postman?

I can get it to work with Insomnia by passing specific parameters in the Query section (see example screenshot below).

This would suggest that it is your code, and not the API itself, that is causing the Tweets returned to be outside of the specified range.


I have not before your suggestion,
when i tried, still got the same old values


this is from preview section


Again, created_at is not a valid query parameter on this endpoint, so this will never work. It also looks like you have a typo on count in this screenshot.


I want to make sure of understanding your point,

is a valid query parameter on one of theses endpoint ?

  • Premium APIs
  • Enterprise APIs
  • Ads APIs
  • Twitter for websites
    except Standard APIs?

Thank you…


No. created_at is not a valid query parameter on premium search, nor can it be used with Enterprise PowerTrack. It is a value returned inside every Tweet JSON object, but cannot be passed to the API as a search query. You’d need to use something like the fromDate and toDate parameters (outside of the query rule) to specify a date range to fetch Tweet results from.

You can read more under Integrating Premium search (same parameters work for Enterprise).

Twitter for Websites embed widgets do not support search.

closed #9

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.