How to get the twitter share count for a specific URL?



I see API endpoint : not work anymore to get the twitter share count for a specific URL?

It would be nice to grab that number to see how popular a url is. I’m attempting to do this through PHP. Any help is appreciated?


Looks like it was closed down. Here’s an answer from Twitter.


i see, maybe any function from new api realeased can do it.
but thanks ryanwi for information.


The endpoint you were using was not a documented or supported feature.

There is no direct replacement.



I am Using Twitter search API.

endpoint :{my_encoded_shortened_url}.

When I am using twitter search tool( to search any URL, it is searching and giving me matching tweets. But when I am making api call to above enpoint with bearer token. Its not giving me any results. And I made sure that the shared tweets are not 7 days older.

I have spent 3-4 days to figure out the solution but no luck so far. Please help.



Can you provide an exact example that is not providing matching Tweets on the API?



Thank you for your reply.

I am hitting below endpoint with bearer token.

“statuses”: [],
“search_metadata”: {
“completed_in”: 0.024,
“max_id”: 958372728960008192,
“max_id_str”: “958372728960008192”,
“query”: “”,
“refresh_url”: “?since_id=958372728960008192&”,
“count”: 15,
“since_id”: 0,
“since_id_str”: “0”

And If you search from twitter search tool(, its showing the result.



This appears to be a new account, no photo, very little legitimate content, and highly unlikely to be be indexed in the standard basic search API per “relevance not completeness”.


Thanks for the reply.

Yes, its a new account but i have verified my email address and phone number. Still, it’s not indexed. At some point in last week or the week before last week it was working fine, but now it’s not.

I have applied for enterprise level access but I haven’t gotten any reply yet. Will enterprise level APIs search for all the data(both indexed and non-indexed)?


The premium and enterprise APIs work on a different index to standard search and I can confirm that the search term does return results from the premium 30-day search endpoint. The standard search index has always been optimised for recency rather than completeness and I’m unable to retrieve this particular URL Tweeted by that account from that endpoint.


Thank you so much for your support.



Is there any way in the premium APIs to find tweets with multiple URLs?
For example,, etc or something like this; where I can pass multiple URL as query parameter and get list of tweets.



Yep, it’s all based on how you create the rule:

{“query”:“ OR OR…”}
up to 256/1024 characters

More here