Instagram Cities in a country API
List the cities of a country in the Instagram places directory, from a two-letter country_code such as US: city_id, name, slug and url, for $0.56 per 1,000 calls.
city_idfeedscity_locations- Upper or lower case both work
- Failed calls and empty results are not charged
API health
- 24h health
- Normal
- Healthy / normal
- Available
- Limited
- Mostly down
Last 24 hours
Last 30 days
1Request
POST /api/v1/social { "platform": "instagram", "action": "location_cities", "params": { "country_code": "US" } }2JSON response
{ "results": [ { "rank": 1, "city_id": "c2753900", "name": "Downtown-PennQuarter-Chinatown", "slug": "downtown-pennquarter-chinatown-united-states" }, … ], "count": 96 }3Rows
rank city_id name slug 1 c2753900 Downtown-PennQuarter-Chinatown downtown-pennquarter-chinatown-united-states 2 c2728343 CivicCenter civiccenter-united-states 4CSV
instagram-location_cities-sample.csv rank,city_id,name,slug,url,country_code,country_name,platform
country_code goes in. One response returns a page of that country's cities from the places directory, each row with city_id, name and slug. These become table rows and a CSV file.What data you get
The table shows rows from a real call for country code US, captured November 21, 2026 at 07:18 (UTC), that returned 96 rows. Your own calls return these fields as listed in the field reference.
| rank | city_id | name | slug | url | country_code | country_name | platform |
|---|---|---|---|---|---|---|---|
1 | c2753900 | Downtown-PennQuarter-Chinatown | downtown-pennquarter-chinatown-united-states | https://www.instagram.com/explore/locations/c2753900/downtown-pennquarter-chinatown-united-states/ | US | United States | |
2 | c2728343 | CivicCenter | civiccenter-united-states | https://www.instagram.com/explore/locations/c2728343/civiccenter-united-states/ | US | United States |
Use cases
List the cities of a country
Give one
country_codeand read the cities under that country in the places directory.Go on to the places
Pass
city_idtocity_locationsto list the places in a city.Match the directory pages
Use
slugandurlto match the pages in the Instagram places directory.Go country by country
Change
country_codeand list the cities one country at a time.
Instagram Graph API vs EveryInfra
Here is how the official Instagram Graph API and EveryInfra location_cities compare on platform scope and on access review.
| Compared | Instagram Graph API | EveryInfra |
|---|---|---|
| Platform scope | "The Instagram Platform is a collection of APIs that allows your app to access data for Instagram professional accounts, including business and creator accounts." | It reads the cities in the Instagram places directory, which is not the data of any professional account. You do not need to connect an Instagram account to your app first. |
| Access review | "Advanced Access is the access level required if your app serves Instagram professional accounts that you don’t own or manage" and "This access level requires App Review and Business Verification." | You send one EveryInfra API key in the Authorization: Bearer header. You do not submit a Meta app review and do not log in to Instagram. |
Quotes are from Meta's developer documentation, checked 2026-11-22. This table compares access conditions only. Official sources: Instagram Platform overview (updated 2026-10-29)
Limits and gotchas
country_codeis required: two letters (ISO 3166-1), such asUS,JPorGB, in upper or lower case.- The result is the cities under that country in the Instagram places directory. A country that is not in the directory returns an empty result and is not charged.
- One call returns one page. If the response has
next_page_token, send it back unchanged aspage_tokenand keep the other parameters the same. The token is valid for 24 hours, and each page counts as one call. With nonext_page_token, you cannot page further. - The last page can be short.
country_nameis the English name of the country, such as United States.city_idiscplus digits, such asc2728325. Pass it tocity_locations.
Pricing
You pay $0.000556 per call, not per row. Each page counts as one call. Failed calls and empty results are not charged.
| Calls | Cost |
|---|---|
| 10,000 | $5.56 |
| 100,000 | $55.56 |
| 1,000,000 | $555.56 |
Totals use the list price per call.
Code samples
#curl -X POST 'https://api.everyinfra.com/api/v1/social' \
-H "Authorization: Bearer $EVERYINFRA_API_KEY" \
-H 'Content-Type: application/json' \
--data-raw '{
"platform": "instagram",
"action": "location_cities",
"params": {
"country_code": "US"
}
}'OpenAPI definition (JSON)Samples read the key from the EVERYINFRA_API_KEY environment variable; copied code never contains your key.
API reference
See the parameters, response fields, errors and billing for location_cities, and copy the page or open it as Markdown for an AI assistant.
AI prompt
#Please help me write a data collection script with the EveryInfra Instagram Cities in a country endpoint (instagram/location_cities).
How the endpoint works:
- Request: POST https://api.everyinfra.com/api/v1/social with the header Authorization: Bearer <API key>. Read the key from the EVERYINFRA_API_KEY environment variable and never hard-code it.
- In the request body, set platform to instagram and action to location_cities, and put the parameters inside params.
- Required parameters:
- country_code: A two-letter country code (ISO 3166-1), such as US, JP or GB; any letter case works.
- Optional parameters:
- page_token: Page token for location_cities. Leave it out for the first page, then pass back the previous response's next_page_token exactly as received, keeping the other inputs unchanged.
- Returns a list of records. Main fields of each record: rank (Position from 1: the order of this row…), city_id (City ID, c followed by digits, such as…), name, slug (The name part of the Instagram location…), url, country_code (Two-letter country code (ISO 3166-1), s…), country_name (Country name in English, such as United…).
- Example request body:
{
"platform": "instagram",
"action": "location_cities",
"params": {
"country_code": "US"
}
}
- Price: $0.56 per 1,000 requests; failed and empty results are not charged.
- For dozens or hundreds of targets, add "mode": "async" to the body: you get a job_id at once and poll GET https://api.everyinfra.com/api/v1/jobs/{job_id} for the result.
- On 422, fix the request using the suggested parameter names and allowed values in the error; on 429 or 503, wait for Retry-After and try again.
Before writing code, ask me which targets I need, how many, which fields, and what output format I want; then confirm the plan and the rough cost with me.Request parameters
#| Name | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
Authorization | header | string | Yes | - | Bearer followed by your API key. Create it in the console; never put it in a URL or a code repository. |
platform | body | string | Yes | instagram | Platform identifier, fixed value. |
action | body | string | Yes | location_cities | Capability identifier, fixed value. |
country_code | body.params | string | Yes | - | A two-letter country code (ISO 3166-1), such as US, JP or GB; any letter case works. |
page_token | body.params | string | No | - | Page token for location_cities. Leave it out for the first page, then pass back the previous response's next_page_token exactly as received, keeping the other inputs unchanged. Tokens last 24 hours and each page is one call; the last page has no next_page_token. |
Response example
#{ "id": "req_…", "platform": "instagram", "action": "location_cities", "results": [ { "rank": 1, "city_id": "c2753900", "name": "Downtown-PennQuarter-Chinatown", "slug": "downtown-pennquarter-chinatown-united-states", "url": "https://www.instagram.com/explore/locations/c2753900/downtown-pennquarter-chinatown-united-states/", "country_code": "US", "country_name": "United States", "platform": "instagram" }, { "rank": 2, "city_id": "c2728343", "name": "CivicCenter", "slug": "civiccenter-united-states", "url": "https://www.instagram.com/explore/locations/c2728343/civiccenter-united-states/", "country_code": "US", "country_name": "United States", "platform": "instagram" } ], "next_page_token": …, "pagination": { … }, "count": 96, "billing": { "charged": …, "charged_usd": …, "balance_after_usd": …, … }, "quota": { … }}
Response fields
#Business data is in results. The table lists the fields a record can contain; values the platform does not show are never made up.
| Field | Meaning |
|---|---|
rank | Position from 1: the order of this row within this result. user_search: first the accounts returned by Instagram's search box (matched_by is search_box), in the search box's order; then the authors of posts found with this keyword, added to fill up the count (matched_by is post_author); results without matched_by carry the position at which Instagram ranks the account for this keyword. similar_profiles: the account's place among the similar accounts, ordered by followers. likers: the account's place in the list of likers. |
city_id | City ID, c followed by digits, such as c2728325. Pass it to city_locations. |
name | Name of the object itself, for account, product and business capabilities. |
slug | The name part of the Instagram location directory link, such as st-patricks-cathedral. |
url | Link to the record on the platform. |
country_code | Two-letter country code (ISO 3166-1), such as US. |
country_name | Country name in English, such as United States. |
platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |
Errors and billing
#- 401
- Missing or invalid key.
- 402
- Insufficient balance. Top up first.
- 422
- Invalid parameter name or value. Fix it using the suggestions in the error. No charge.
- 429
- Per-minute request limit reached. Wait for Retry-After, then try again.
- 503
- Could not complete. The held charge is returned to your balance. If the outcome is unknown, verify it before you retry.
- 200 empty
- No data. No charge.
FAQ
What does the Instagram cities-in-a-country API return?
Each row is one city: city_id, name, slug, url, country_code and country_name, plus rank.
How do I write country_code?
Use a two-letter country code (ISO 3166-1), such as US, JP or GB, in upper or lower case.
How do I get the next page?
When the response has next_page_token, send it back unchanged as page_token and keep the other parameters the same. With no next_page_token, you cannot page further.
How much does one page cost?
It costs $0.000556 per call, or $0.56 per 1,000 calls. Each page counts as one call, not each row. Failed calls and empty results are not charged.
Do I need an Instagram login?
No. You send one EveryInfra API key in the Authorization: Bearer header, and the request carries only country_code. No Instagram login or access token is needed.
Related Instagram endpoints
You can call the other Instagram endpoints with the same key, such as city_locations to list the places in one city.
- Post details
post$0.56 per 1,000 callsFetch one or more Instagram posts or Reels from the links inurls. - Details
profile$0.56 per 1,000 callsLook up an Instagram account by handle or profile URL. - Account insights
persona$0.56 per 1,000 callsGet an account overview for an Instagram handle, built from its public profile. - Posts by user
user_posts$0.56 per 1,000 callsList posts from an Instagram account byusername, each with caption, media type, likes, comments, views, location, hashtags and top comments. - Content discovery
discover$0.56 per 1,000 callsTrack posts under an Instagram hashtag passed inkeyword. - Comments
comments$0.79 per 1,000 callsRead comments on one Instagram post or Reel aturl. - Reels
reels$1.19 per 1,000 callsPull an Instagram account's Reels byusername, with caption, play count, duration in seconds, likes, comments, hashtags, music and video link. - Hashtag
hashtag$0.56 per 1,000 callsCollect posts for an Instagram hashtag inhashtag, without the # sign. - Followers
followers$0.56 per 1,000 callsSee the follower and following counts of an Instagram account byusername. - Follower list
followers_list$0.56 per 1,000 callsList the accounts that follow an Instagram user, byusername, with handle, name, avatar, private and verified flags and relation type. - Following list
following_list$0.56 per 1,000 callsList the accounts an Instagram user follows, byusername, with handle, name, avatar, private and verified flags and relation type. - Account search
user_search$4.81 per 1,000 callsSearch Instagram accounts bykeyword, in the order Instagram search ranks them for that word. - Reels search
reels_search$7.19 per 1,000 callsSearch Instagram Reels bykeyword, such as coffee. - Similar accounts
similar_profiles$8.81 per 1,000 callsFind accounts Instagram suggests as similar to one account, byusernamesuch as nasa. - Tagged posts
tagged_posts$7.44 per 1,000 callsList public posts by other accounts that tag one Instagram account, given asusername, profile URL or numeric user ID. - Stories
stories$1.5 per 1,000 callsGet the stories an Instagram account has live right now, from its username. - Story highlights
highlights$1.6 per 1,000 callsList the story highlights on an Instagram profile. - Comment replies
comment_replies$0.88 per 1,000 callsRead the replies under one comment on an Instagram post or Reel, from the post link and the comment'sidreturned bycomments. - Post likers
likers$1.32 per 1,000 callsList the accounts that liked one Instagram post or Reel, from itsurl. - Posts at a location
location_posts$0.56 per 1,000 callsList the posts tagged at one Instagram location, fromlocation_id(theidin a post'slocation_detail, or a location page link). - Reels using a music track
audio_posts$0.56 per 1,000 callsList the Instagram Reels that use one piece of music, fromaudio_id(theaudio_idin a post'smusic, or an audio page link). - Explore
explore$0.56 per 1,000 callsRead one page of the posts Instagram recommends on Explore; no input is needed. - Engagement statistics
engagement$0.56 per 1,000 callsWork out an Instagram account's engagement from its latest posts, byusername. - Profile by numeric ID
profile_by_id$0.56 per 1,000 callsLook up an Instagram account from its numericuser_id. - About this account
user_about$0.56 per 1,000 callsRead the About this account panel of an Instagram profile byusername: the month it joined (joined_at), itscountry, how many times it changed its username (former_usernames_count) and when it was verified. - Location details
location_info$0.56 per 1,000 callsRead one Instagram location from itslocation_id: name, category, coordinates (lat,lng), address details when listed, andpost_count. - Link recognition
resolve_links$0.56 per 1,000 callsConvert one Instagram post reference intext(a post link, a shortcode or a numeric post ID) into all three:shortcode,media_idandurl. - Post embed code
oembed$0.56 per 1,000 callsGet the oEmbed data and embed code for one Instagram post or Reel from itsurl: the same fields as Instagram's official oEmbed, withhtmlready to paste into a web page. - Post caption translation
post_translation$6.39 per 1,000 callsTranslate the caption of one Instagram post intotarget_language(defaulten), from itsurlormedia_id. - Nearby locations
location_nearby$0.56 per 1,000 callsList the locations Instagram shows near one location, from itslocation_id: about 20 rows in one call, no next page. - Hashtag search
hashtag_search$0.56 per 1,000 callsFind Instagram hashtags for akeyword: the hashtags Instagram's search box suggests, withpost_countfor each. - Stories in a highlight
highlight_stories$0.56 per 1,000 callsRead every story in one Instagram highlight fromhighlight_id(theidfromhighlights, or a highlight link): up to 100 stories in one call, with media links,posted_atandduration_seconds. - Comment translations
comment_translations$6.39 per 1,000 callsTranslate up to 10 comments on one Instagram post, from the posturlandcomment_ids, intotarget_language(defaulten). - Recommended Reels
recommended_reels$1.18 per 1,000 callsRead the Reels Instagram recommends on its Reels page, 10 per page; no input is needed. - User reposts
user_reposts$0.56 per 1,000 callsList the posts and Reels an Instagram account reposted to its profile, byusername, 12 per page. - Locations in a city
city_locations$0.56 per 1,000 callsList the locations Instagram's location directory has for one city, fromcity_id, 96 per page. - Profiles in bulk
profiles_batch$0.56 per 1,000 callsLook up as many as 20 Instagram accounts at once fromusernames, each given as a username such asnatgeoor a profile link.