Skip to main content

Reference values

Several fields on POST /v1/domains/{domain_uuid}/keywords — and on the search_engines entries inside it — don't take free text. They take values from a fixed catalogue: a search engine name, a location id, a language code, a device, and a check frequency. Send a value outside the catalogue and the API rejects the whole request with 422 Unprocessable Entity (see Errors & rate limits).

Values are matched against the catalogue, not against free text. frequency, name, device and language are matched case-insensitively with surrounding whitespace ignored, so Google, Desktop, FR and zh-cn are accepted and normalised to the canonical forms listed here (google, desktop, fr, zh-CN). Send the canonical form anyway — it is what the API returns in every keyword response. location takes either a Google Ads geo-target id or an ISO 3166-1 alpha-2 country code (see Location). A name is never accepted where a code belongs: "French" for a language or "Dijon, France" for a location is rejected with a 422 that tells you which field failed and which lookup below returns the right value (see Errors & rate limits).

Everything on this page can be read from the API itself with two lookup endpoints, so you do not have to keep a copy of these tables:

EndpointReturns
GET /v1/locationsThe location catalogue for one search engine — the code of each row is the value to send as search_engines[].location.
GET /v1/languagesThe language catalogue for one search engine — the code of each row is the value to send as search_engines[].language.

Both are authenticated like every other /v1 endpoint (a missing or invalid key returns 401 with an empty body; a plan without API access returns 403), both are paginated (see Pagination), and neither is account-scoped — the catalogue is the same for every account. Only search_engines[].name, device and frequency have no lookup: their allowed values are the short lists below, and a 422 for any of them echoes the full list in meta.allowed.

Search engines​

search_engines[].name accepts:

  • google
  • bing
  • yahoo

Each engine has its own location and language catalogue, and bing and yahoo cover far fewer of both than google:

EngineCountriesLanguages
google212128
bing18049
yahoo8437

Bing's language codes: ar, bg, ca, cs, da, de, el, en, en-GB, es, et, eu, fi, fr, gl, gu, he, hi, hr, hu, is, it, ja, kn, ko, lt, lv, mr, ms, nb, nl, no, pa, pl, pt-BR, pt-PT, ro, ru, sk, sl, sv, ta, te, th, tr, uk, vi, zh-CN, zh-TW.

Yahoo's language codes: ar, bg, ca, cs, da, de, el, en, es, et, fa, fi, fr, he, hr, hu, id, is, it, ja, ko, lt, lv, nl, no, pl, pt, ro, ru, sk, sl, sv, th, tr, vi, zh-CN, zh-TW.

Yahoo's list is a subset of the Google language list below. Bing's is too, except for two Bing-only codes: en-GB and nb.

Devices​

search_engines[].device accepts:

  • desktop
  • mobile

Frequencies​

frequency accepts:

  • daily
  • weekly
  • biweekly (aliases bi-weekly and bi_weekly are also accepted, and are normalised to biweekly)
  • monthly

Location​

search_engines[].location is not a place name. It accepts two forms, both sent as a JSON string (the OpenAPI schema declares it type: string — always quote it):

  • A Google Ads geo-target criteria id, e.g. "2840" (United States), "2250" (France) or "1005850" (Dijon). This is the same id space as Google's own geo targets list — the Criteria ID column there is exactly the value this field expects, for google, bing, and yahoo alike. Cities, regions, postal codes and countries all use this form.
  • An ISO 3166-1 alpha-2 country code, e.g. "FR", for country-wide tracking. The API resolves it to the engine's Country row for that country and stores that row's id, so "FR" and "2250" create identical keywords and the keyword's location.code reads back as 2250. The code is case-insensitive ("fr" works), but only the two-letter form is accepted — "FRA" and "France" are rejected.

A location name such as "United States" or "Dijon, France" is rejected with a 422 — it is not resolved to an id for you, because names are ambiguous (the catalogue holds thousands of same-named places) and a wrong guess would bill you for the wrong SERP. The 422 points you at the lookup below, with the first segment of your value pre-filled as the search term.

Looking up a location​

GET /v1/locations lists the catalogue for one search engine. Every filter is optional and they combine; a request with none of country, code or q defaults to variant=Country, so a bare GET /v1/locations is the list of countries (212 for google) rather than page 1 of the whole catalogue.

Query parameterMeaning
search_enginegoogle (default), bing or yahoo. Case-insensitive. Anything else is a 422 invalid_reference_value listing the three in meta.allowed.
countryISO 3166-1 alpha-2 country code, case-insensitive (FR, us). Keeps only rows in that country. A country name or a three-letter code is a 422 invalid_reference_value.
variantExact, case-sensitive catalogue variant: Country, City, Region, Postal Code, Department, District, Neighborhood, Municipality, Airport, University, …
codeExact geo-target id, to read one row back (code=1005850). This is the id only — for the ISO form use country=FR&variant=Country.
qPrefix search on the canonical City,Region,Country name, case-insensitive, 2 to 100 characters after trimming. q=Dijon matches Dijon,Bourgogne-Franche-Comte,France; q=D is a 422 validation_failed (q must be at least 2 characters).
page, per_pageStandard pagination — per_page defaults to 100, max 1000. Totals come back in the X-Total-Count, X-Total-Pages, X-Per-Page and X-Current-Page headers.

Narrow with country whenever you can: country=FR on its own returns every French row (over 8,000 postal codes, cities, departments and regions), so pair it with q for a city or with variant=Country for the single country row. Every filter (search_engine, country, variant, code, q) must be a plain string — q[]=Dijon is a 422 validation_failed (q must be a string); page and per_page are never an error: a non-numeric page is treated as 1, an empty per_page uses the default 100, and any other per_page is clamped into 1–1000 (a non-numeric one counts as 1). Rows are ordered by their catalogue id, oldest first.

curl "https://api.ranktracker.com/v1/locations?search_engine=google&country=FR&q=Dijon" \
-H "Authorization: tkn_usr_your_api_key_here"
HTTP/1.1 200 OK
Content-Type: application/json
X-Total-Count: 1
X-Total-Pages: 1
X-Per-Page: 100
X-Current-Page: 1
{
"data": [
{
"id": "019a1b2c-3d4e-7f60-8a9b-0c1d2e3f4a5b",
"type": "location",
"attributes": {
"code": "1005850",
"name": "Dijon,Bourgogne-Franche-Comte,France",
"codeParent": "9068895",
"countryIsoCode": "FR",
"variant": "City",
"formattedName": "Dijon, Bourgogne-Franche-Comte, France",
"searchEngine": "google"
}
}
]
}
AttributeMeaning
codeThe geo-target id — the value to send as search_engines[].location.
nameThe canonical City,Region,Country name, exactly as q matches it and as keyword responses return it in location.name.
formattedNamename with a space after each comma, for display.
codeParentThe geo-target id of the enclosing location, or null for a top-level row.
countryIsoCodeISO 3166-1 alpha-2 code of the row's country.
variantThe catalogue variant (Country, City, Postal Code, …).
searchEngineThe engine this row belongs to.

Copy code into your keyword request:

{
"frequency": "monthly",
"words": ["agence seo dijon"],
"search_engines": [
{ "name": "google", "location": "1005850", "language": "fr", "device": "desktop" }
]
}

If you would rather not call the endpoint, two other sources give the same ids:

  1. Google's geo-targets CSV from the link above — read off the Criteria ID for the country, region, or city you want. This is the authoritative source and covers every id in the catalogue below.
  2. An existing keyword. If your account already tracks a keyword in the place you want, GET /v1/domains/{uuid}/keywords returns that keyword's location object, including its code (the id) — copy it for new keywords in the same place. See Pull rankings into a warehouse for the shape of that response.

Worked example: French cities​

City ids follow the same pattern — each of these is one row of GET /v1/locations?search_engine=google&country=FR&q=<city>. The City column is the location's full name as the API returns it in location.name, and Location id is the value to send as search_engines[].location:

CityLocation id
Bordeaux,Nouvelle-Aquitaine,France1005811
Dijon,Bourgogne-Franche-Comte,France1005850
Lille,Hauts-de-France,France1006235
Lyon,Auvergne-Rhone-Alpes,France1006410
Marseille,Provence-Alpes-Cote d'Azur,France1006356
Nantes,Pays de la Loire,France1006285
Paris,Paris,Ile-de-France,France1006094
Toulouse,Occitanie,France1006219

Country-level ids (like 2250 for all of France, or 2840 for all of the United States) are in the country table below.

Languages​

search_engines[].language is a language code (fr, en, zh-CN), never a language name — "French" is rejected with a 422. Codes are matched case-insensitively (FR → fr, zh-cn → zh-CN). The Global pseudo-language 0000, which the Ranktracker app can select, cannot be tracked through the API and is rejected with its own 422 message.

Looking up a language​

GET /v1/languages lists the codes one search engine accepts. search_engine works exactly as on /v1/locations (google by default); q is optional and, after trimming, must be 1 to 100 characters. It matches either the exact code (case-insensitive) or a substring of the name, so q=fr returns French — and also Afrikaans and Frisian, whose names contain fr. Rows are ordered by code, 0000 is never listed, and pagination is the same page / per_page and X-Total-* headers as every other list.

curl "https://api.ranktracker.com/v1/languages?search_engine=google&q=fr" \
-H "Authorization: tkn_usr_your_api_key_here"
{
"data": [
{ "id": "019a1b2c-3d4e-7f60-8a9b-0c1d2e3f4a01", "type": "language", "attributes": { "code": "af", "name": "Afrikaans", "searchEngine": "google" } },
{ "id": "019a1b2c-3d4e-7f60-8a9b-0c1d2e3f4a02", "type": "language", "attributes": { "code": "fr", "name": "French", "searchEngine": "google" } },
{ "id": "019a1b2c-3d4e-7f60-8a9b-0c1d2e3f4a03", "type": "language", "attributes": { "code": "fy", "name": "Frisian", "searchEngine": "google" } }
]
}

code is the value to send as search_engines[].language. Use the full name (q=French) when you want a single row: a code is also matched as a substring of names, so q=fr returns the three rows above.

Language codes (google)​

search_engines[].language for name: "google" accepts the following codes:

LanguageLanguage code
Afrikaansaf
Akanak
Albaniansq
Amharicam
Arabicar
Armenianhy
Azeriaz
Balineseban
Basqueeu
Belarusianbe
Bengalibn
Bosnianbs
Bulgarianbg
Burmesemy
Catalanca
Cebuanoceb
Chichewany
Chinese (Simplified)zh-CN
Chinese (Traditional)zh-TW
Croatianhr
Czechcs
Danishda
Dutchnl
Englishen
Espanol (Latinoamerica)es-419
Estonianet
Eweee
Faroesefo
Farsifa
Filipinofil
Finnishfi
Frenchfr
Frisianfy
Gagaa
Galiciangl
Gandalg
Georgianka
Germande
Greekel
Gujaratigu
Haitianht
Hausaha
Hebrewhe
Hebrew (old)iw
Hindihi
Hungarianhu
Icelandicis
IciBembabem
Igboig
Indonesianid
Irishga
Italianit
Japaneseja
Kannadakn
Kazakhkk
Khmerkm
Kinyarwandarw
Kirundirn
Kongokg
Koreanko
Kreol morisienmfe
Kreol Seselwacrs
Kriokri
Kurdishckb
Kyrgyzky
Laolo
Latvianlv
Lingalaln
Lithuanianlt
Luoach
Macedonianmk
Malagasymg
Malayms
Malayamml
Maltesemt
Maorimi
Marathimr
Mongolianmn
Montenegrosr-ME
Nepaline
Northern Sothonso
Norwegianno
Nyankolenyn
Oromoom
Pashtops
Pidginpcm
Polishpl
Portuguesept
Portuguese (Brazil)pt-BR
Portuguese (Portugal)pt-PT
Punjabipa
Quechuaqu
Romanianro
Romanshrm
Russianru
Serbiansr
Serbian (Latin)sr-Latn
Sesothost
Shonasn
Siloziloz
Sindhisd
Sinhalesesi
Slovaksk
Sloveniansl
Somaliso
Spanishes
Swahilisw
Swedishsv
Tagalogtl
Tajiktg
Tamilta
Telugute
Thaith
Tigrinyati
Tonga (Tonga Islands)to
Tshilubalua
Tswanatn
Tumbukatum
Turkishtr
Turkmentk
Ukrainianuk
Urduur
Uzbekuz
Vietnamesevi
Wolofwo
Xhosaxh
Yorubayo
Zuluzu

Countries (google)​

Country-level location ids for name: "google". Either column works as search_engines[].location: the Location id ("2250") or the ISO 3166-1 alpha-2 code ("FR"), which the API resolves to that same id. GET /v1/locations?search_engine=google returns this table live.

CountryISO 3166-1 alpha-2Location id
AfghanistanAF2004
AlbaniaAL2008
AlgeriaDZ2012
American SamoaAS2016
AndorraAD2020
AngolaAO2024
AntarcticaAQ2010
Antigua and BarbudaAG2028
ArgentinaAR2032
ArmeniaAM2051
AustraliaAU2036
AustriaAT2040
AzerbaijanAZ2031
BahrainBH2048
BangladeshBD2050
BarbadosBB2052
BelgiumBE2056
BelizeBZ2084
BeninBJ2204
BhutanBT2064
BoliviaBO2068
Bosnia and HerzegovinaBA2070
BotswanaBW2072
BrazilBR2076
BruneiBN2096
BulgariaBG2100
Burkina FasoBF2854
BurundiBI2108
Cabo VerdeCV2132
CambodiaKH2116
CameroonCM2120
CanadaCA2124
Caribbean NetherlandsBQ2535
Central African RepublicCF2140
ChadTD2148
ChileCL2152
ChinaCN2156
Christmas IslandCX2162
Cocos (Keeling) IslandsCC2166
ColombiaCO2170
ComorosKM2174
Cook IslandsCK2184
Costa RicaCR2188
Cote d'IvoireCI2384
CroatiaHR2191
CuracaoCW2531
CyprusCY2196
CzechiaCZ2203
Democratic Republic of the CongoCD2180
DenmarkDK2208
DjiboutiDJ2262
DominicaDM2212
Dominican RepublicDO2214
EcuadorEC2218
EgyptEG2818
El SalvadorSV2222
Equatorial GuineaGQ2226
EritreaER2232
EstoniaEE2233
EswatiniSZ2748
EthiopiaET2231
FijiFJ2242
FinlandFI2246
FranceFR2250
French PolynesiaPF2258
French Southern and Antarctic LandsTF2260
GabonGA2266
GeorgiaGE2268
GermanyDE2276
GhanaGH2288
GreeceGR2300
GrenadaGD2308
GuamGU2316
GuatemalaGT2320
GuernseyGG2831
GuineaGN2324
Guinea-BissauGW2624
GuyanaGY2328
HaitiHT2332
Heard Island and McDonald IslandsHM2334
HondurasHN2340
HungaryHU2348
IcelandIS2352
IndiaIN2356
IndonesiaID2360
IraqIQ2368
IrelandIE2372
Isle of ManIM2833
IsraelIL2376
ItalyIT2380
JamaicaJM2388
JapanJP2392
JerseyJE2832
JordanJO2400
KazakhstanKZ2398
KenyaKE2404
KiribatiKI2296
KuwaitKW2414
KyrgyzstanKG2417
LaosLA2418
LatviaLV2428
LebanonLB2422
LesothoLS2426
LiberiaLR2430
LibyaLY2434
LiechtensteinLI2438
LithuaniaLT2440
LuxembourgLU2442
MadagascarMG2450
MalawiMW2454
MalaysiaMY2458
MaldivesMV2462
MaliML2466
MaltaMT2470
Marshall IslandsMH2584
MauritaniaMR2478
MauritiusMU2480
MexicoMX2484
MicronesiaFM2583
MoldovaMD2498
MonacoMC2492
MongoliaMN2496
MontenegroME2499
MoroccoMA2504
MozambiqueMZ2508
Myanmar (Burma)MM2104
NamibiaNA2516
NauruNR2520
NepalNP2524
NetherlandsNL2528
New CaledoniaNC2540
New ZealandNZ2554
NicaraguaNI2558
NigerNE2562
NigeriaNG2566
NiueNU2570
Norfolk IslandNF2574
Northern Mariana IslandsMP2580
North MacedoniaMK2807
NorwayNO2578
OmanOM2512
PakistanPK2586
PalauPW2585
PanamaPA2591
Papua New GuineaPG2598
ParaguayPY2600
PeruPE2604
PhilippinesPH2608
Pitcairn IslandsPN2612
PolandPL2616
PortugalPT2620
QatarQA2634
Republic of the CongoCG2178
RomaniaRO2642
RwandaRW2646
Saint Helena, Ascension and Tristan da CunhaSH2654
Saint Kitts and NevisKN2659
Saint LuciaLC2662
Saint Pierre and MiquelonPM2666
Saint Vincent and the GrenadinesVC2670
SamoaWS2882
San MarinoSM2674
Sao Tome and PrincipeST2678
Saudi ArabiaSA2682
SenegalSN2686
SerbiaRS2688
SeychellesSC2690
Sierra LeoneSL2694
SingaporeSG2702
Sint MaartenSX2534
SlovakiaSK2703
SloveniaSI2705
Solomon IslandsSB2090
SomaliaSO2706
South AfricaZA2710
South Georgia and the South Sandwich IslandsGS2239
South KoreaKR2410
SpainES2724
Sri LankaLK2144
SurinameSR2740
SwedenSE2752
SwitzerlandCH2756
TajikistanTJ2762
TanzaniaTZ2834
ThailandTH2764
The BahamasBS2044
The GambiaGM2270
Timor-LesteTL2626
TogoTG2768
TokelauTK2772
TongaTO2776
Trinidad and TobagoTT2780
TunisiaTN2788
TurkiyeTR2792
TurkmenistanTM2795
TuvaluTV2798
UgandaUG2800
UkraineUA2804
United Arab EmiratesAE2784
United KingdomGB2826
United StatesUS2840
United States Minor Outlying IslandsUM2581
UruguayUY2858
UzbekistanUZ2860
VanuatuVU2548
Vatican CityVA2336
VenezuelaVE2862
VietnamVN2704
Wallis and FutunaWF2876
YemenYE2887
ZambiaZM2894
ZimbabweZW2716

Catalogue snapshot 2024-08-27.