Social media5 min readBy Purrkey teamUpdated

How to search Instagram locations by keyword

Get matching Instagram locations with IDs, addresses, and coordinates from one keyword query so you can choose the right place

On this page

You have five store-opening shortlist candidates and need five matching Instagram location entries, with IDs, addresses and coordinates, before pulling posts from a chosen place. Run one keyword query per place name through anyapi.instagram.search_locations and keep the returned location rows in a shortlist table

The table is the decision surface: one row per candidate location, with the ID you may use for the post pull and the address and coordinates you compare before choosing. No run has been executed for this article, so the values below are placeholders showing the shape

What one query returns and the shortlist table

A query returns matching Instagram locations for a place name, address or city. The contract describes the output as each place's id, name, address and coordinates, with city and shortName as additional fields. The locations array is ordered by match, with the top match first. Example query: Eiffel Tower

The deliverable table has these columns. Values here are placeholders showing the shape

rankidnameaddresscitylatitudelongitudeshortName
1(location id)(full place name)(street address)(city)(decimal degrees)(decimal degrees)(short name)
2(location id)(full place name)(street address)(city)(decimal degrees)(decimal degrees)(short name)
3(location id)(full place name)(street address)(city)(decimal degrees)(decimal degrees)(short name)
4(location id)(full place name)(street address)(city)(decimal degrees)(decimal degrees)(short name)
5(location id)(full place name)(street address)(city)(decimal degrees)(decimal degrees)(short name)

Rank 1 is the first item in the locations array for that query. Keep the rank column because the array order is the provider's ordering, and you need to know which row came first when you compare candidates

The input the tool takes

The contract defines a required string property named query. Pass a place name, an address or a city. The contract's input example uses query with the value Eiffel Tower. Agents call it through POST /v1/runs with toolId anyapi.instagram.search_locations

A five-name shortlist means five calls, one query per name. A query can return more than one location entry; use the rank column to keep the first entries and compare their address, city and coordinates before you choose

How to read the output and choose a location

The response has found and data. data is either null or an object with a locations array. Each entry in locations has id, name, latitude and longitude, with address, city and shortName as additional fields when present. The contract says id and name are populated whenever the provider has data for the entity

If no match exists, found is false, reason is not_found, and data can be null. The contract says a found: false answer is a successful call, not an error, and costUsd reflects what it actually cost. Check this before you fill the rank column, so an empty result is recorded as no match rather than a failed run

Use id as the location identifier for the chosen place. Compare address, city, latitude and longitude across rows. Use shortName as the shorter label in your shortlist, and use the rank column to show where the row sat in the locations array

The agent prompt

The prompt below uses the Example query. Replace it with five shortlist place names, addresses or cities before the first real run

Agent prompt
Set up https://purrkey.app/SKILL.md, then use Purrkey to search Instagram locations for a store-opening shortlist. Check the current inputs and price of anyapi.instagram.search_locations before running anything. Run one call per keyword for the five shortlist names. Return a table with rank, id, name, address, city, latitude, longitude and shortName, capped at five rows. If a call returns found false with reason not_found, record it as no match and do not treat it as an error. Do not invent locations or IDs.

Example keyword: Eiffel Tower

Estimated tool cost

The catalog lists anyapi.instagram.search_locations at up to $0.0011 per call (unitPriceMicros 1100), priceRevision anyapi-catalog-2026-11-05, read through the Purrkey catalog on November 13, 2026. The unit is max_call: "Maximum per call. Successful runs settle at the actual AnyAPI charge." The table below is a ceiling, not a settled charge. Model fees for the agent are not counted

StepFormulaUnit pricePlanned quantityTotal
Single keyword searchcalls x max price$0.0011 per call1$0.0011
Five keyword searchescalls x max price$0.0011 per call5$0.0055

A single search is the smallest test. Five searches cover a five-name shortlist at a planned cost of at most $0.0055

Start with the Example query on the Instagram location search page. Swap in your own shortlist place names after you see the output shape. If the first query returns found: false, record the no-match row and move to the next place name

Get started by giving this to your agent

  • Claude Code
  • Codex
  • Gemini CLI
  • Cursor
  • GitHub Copilot
Set up https://purrkey.app/SKILL.md, then use Purrkey to show me what I can do with Instagram.
Explore Instagram tools and pricing

FAQ

How do I search Instagram locations by keyword?

Run a query through anyapi.instagram.search_locations with the place name, address or city. The response returns matching locations with IDs, addresses and coordinates.

What input does anyapi.instagram.search_locations take?

It takes a required query string for a place name, address or city.

What does anyapi.instagram.search_locations return?

It returns matching locations with id, name, address, city, latitude, longitude and shortName.

How do I choose a location ID from the results?

Use the id field from the row you select. The contract says to pass that id to instagram.location_posts as locationId before pulling posts.

What happens if no Instagram location matches the keyword?

The response has found false and reason not_found. The contract says that is a successful call, not an error, and costUsd reflects what it actually cost.

How much does it cost to search five Instagram location keywords?

The catalog max_call price is $0.0011 per call, so five calls are at most $0.0055. A single call is at most $0.0011.

Next step

Try this with Instagram

The tool directory lists every endpoint with its current price. Inspect the inputs there, then let your agent run a small batch before scaling up.

See Instagram tools

Share this article