Fullstack developer with a keen eye for design, and lots of experience integrating 3rd-party APIs to create interactive bots, automations and admin dashboards.
The google advanced search query that has consistently returned the official Twitter handle of a URL is: site:twitter.com -inurl:status {URL} e.g. site:twitter.com -inurl:status timewise.how returns a link to the profile of @adityarao310
as the first search result.
Since you want to get this programmatically, you need to create a Google custom search engine (CSE) (see here: developers.google.com/custom-searc...) and make an API call (see here: developers.google.com/custom-searc...) to your CSE, then pick out the first item from the response in your API call (using the first item in the response might not always be accurate, but it seems to be your best bet)
A list of fields in the first item in the response from the custom search API for when I tried this with your sample URL included
snippet: "500+ signups at timewise.how/ & timespent.co/ ❌ One fail (habit tracker for chronic patients) ✅ Learned to code Ugh. Not good enough ...",
htmlSnippet: "500+ signups at www.timewise.how/ & timespent.co/ ❌ One fail (habit tracker for chronic patients) ✅ Learned to code Ugh. Not good enough ...",
Fullstack developer with a keen eye for design, and lots of experience integrating 3rd-party APIs to create interactive bots, automations and admin dashboards.
According to this article searchenginepeople.com/blog/twitte..., your best bet is to use a Google advanced search query.
The google advanced search query that has consistently returned the official Twitter handle of a URL is:
site:twitter.com -inurl:status {URL}
e.g.site:twitter.com -inurl:status timewise.how
returns a link to the profile of @adityarao310 as the first search result.Since you want to get this programmatically, you need to create a Google custom search engine (CSE) (see here: developers.google.com/custom-searc...) and make an API call (see here: developers.google.com/custom-searc...) to your CSE, then pick out the first item from the response in your API call (using the first item in the response might not always be accurate, but it seems to be your best bet)
A list of fields in the first item in the response from the custom search API for when I tried this with your sample URL included
Good luck!
This is freaking fab and exactly what I was looking for! Solved my problem completely
Thanks a lot for taking out the time to do this
You're very welcome!!