Type-ahead over every place in the jobs corpus — countries, states, cities and regions — in one ranked list. Built to be called per keystroke and to hand back a value you can feed straight into a jobs query.
Using a result. Every row carries a kind and a code; kind tells you which filter the code belongs to:
kind | example code | jobs filter |
|---|---|---|
country | US | country |
state | US-TX | state |
city | austin-tx-us | location |
region | emea | location |
Codes are opaque identifiers — switch on kind and pass code through verbatim rather than parsing it. Every row is actionable: all four kinds map onto a live /jobs filter, and each job in a /jobs response carries the same kind/code pairs back in its locations array. Send each code to the filter its kind names — the wrong parameter is a 400, not a silent mismatch (location=us-ny is rejected in favor of state=US-NY). Mixing kinds across a selection IS supported, just across parameters: the /jobs country, state and location filters form one place selection and UNION, so a picker holding US-NY and austin-tx-us sends state=US-NY&location=austin-tx-us and gets both.
Matching. q is matched case- and diacritic-insensitively (zurich finds Zürich, sao paulo finds São Paulo) as a substring of the place name. A two-character q additionally matches country and state codes exactly, so ny finds New York and de finds Germany — abbreviations are how people type states, and no name-based match can serve them. That code tier disappears at the third keystroke.
Country spellings. Common country names, spellings and abbreviations also match the country they mean, even when the official name does not contain them: usa, america and united states of america find the United States; uk, britain, england, scotland and wales find the United Kingdom; uae finds the United Arab Emirates; holland finds the Netherlands; korea finds South Korea. An exact spelling ranks with the exact code matches, and from the third character a partial one (brit, holl) ranks with the names that start with q; a multi-word spelling is only matched partially once q has a space too (great b, not gre). Dots are ignored for codes and country spellings, so u.s. and u.s.a. find the United States too. Typing a country word therefore puts the country first: england lists the United Kingdom above England itself, and holland lists the Netherlands above Holland, Michigan.
Ranking. An exact two-letter code or an exact country spelling first, then names (or country spellings) that START with q, then names that merely contain it. Within a tier, larger places come first (population, descending), with country > state > city > region as the tiebreak between equally sized places. Consequences worth knowing: a bare q is global, so dal ranks Dalian above Dallas — scope with country for a regional board; and at exactly two characters, code matches outrank even large cities (la → Laos, Louisiana, then Lahore).
Regions are the five multi-country buckets, matched by name like anything else: amer (Americas), apac (Asia-Pacific), emea (Europe, Middle East & Africa), latam (Latin America), worldwide. They belong to no single country, so supplying country excludes them.
Suggestions are drawn from the location dimension, which only contains places that have been seen on a job posting. It does not tell you how many jobs are OPEN there today — a suggestion can resolve to zero current results.
bearerAuthAuthorizationBearer <token>Provide your secret API key (prefixed sk_) as a bearer token: Authorization: Bearer sk_....
q*stringThe typeahead query. Matched case- and diacritic-insensitively against location names (prefix matches rank above substring matches), plus an exact two-letter country/state code match (q=ny finds New York) and common country spellings and abbreviations (usa, america, uk, england, uae, holland, …): an exact spelling ranks with the exact code matches, a partial one (3+ characters) with the name-prefix matches. Dots are ignored for codes and country spellings (u.s. behaves like us). 1-100 characters after trimming.
1 <= length <= 100country?array<>Restrict suggestions to these ISO 3166-1 alpha-2 country codes. Repeat the parameter or comma-separate values (e.g. country=us,ca). Up to 20 values; case-insensitive. Region rows (emea, apac, …) belong to no country and are therefore never returned when this filter is supplied.
items <= 20limit?integerMaximum number of suggestions to return. Defaults to 10; values above 25 are clamped to 25.
0 < value10The ranked suggestions (possibly empty).
application/json- response
Ranked location suggestions for the query.
data*array<>Matching locations, best match first. Empty when nothing matches.
curl -X GET 'https://example.com/api/v1/locations/search?q=string'{ "data": [ { "kind": "country", "code": "string", "name": "string", "admin1_code": "string", "admin1_name": "string", "country_code": "string", "country_name": "string", "population": 0 } ]}