City + Nearby + Capitals + Population + Geocoding Api avatar

City + Nearby + Capitals + Population + Geocoding Api

Pricing

from $1.00 / 1,000 results

Go to Apify Store
City + Nearby + Capitals + Population + Geocoding Api

City + Nearby + Capitals + Population + Geocoding Api

Search, filter, and explore **4.4 million+ cities worldwide** — get population data, find nearby cities, discover capitals, and more. Lightning-fast results with zero setup.

Pricing

from $1.00 / 1,000 results

Rating

0.0

(0)

Developer

HappiTap

HappiTap

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

4 days ago

Last modified

Share

🌍 City Population & Geocoding API

Search, filter, and explore 4.4 million+ cities worldwide — get population data, find nearby cities, discover capitals, and more. Lightning-fast results with zero setup.

What can this Actor do?

  • Search cities by name — Find any city worldwide with partial name matching
  • Find nearby cities — Enter coordinates and a radius to discover cities around any location
  • List cities by country — Get all cities in a specific country with flexible filters
  • Browse world capitals — Explore national, administrative, and minor capitals
  • Rank cities by population — See the largest cities globally or within any country

What data do you get?

Every result includes rich city data:

FieldDescription
City nameOriginal name, ASCII version, and alternate names
CoordinatesLatitude and longitude
CountryCountry name with ISO2 and ISO3 codes
RegionAdministrative region, code, and type
Capital statusWhether the city is a national, administrative, or minor capital
PopulationCity population, city proper population, and density
RankingCity size ranking from 1 (largest) to 5 (smallest)
TimezoneIANA timezone (e.g., America/New_York, Asia/Kolkata)
DistanceDistance in km from your search point (nearby search only)

How to use

Choose a Search Mode and fill in the relevant fields. Here are some examples:

Find cities named "London"

{
"searchMode": "CITY_SEARCH",
"cityName": "London",
"maxResults": 20
}

Discover cities within 100 km of New York

{
"searchMode": "NEARBY_CITIES",
"latitude": 40.7128,
"longitude": -74.0060,
"radiusKm": 100,
"minPopulation": 50000,
"maxResults": 50
}

Top 50 most populated cities in India

{
"searchMode": "TOP_CITIES_BY_POPULATION",
"countryName": "India",
"maxResults": 50
}

All national capitals in the world

{
"searchMode": "CAPITAL_CITIES",
"capitalType": "primary",
"maxResults": 300
}

German cities with 100,000+ population

{
"searchMode": "COUNTRY_CITIES",
"countryCode": "DE",
"minPopulation": 100000,
"sortBy": "population",
"sortOrder": "DESC"
}

Filtering & sorting options

You can combine any of these filters with any search mode:

  • Country — Filter by country name or ISO2 code (e.g., US, IN, GB)
  • Population range — Set minimum and/or maximum population
  • City ranking — Filter by ranking (1 = megacity, 5 = small town)
  • Timezone — Filter by timezone (e.g., America/New_York)
  • Capitals only — Show only capital cities
  • Sort by — Sort results by city name, population, density, ranking, or country
  • Max results — Limit output up to 10,000 results

Use cases

  • Market research — Identify cities by population size for targeting campaigns
  • Travel apps — Find nearby cities and points of interest around any location
  • Data enrichment — Enrich your datasets with city coordinates, timezone, and population
  • Geographic analysis — Compare cities by density, ranking, and administrative regions
  • Logistics planning — Find cities within delivery radius of a warehouse location