Location Codes
Country and city-level location codes for the SEO and SERP endpoints, and which markets have full keyword data versus search volume only.
Overview
All SEO API endpoints accept a location_code parameter to target a specific market. Pass a country code from the table below — or, on the endpoints listed under City and region targeting, a city or region code.
{
"keywords": ["react framework"],
"location_code": 2840,
"language": "en"
}If you omit location_code, the API defaults to 2840 (United States). You can also pass a location string (e.g. "us") as a fallback, but location_code is recommended for precision and full coverage.
Language
language defaults to the location's main language (for example de for Germany, en for the United States). If you pass a language an endpoint doesn't serve for that location, the request isn't rejected: it runs with the location's default language instead.
City and region targeting
Two endpoints accept city- and region-level codes in the same location_code
parameter, so you can localise below the country level:
| Endpoint | What a city code changes |
|---|---|
/v1/serp/google | Results are fetched as seen from that city — use it for local rank tracking. |
/v1/seo/keywords | Search volume, CPC and competition are for that city or region, not the country. |
# Google results as seen from New York City
curl -X POST https://api.yepapi.com/v1/serp/google \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "plumber near me", "depth": 10, "location_code": 1023191}'Find a location code
Search every supported location — about 270,000 countries, regions, cities, neighbourhoods and postal codes. Click a code to copy it.
Type at least two characters, or a country code to browse it.
"Works with" says where a code can be used: SERP for
/v1/serp/google, Search volume for
/v1/seo/keywords. Most locations support both.
The same lookup is available as a plain HTTP call, and the whole list as a file:
# Search: name and/or ISO country, optional type (City, Region, Postal Code, …)
curl "https://docs.yepapi.com/api/locations?q=austin&country=US&limit=5"
# Everything, tab-separated (2 MB gzipped): location_code, name, country, type, supports
curl -O https://docs.yepapi.com/data/locations.tsv.gz{
"ok": true,
"total": 20,
"results": [
{ "code": 1026201, "name": "Austin,Texas,United States", "country": "US", "type": "City", "serp": true, "volume": true }
]
}On /v1/serp/google you can also skip the code and pass the location's name
as location_name, or a point as coordinates.
Every other endpoint that takes location_code (keyword ideas, related
keywords, difficulty, domain and competitor analytics) works at country
level only.
Keyword data coverage
The Keyword data column says what is available for each country:
- Full (94 markets) — search volume plus keyword difficulty, search intent, keyword ideas, related keywords, and the domain and competitor endpoints.
- Volume only (121 markets) —
/v1/seo/keywordsreturns search volume, CPC and competition. Difficulty, intent, ideas, related keywords and domain analytics are not available for these markets.
SERP endpoints work in every country listed.
Supported Location Codes
| Country | ISO Code | Location Code | Keyword data |
|---|---|---|---|
| Afghanistan | AF | 2004 | Volume only |
| Albania | AL | 2008 | Full |
| Algeria | DZ | 2012 | Full |
| American Samoa | AS | 2016 | Volume only |
| Andorra | AD | 2020 | Volume only |
| Angola | AO | 2024 | Full |
| Antarctica | AQ | 2010 | Volume only |
| Antigua and Barbuda | AG | 2028 | Volume only |
| Argentina | AR | 2032 | Full |
| Armenia | AM | 2051 | Full |
| Australia | AU | 2036 | Full |
| Austria | AT | 2040 | Full |
| Azerbaijan | AZ | 2031 | Full |
| Bahrain | BH | 2048 | Full |
| Bangladesh | BD | 2050 | Full |
| Barbados | BB | 2052 | Volume only |
| Belgium | BE | 2056 | Full |
| Belize | BZ | 2084 | Volume only |
| Benin | BJ | 2204 | Volume only |
| Bhutan | BT | 2064 | Volume only |
| Bolivia | BO | 2068 | Full |
| Bosnia and Herzegovina | BA | 2070 | Full |
| Botswana | BW | 2072 | Volume only |
| Brazil | BR | 2076 | Full |
| Brunei | BN | 2096 | Volume only |
| Bulgaria | BG | 2100 | Full |
| Burkina Faso | BF | 2854 | Full |
| Burundi | BI | 2108 | Volume only |
| Cabo Verde | CV | 2132 | Volume only |
| Cambodia | KH | 2116 | Full |
| Cameroon | CM | 2120 | Full |
| Canada | CA | 2124 | Full |
| Caribbean Netherlands | BQ | 2535 | Volume only |
| Central African Republic | CF | 2140 | Volume only |
| Chad | TD | 2148 | Volume only |
| Chile | CL | 2152 | Full |
| China | CN | 2156 | Volume only |
| Christmas Island | CX | 2162 | Volume only |
| Cocos (Keeling) Islands | CC | 2166 | Volume only |
| Colombia | CO | 2170 | Full |
| Comoros | KM | 2174 | Volume only |
| Cook Islands | CK | 2184 | Volume only |
| Costa Rica | CR | 2188 | Full |
| Cote d'Ivoire | CI | 2384 | Full |
| Croatia | HR | 2191 | Full |
| Curacao | CW | 2531 | Volume only |
| Cyprus | CY | 2196 | Full |
| Czechia | CZ | 2203 | Full |
| Democratic Republic of the Congo | CD | 2180 | Volume only |
| Denmark | DK | 2208 | Full |
| Djibouti | DJ | 2262 | Volume only |
| Dominica | DM | 2212 | Volume only |
| Dominican Republic | DO | 2214 | Volume only |
| Ecuador | EC | 2218 | Full |
| Egypt | EG | 2818 | Full |
| El Salvador | SV | 2222 | Full |
| Equatorial Guinea | GQ | 2226 | Volume only |
| Eritrea | ER | 2232 | Volume only |
| Estonia | EE | 2233 | Full |
| Eswatini | SZ | 2748 | Volume only |
| Ethiopia | ET | 2231 | Volume only |
| Fiji | FJ | 2242 | Volume only |
| Finland | FI | 2246 | Full |
| France | FR | 2250 | Full |
| French Polynesia | PF | 2258 | Volume only |
| French Southern and Antarctic Lands | TF | 2260 | Volume only |
| Gabon | GA | 2266 | Volume only |
| Georgia | GE | 2268 | Volume only |
| Germany | DE | 2276 | Full |
| Ghana | GH | 2288 | Full |
| Greece | GR | 2300 | Full |
| Grenada | GD | 2308 | Volume only |
| Guam | GU | 2316 | Volume only |
| Guatemala | GT | 2320 | Full |
| Guernsey | GG | 2831 | Volume only |
| Guinea | GN | 2324 | Volume only |
| Guinea-Bissau | GW | 2624 | Volume only |
| Guyana | GY | 2328 | Volume only |
| Haiti | HT | 2332 | Volume only |
| Heard Island and McDonald Islands | HM | 2334 | Volume only |
| Honduras | HN | 2340 | Volume only |
| Hong Kong | HK | 2344 | Full |
| Hungary | HU | 2348 | Full |
| Iceland | IS | 2352 | Volume only |
| India | IN | 2356 | Full |
| Indonesia | ID | 2360 | Full |
| Iraq | IQ | 2368 | Volume only |
| Ireland | IE | 2372 | Full |
| Isle of Man | IM | 2833 | Volume only |
| Israel | IL | 2376 | Full |
| Italy | IT | 2380 | Full |
| Jamaica | JM | 2388 | Volume only |
| Japan | JP | 2392 | Full |
| Jersey | JE | 2832 | Volume only |
| Jordan | JO | 2400 | Full |
| Kazakhstan | KZ | 2398 | Full |
| Kenya | KE | 2404 | Full |
| Kiribati | KI | 2296 | Volume only |
| Kuwait | KW | 2414 | Volume only |
| Kyrgyzstan | KG | 2417 | Volume only |
| Laos | LA | 2418 | Volume only |
| Latvia | LV | 2428 | Full |
| Lebanon | LB | 2422 | Volume only |
| Lesotho | LS | 2426 | Volume only |
| Liberia | LR | 2430 | Volume only |
| Libya | LY | 2434 | Volume only |
| Liechtenstein | LI | 2438 | Volume only |
| Lithuania | LT | 2440 | Full |
| Luxembourg | LU | 2442 | Volume only |
| Madagascar | MG | 2450 | Volume only |
| Malawi | MW | 2454 | Volume only |
| Malaysia | MY | 2458 | Full |
| Maldives | MV | 2462 | Volume only |
| Mali | ML | 2466 | Volume only |
| Malta | MT | 2470 | Full |
| Marshall Islands | MH | 2584 | Volume only |
| Mauritania | MR | 2478 | Volume only |
| Mauritius | MU | 2480 | Volume only |
| Mexico | MX | 2484 | Full |
| Micronesia | FM | 2583 | Volume only |
| Moldova | MD | 2498 | Full |
| Monaco | MC | 2492 | Full |
| Mongolia | MN | 2496 | Volume only |
| Montenegro | ME | 2499 | Volume only |
| Morocco | MA | 2504 | Full |
| Mozambique | MZ | 2508 | Volume only |
| Myanmar (Burma) | MM | 2104 | Full |
| Namibia | NA | 2516 | Volume only |
| Nauru | NR | 2520 | Volume only |
| Nepal | NP | 2524 | Volume only |
| Netherlands | NL | 2528 | Full |
| New Caledonia | NC | 2540 | Volume only |
| New Zealand | NZ | 2554 | Full |
| Nicaragua | NI | 2558 | Full |
| Niger | NE | 2562 | Volume only |
| Nigeria | NG | 2566 | Full |
| Niue | NU | 2570 | Volume only |
| Norfolk Island | NF | 2574 | Volume only |
| North Macedonia | MK | 2807 | Full |
| Northern Mariana Islands | MP | 2580 | Volume only |
| Norway | NO | 2578 | Full |
| Oman | OM | 2512 | Volume only |
| Pakistan | PK | 2586 | Full |
| Palau | PW | 2585 | Volume only |
| Panama | PA | 2591 | Full |
| Papua New Guinea | PG | 2598 | Volume only |
| Paraguay | PY | 2600 | Full |
| Peru | PE | 2604 | Full |
| Philippines | PH | 2608 | Full |
| Pitcairn Islands | PN | 2612 | Volume only |
| Poland | PL | 2616 | Full |
| Portugal | PT | 2620 | Full |
| Qatar | QA | 2634 | Volume only |
| Republic of the Congo | CG | 2178 | Volume only |
| Romania | RO | 2642 | Full |
| Rwanda | RW | 2646 | Volume only |
| Saint Helena, Ascension and Tristan da Cunha | SH | 2654 | Volume only |
| Saint Kitts and Nevis | KN | 2659 | Volume only |
| Saint Lucia | LC | 2662 | Volume only |
| Saint Martin | MF | 2663 | Volume only |
| Saint Pierre and Miquelon | PM | 2666 | Volume only |
| Saint Vincent and the Grenadines | VC | 2670 | Volume only |
| Samoa | WS | 2882 | Volume only |
| San Marino | SM | 2674 | Volume only |
| Sao Tome and Principe | ST | 2678 | Volume only |
| Saudi Arabia | SA | 2682 | Full |
| Senegal | SN | 2686 | Full |
| Serbia | RS | 2688 | Full |
| Seychelles | SC | 2690 | Volume only |
| Sierra Leone | SL | 2694 | Volume only |
| Singapore | SG | 2702 | Full |
| Sint Maarten | SX | 2534 | Volume only |
| Slovakia | SK | 2703 | Full |
| Slovenia | SI | 2705 | Full |
| Solomon Islands | SB | 2090 | Volume only |
| Somalia | SO | 2706 | Volume only |
| South Africa | ZA | 2710 | Full |
| South Georgia and the South Sandwich Islands | GS | 2239 | Volume only |
| South Korea | KR | 2410 | Full |
| Spain | ES | 2724 | Full |
| Sri Lanka | LK | 2144 | Full |
| Suriname | SR | 2740 | Volume only |
| Sweden | SE | 2752 | Full |
| Switzerland | CH | 2756 | Full |
| Taiwan | TW | 2158 | Full |
| Tajikistan | TJ | 2762 | Volume only |
| Tanzania | TZ | 2834 | Volume only |
| Thailand | TH | 2764 | Full |
| The Bahamas | BS | 2044 | Volume only |
| The Gambia | GM | 2270 | Volume only |
| Timor-Leste | TL | 2626 | Volume only |
| Togo | TG | 2768 | Volume only |
| Tokelau | TK | 2772 | Volume only |
| Tonga | TO | 2776 | Volume only |
| Trinidad and Tobago | TT | 2780 | Volume only |
| Tunisia | TN | 2788 | Full |
| Turkiye | TR | 2792 | Full |
| Turkmenistan | TM | 2795 | Volume only |
| Tuvalu | TV | 2798 | Volume only |
| Uganda | UG | 2800 | Volume only |
| Ukraine | UA | 2804 | Full |
| United Arab Emirates | AE | 2784 | Full |
| United Kingdom | GB | 2826 | Full |
| United States | US | 2840 | Full |
| United States Minor Outlying Islands | UM | 2581 | Volume only |
| Uruguay | UY | 2858 | Full |
| Uzbekistan | UZ | 2860 | Volume only |
| Vanuatu | VU | 2548 | Volume only |
| Vatican City | VA | 2336 | Volume only |
| Venezuela | VE | 2862 | Full |
| Vietnam | VN | 2704 | Full |
| Wallis and Futuna | WF | 2876 | Volume only |
| Yemen | YE | 2887 | Volume only |
| Zambia | ZM | 2894 | Volume only |
| Zimbabwe | ZW | 2716 | Volume only |
Endpoints That Use Location Codes
All of the following endpoints accept location_code:
- Keyword Research —
/v1/seo/keywords - Keyword Ideas —
/v1/seo/keywords/ideas - Related Keywords —
/v1/seo/keywords/related - SERP Analysis —
/v1/seo/serp - Domain Overview —
/v1/seo/domain/overview - Domain Keywords —
/v1/seo/domain/keywords