Hello all,
Can anyone help me in understanding how we can extract urls of image and videos from specificed twitter page.
At present I am having free sandbox subscription plan ,Could you please let me know will it work in free sandbox to extract all urls or do I need to get paid Premium plan for my requirement.
Thanks,
Anush Nayak
It depends on how far back in time you want to go: premium charges per call to the API so it depends on how many calls it will take to retrieve all the results, which will vary.
To extract media urls from a specific user, you can search for from:screen_name has:media in premium or in standard REST search https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets use from:screen_name filter:media, or use https://developer.twitter.com/en/docs/tweets/timelines/api-reference/get-statuses-user_timeline (which will get the last 3200 or so tweets, it’s a different API to Premium - and it’s much more permissive)
have a look at https://developer.twitter.com/en/docs/tweets/tweet-updates too to make sure you’re looking in the right place in the json.
1 Like
Thank you so much @IgorBrigadir for the help,
Actually my requirement is to get all video and image urls from specific twitter page(not user) for specific keyword. Example : Need to extract all video and image urls related to keyword “twitter” for past 4 hours or one day from one of the twitter page along with who posted and at what time.
I found sandbox has length limitation per API call. Meaning are we able to get all past 4 hours video url, Content message of it, who posted, date and time of it.?
Can we achieve this one using Sandbox subscription?
Thanks,
Anush Nayak
What do you mean by “specific Twitter page” - we would usually understand this to be a Twitter user profile page, maybe we are confused here?
Can you provide a more clear example of what you are trying to do?
The free sandbox (with a monthly quota of calls) only applies to 30-day and full-archive searches (and the Account Activity API). If you’re not planning to use any of those APIs, then you should consider the suggestions from @IgorBrigadir which are in the standard 1.1 API.
1 Like
Hello @andypiper,
Thanks for the response,
Example: I need to extract all video and image urls from “Twitter india” page( This is the website of it : https://twitter.com/twitterindia ) which contains the keyword as “twitter”
Basically we need to get all video and image urls from “Twitter india” page which are related to keyword called “twitter” for last 4 hours. So that we can run this API for every 4 hour and we get latest video and images urls related to the keyword given.
Lets say particular video or image was posted by someone in "twitter india " page but it does not contain keyword as “twitter” in the message, then API should not pick it up and search for other messages for last 4 hours until it finds some results.
Kindly let me know for further details.
Thanks,
Anush Nayak
Ok, so that “page” is a user profile, so Igor’s suggestions would work. Search for Tweets posted by that account with media (on standard search for 7 days of history), or check the timeline for that account for Tweets with media.
You should ensure that you understand the Twitter Developer Policy in relation to storage of Twitter data and your obligations to delete stored content that is deleted from the service.
1 Like
Sure @andypiper,
Thanks for the support
will try this.
Thanks,
Anush Nayak
system
closed
#8
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.