Jump to content
GK Dude

Instagram Search Query

Recommended Posts

Can anyone figure out what Instagram's search query is?

 

I'm trying to create a Custom Search for Instagram.

 

Unlike Twitter (and so many other websites) which uses a "XYZ.com/search?q=" format, Instagram delivers search results in a drop down box (without changing/showing the search query URL). Maybe for that reason it's not possible. But I thought I'd ask.

Thanks, GK Dude

Share this post


Link to post

@GK Dude It's something I've played with on many occasions, but Instagram make it intentionally hard/impossible to search or index, to ensure that everyone uses their mobile app (even the desktop site has limited functionality) so this may not be possible. 

Share this post


Link to post

From my limited testing, it’s not possible to add their search to Alfred as a search query, because when you search you don’t get a page — it all happens in the search box — so there’d be nowhere to go. But it is possible to do something better: have the search right within Alfred, like so:

SgFPDfc.png

At the top is the account name and at the bottom is the username. By actioning a result, we’re taken to the account’s page. There’s also extra information we can add:

"pk": "242010666",
"username": "alfred",
"full_name": "Alfred",
"is_private": false,
"profile_pic_url": "https://instagram.flis8-2.fna.fbcdn.net/vp/6c83fb2f60b946c2b6e612c8a7cb4ba7/5CD1747B/t51.2885-19/s150x150/40622263_464380584049499_8502299894608822272_n.jpg?_nc_ht=instagram.flis8-2.fna.fbcdn.net",
"profile_pic_id": "1871182137883861073_242010666",
"is_verified": true,
"has_anonymous_profile_picture": false,
"follower_count": 118563,
"reel_auto_archive": "on",
"byline": "118k followers",
"mutual_followers_count": 0,
"following": false,
"outgoing_request": false

Any of that can be included in the result. We can even add the profile picture to the results, but as you can expect that will slow down getting the list. I haven’t tested how much it slows it down, but it will definitely be noticeable.

 

You can get that trial Workflow here. Currently it only returns users, but it can be changed to return hashtags as well. I won’t use this, so you tell me how you want it to work. You might notice I’m not using my usual more permanent storage solution, instead opting for the fickle 15-days-only option. That is because I haven’t yet decided if it’s a good idea to make/share this.

 

Instagram’s search on the web works like this:

  1. You type your query.
  2. They send a request to a specific address, with your query.
  3. A JSON is returned.
  4. They parse it and present the results.

The workflow is essentially requesting the JSON directly and formatting it to fit Alfred’s Script Filter. In theory the Workflow is (slightly) better for Instagram because you’re making fewer network requests. In practice, as a company they might not like that, which is what makes me reticent of making this into a full-fledged Workflow for wider sharing. But they probably won’t mind if it’s a couple of people using it, as it’s going to be a drop in the bucket.

 

So let me know if this is helpful and what changes you’d like to see.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×