Donmai

How to look up for a Twitter post with only the image URL?

Posted under General

Is there a way to reverse search a Twitter image post with just the pbs.twimg.com url?

For example, I got this image url, but not the original post's url:
https://pbs.twimg.com/media/FnSVHKRaMAIUs-2.jpg:orig
I tried using google image search, to no avail. The image is still up, so the Twitter post was not deleted. I tried uploading it here, but I get no fetch source data, nor the post's url. How can I track down the Twitter post?

(Sorry for my bad English)

Updated

Unfortunately there isn't a surefire way to reverse-engineer the twitter post ID from the media link, which is part of the reason the bad link tag exists. Especially with the somewhat nonsense API restrictions under the website’s current "management" it's also difficult to index the content of the site. Not to mention that there's a possibility it's from a restricted account (see protected link), which can't be found normally unless you're following the account.

You can get decode the filename to get the date and time from it, FnSVHKRaMAIUs-2 refers to 2023-01-25T03:03:33.714 and FlmFNTqaEAIYaKW refers to 2023-01-04T02:35:05.259.
You can use Twitter search operators to look for tweets around that time, but since that is the time that the image was processed and not the time that the tweet was sent, there can be a discrepancy of several seconds, which is enough time for many thousands of tweets to get posted.
But if you know the account that posted it, like with the first example (the username is written in the image), the date should be more than enough. I've had some luck even when hunting wild tweets by guessing keywords or just brute force.

Where did you get these image URLs?

viliml said:

You can get decode the filename to get the date and time from it, FnSVHKRaMAIUs-2 refers to 2023-01-25T03:03:33.714 and FlmFNTqaEAIYaKW refers to 2023-01-04T02:35:05.259.

I'm interested in how you decode the filename to get the date and time.

Sunnily_Bright said:

I'm interested in how you decode the filename to get the date and time.

Oh, right, I forgot to explain that, tehepero☆

The fundamental format is explained here: https://en.wikipedia.org/wiki/Snowflake_ID.
Filenames differ only in that they are Base64URL-encoded and have 3 extra bytes at the end, of unknown purpose.
If you decode FnSVHKRaMAIUs-2 you get the bytes 1674951ca45a300214b3ed in base 16, and discarding the last 3 bytes you get the snowflake ID 1674951ca45a3002 in base 16 which is 1618082116381847554 in base 10, from where you proceed as explained in the Wikipedia article.

1