GeoNames Places Scraper
parseforge/geonames-places-scraper
TravelEducationOther
Scrapes GeoNames places, postal codes, and country dumps. Returns each place as a flat row with name, coordinates, feature class, population, and country code.
- Total users
- 1
- Monthly active
- 0
- Total runs
- 130
- Bookmarked
- 0
- Rating
- Not rated yet
- Last modified
- 12 days ago
Overview
GeoNames Places Scraper
Scrape GeoNames places, postal codes, and country dumps, up to a million records per run. Every place comes with its name, coordinates, feature class, population, and country code. No API key or rate limits. Export to CSV, JSON, Excel, or XML.
GeoNames is the world's largest free geographical database, but its API limits you to 30,000 credits per day and 2,000 per hour. This Actor reads the public data dumps directly, so you can pull global cities, every place in a country, or postal codes without a key or quota. Filter by name, feature class, or minimum population and get a flat row per place.
| Who uses it | What they scrape GeoNames for |
|---|---|
| Logistics and e-commerce teams | Validate shipping addresses and normalize place names |
| Market researchers | Build a list of cities or populated places for a region |
| Data engineers | Enrich internal datasets with coordinates and feature classes |
| GIS analysts | Get a clean base layer of places for mapping projects |
| Travel and hospitality apps | Seed a location database with cities and postal codes |
What it does
This Actor collects GeoNames places by global cities, full country dump, or postal codes per country, and returns each one as a flat row.
- π Three modes: global cities with population 1000 or more, a full per-country dump of all places, or postal codes for one country.
- π Name filter: case-insensitive substring match on name, ASCII name, and alternate names.
- π·οΈ Feature class filter: pick populated places, admin divisions, hydrographic, terrain, roads, spots, vegetation, undersea, or parks.
- π₯ Population filter: keep only places above a minimum population.
- π¦ Flat output: one row per place, ready for CSV, JSON, Excel, or XML.
Results export to CSV, JSON, Excel, or XML, or straight from the API.
What you can do with GeoNames data
π¦ Validate shipping addresses.
An e-commerce team pulls all postal codes for a country and cross-checks customer entries before dispatch.
πΊοΈ Build a city list for a region.
A market researcher runs the cities mode with a country filter to get every populated place over 1000 people.
π§Ή Normalize place names in a CRM.
A data engineer scrapes the full country dump and matches alternate names to clean messy location fields.
π Enrich coordinates for mapping.
A GIS analyst pulls all places with feature class P and minimum population 5000 to create a base layer.
βοΈ Seed a travel app database.
A developer runs the cities mode for multiple countries and imports the flat rows into their backend.
Why choose this scraper
| What you get | |
|---|---|
| No API key or rate limits | Reads the public GeoNames data dumps directly, so no registration or daily credit cap. |
| Up to 1,000,000 places per run | Set maxItems to pull a small sample or the full dataset. |
| Three modes, one schema | Cities, country dumps, and postal codes all return the same flat row shape. |
| Filter before you download | Name, feature class, and population filters cut the data to what you need. |
| Export anywhere | CSV, JSON, Excel, or XML, ready for your pipeline or spreadsheet. |
How it compares
This Actor reads the public GeoNames data dumps directly, while Geonames Global Places uses the free GeoNames API with its rate limits and credit system.
| Feature | ParseForge | Geonames Global Places |
|---|---|---|
| Bulk data dumps without API limits | Yes | Not listed |
| Postal codes per country | Yes | Yes |
| Full country dump of all places | Yes | Not listed |
| Filter by feature class | Yes | Not listed |
| Filter by minimum population | Yes | Not listed |
| Timezones and nearby places | Not listed | Yes |
Configure the run
Drive the Actor from a mode, an optional country, a name query, a feature class, and a minimum population. Filters run as each place is read, so only matches reach your dataset. The Input tab lists every parameter.
A first run with the defaults:
{
"maxItems": 10,
"mode": "cities",
"country": "US",
"minPopulation": 0
}
A larger pull:
{
"maxItems": 200,
"mode": "cities",
"country": "US",
"minPopulation": 0
}
Pricing
Pay-per-result: $0.02133 per result collected. You pay only for the results written to your dataset.
| Results collected | Approximate cost |
|---|---|
| 100 results | $2.13 |
| 1,000 results | $21.33 |
| 10,000 results | $213.30 |
New Apify accounts start with $5 in free credit.
Free users
Free-plan runs return up to 10 results as a preview. Upgrade your Apify plan to collect up to 1,000,000 results per run.
Run it
- Create a free Apify account with $5 in credit.
- Open the GeoNames Places Scraper.
- Set your inputs and any filters, then click Start.
- Export the results as CSV, Excel, JSON, or XML from the Dataset tab.
Run it programmatically through the Apify API (run-sync-get-dataset-items) or the ApifyClient for JavaScript and Python.
Use with AI agents (MCP)
Give an AI agent live access to GeoNames through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:
claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/geonames-places-scraper"
Then prompt it in plain language to run the scraper and read back the results.
Troubleshooting
Why am I getting no results?
Check your filters. The name query is a substring match, and the feature class and population filters can exclude everything. Try clearing filters and running again.
Why is the run slow?
Large country dumps or high maxItems take longer. Reduce maxItems or add filters to limit the data.
Why do I get an error about country?
Country mode and postal codes mode require a country. Select one from the dropdown. Cities mode treats country as optional.
Can I get all countries at once?
No. Country and postal codes modes work per country. Use cities mode for global data, or run the Actor multiple times.
Why are some places missing?
The data comes from GeoNames dumps. If a place is not in the dump, it will not appear. Check the GeoNames website for coverage.
FAQ
| Question | Answer |
|---|---|
| Do I need a GeoNames API key? | No. This Actor reads the public data dumps, so there is no key, no registration, and no daily credit limit. |
| What is the difference between the three modes? | Cities mode returns global populated places with population 1000 or more. Country mode returns every place in one country. Postal codes mode returns postal codes for one country. |
| Can I filter by country in cities mode? | Yes. The country field is optional for cities mode and acts as a filter. For country and postal codes modes, it is required. |
| How many places can I get in one run? | You can set maxItems up to 1,000,000. The actual number depends on the mode and filters. |
| What does the name filter match? | It does a case-insensitive substring match on the place name, the ASCII name, and alternate names. |
| What are feature classes? | GeoNames groups places into classes like P for populated places, A for admin divisions, H for hydrographic, T for terrain, and more. You can filter by one class. |
| Can I filter by population? | Yes. Set a minimum population and only places at or above that number are returned. |
| What format is the output? | Each place is a flat row. You can export to CSV, JSON, Excel, or XML from the Apify dataset. |
| Is the data up to date? | The Actor reads the latest public GeoNames data dumps, which are updated regularly by GeoNames. |
| Can I get postal codes for multiple countries? | Postal codes mode works per country. Run the Actor once per country or use multiple runs. |
| Does this include alternate names? | The name filter checks alternate names, and the output includes the primary name and ASCII name. Alternate names are not returned as a separate field. |
| What is the maximum number of places? | You can set maxItems up to 1,000,000. The global cities mode has about 200,000 records, and country dumps vary. |
Related actors
Browse the full ParseForge collection for more scrapers.
π Need help? Email parseforge@protonmail.com with your run ID, your input, and what you expected.
β οΈ Disclaimer. This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by GeoNames. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.
Input
| Field | Type | What it does | Default |
|---|---|---|---|
| maxItems | integer | How many places to collect per run. | 10 |
| mode | string (3 options) | cities = global populated places β₯1000 (~200K records). country = full per-country dump (all places). postalcodes = postal codes per country. | cities |
| country | string (251 options) | Required for `country` and `postalcodes` modes. Optional filter for `cities` mode. | US |
| query | string | Filter by name (case-insensitive substring; matches name + ASCII name + alternate names). | not set |
| featureClass | string (10 options) | GeoNames feature class. P=populated places, A=admin divisions, H=hydrographic, T=mountain, S=spot, V=vegetation, R=road, U=undersea, L=parks/areas. | not set |
| minPopulation | integer | Filter to places with at least this population. Empty = no filter. | 0 |
Pricing
from $16.00 per 1,000 results
| Charged for | What it is | Price each |
|---|---|---|
| Result item | Charged per record successfully returned in the dataset. | $0.016 to $0.02133 |
Tiered: the lower figure is the price on a higher Apify plan. Billing and the free credit live on Apify.
API
One POST returns the dataset directly. Same shape for every scraper in the library, so swapping the slug is the only change.
curl -X POST "https://api.apify.com/v2/acts/parseforge~geonames-places-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"helloWorld": 123
}' Examples
Input that runs as-is.
{
"helloWorld": 123
} Reviews
No reviews yet. Be the first.
Issues
We build and maintain this scraper, so a problem with it comes to us. Report it on the Apify listing and the thread stays attached to the scraper where the next person can find it: open an issue.
Broken and urgent, or you would rather not post in public? Write to parseforge@protonmail.com and it reaches the people who wrote it.
