NewAPIVerve Academy: free courses and certifications anyone can verify.Explore the Academy →

Cities Lookup API

GET

Match any city name to its verified population and country details.

Cities Lookup is a city search API that searches about 135,000 cities worldwide by name to find country codes, population counts and city size classifications, with an optional country filter. Paid plans add region codes, capital status, GeoJSON coordinates and up to 20 matches per search.

Try it — live request, no key required

Request
GETapi.apiverve.com/v1/citieslookup?city=San%20Francisco
Query parameters
Verification
Format

No key required to try it. Get a key to use it in your app.

Example
{
  "status": "ok",
  "error": null,
  "data": {
    "search": "San Francisco",
    "foundCities": [
      {
        "name": "San Francisco",
        "altName": "",
        "country": "US",
        "featureCode": "PPLA2",
        "population": 864816,
        "loc": {
          "type": "Point",
          "coordinates": [
            -122.41942,
            37.77493
          ]
        },
        "regionCode": "CA",
        "countryName": "United States",
        "populationCategory": "large",
        "isCapital": false
      }
    ]
  }
}

About the Cities Lookup API

A cities API built on GeoNames: every place in the world with at least 1,000 residents, about 135,000 cities. Pass a city name, optionally narrowed to a two-letter country code, and it matches every city whose name contains your text, ranks them by population and drops repeats of the same name in the same country. Each match has its name, alternative name, country code and name, GeoNames feature code, population and a size category from village to major. The Free plan returns the most populous match; paid plans return up to 20 and add the region (admin1) code, a capital-city flag and longitude-latitude coordinates.

What people use it for

Checkout Address Validation
When customers enter a city name during checkout, match official country codes and alternative names to standardize shipping records.
Retail Expansion Sizing
Retail analysts evaluate new store candidates by querying population figures and city size categories across international regions.
Fleet Dispatch Routing
For regional delivery scheduling, dispatchers convert destination city names into exact longitude and latitude coordinates on paid tiers.
Travel Destination Filtering
To help users discover vacation spots, travel search engines group destinations by population tier and resolve local alias spellings.

Ways to call it

One endpoint, many ways in — REST with JSON, XML, YAML and CSV, plus GraphQL and an MCP interface for AI agents.

JSON
Default REST response
XML
Markup format
YAML
Human-readable
CSV
Tabular export
Beta
GraphQL
Query language
New
MCP
For AI agents

Other ways to use Cities Lookup

Same data, same APIVerve account, same credit balance — one key works on all of them.

Questions.

Common questions about the Cities Lookup API.

Read the docs →
Which cities and geographic details does the database cover?
The database covers about 135,000 cities worldwide: every place GeoNames lists with at least 1,000 residents. Each record includes the official name, alternative aliases if available, two-letter ISO country code, full country name, Geonames feature classification, population count, and population category. Paid plans also get the GeoNames region (admin1) code, whether the city is its country's capital, and coordinates.
What would 25,000 city lookups a month cost me?
A volume of 25,000 lookups requires 50,000 credits, which is fully covered by the Starter plan at 200,000 credits for $29.99 per month. That works out to about $0.0003 per lookup or $0.30 per 1,000 calls. The Free plan includes 100 lookups every month.
Can I get geographic coordinates and custom result limits on the Free plan?
No, exact latitude and longitude coordinates and the limit parameter require a paid plan. Free plan responses return basic city details without coordinate pairs, the region code or the capital flag. Upgrading to any paid tier, starting with Starter, unlocks all three along with custom search limits.
How large is the city database?
About 135,000 cities: every populated place in GeoNames with at least 1,000 residents. Population figures are the ones GeoNames publishes, drawn from national censuses and estimates, and city types follow GeoNames feature codes. Towns and villages under 1,000 people are not included.
What happens when multiple cities share the same name?
The API returns an array of matching cities under the foundCities property rather than a single result. Each match includes its country name, ISO country code, population size, and on paid plans its region code, allowing your application to disambiguate or display a selection list. Pass the country parameter to restrict matches to one country, so Paris with country=US returns Paris, Texas.
How are matches ranked when a name is shared or appears inside other names?
Cities whose name equals your search come first, then names that start with it, then names that merely contain it, with population deciding within each group. So York returns York, England ahead of New York City, and Zurich returns Zürich, Switzerland rather than Lake Zurich, Illinois. Accents and punctuation are ignored when comparing. Add country=GB or a ", GB" suffix to keep one country, and on a paid plan raise limit to see more matches.
Can I use city lookup data inside a commercial application?
Yes, commercial use is permitted on any paid plan. You can use the city data to power location pickers, business intelligence dashboards, or market research in your own product. You may not resell or redistribute the raw dataset.

Ready to build with Cities Lookup? Start with 200 free credits — one key unlocks all 406+ APIs.

Explore the catalog

406+ APIs on the same key and the same response shape.

Browse all APIs