# Open-Meteo Geocoding Scraper (`xtracto/open-meteo-geocoding`) Actor

Turn place names into coordinates: latitude, longitude, elevation, timezone, population, postcodes and the full admin hierarchy, in 20 languages. Keyless, no login.

- **URL**: https://apify.com/xtracto/open-meteo-geocoding.md
- **Developed by:** [Farhan Febrian Nauval](https://apify.com/xtracto) (community)
- **Categories:** Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.67 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Open-Meteo Geocoding Scraper

Turn place names into coordinates: latitude, longitude, elevation, timezone, population, postcodes and the full administrative hierarchy for every match, in any of 20 languages, from the public Open-Meteo geocoding service.

### Why use this actor

- **No account, no login, no API key.** Open-Meteo is free and public, backed by the GeoNames place index.
- **Bulk geocoding:** give it a list of names and get every match ranked by relevance.
- **Rich detail per place:** coordinates, elevation, timezone, population, postcodes, country, and region / district / municipality.
- **20 languages:** place and country names come back in the language you choose (Munich / Germany in English, München / Deutschland in German).
- **Stable GeoNames IDs** for joining with other datasets.
- **Stable JSON output** for spreadsheets, databases and maps; export to JSON, CSV or Excel; automatic retries.

### How it works

1. You list place names: cities, towns, mountains or regions.
2. Optionally, pick a language and restrict results to one country.
3. The actor looks up every name and returns up to your chosen number of matches each.
4. Each match becomes one row in your dataset.

No scrapers, browsers or blocks to manage.

### Input

```json
{
  "places": ["Berlin", "Munich", "Jakarta"],
  "language": "en",
  "countryCode": "",
  "maxResultsPerPlace": 10
}
```

| Field | Type | Description |
|---|---|---|
| `places` | array of strings | Place names, one per line. Names shorter than two characters match nothing. |
| `language` | string | Language for place and country names, e.g. `en`, `de`, `fr`, `id`. Default `en`. |
| `countryCode` | string | Optional two-letter country code, e.g. `US` or `AU`, for names that repeat worldwide like Springfield. |
| `maxResultsPerPlace` | integer | Matches per name, 1 to 100. Default `10`. |
| `proxyConfiguration` | object | Not needed. |

### Output

Real output (run with `maxResultsPerPlace: 2`; 2 of the 6 rows shown):

```json
[
  {
    "_input": "Munich",
    "_source": "S1-open-meteo-geocoding",
    "_scrapedAt": "2026-11-11T13:11:47Z",
    "rank": 1,
    "geonameId": 2867714,
    "name": "Munich",
    "latitude": 48.13743,
    "longitude": 11.57549,
    "elevationMetres": 524.0,
    "timezone": "Europe/Berlin",
    "population": 1505005,
    "country": "Germany",
    "countryCode": "DE",
    "admin1": "Bavaria",
    "admin2": "Upper Bavaria",
    "admin3": "Munich, Urban District",
    "admin4": "Munich",
    "adminPath": "Bavaria / Upper Bavaria / Munich, Urban District / Munich",
    "featureCode": "PPLA",
    "featureLabel": "first-order admin capital",
    "postcodes": ["80331"],
    "language": "en",
    "countryFilter": null
  },
  {
    "_input": "Jakarta",
    "_source": "S1-open-meteo-geocoding",
    "_scrapedAt": "2026-11-11T13:11:49Z",
    "rank": 2,
    "geonameId": 6754874,
    "name": "Jakarta Pusat",
    "latitude": -6.1818,
    "longitude": 106.8223,
    "elevationMetres": 17.0,
    "timezone": "Asia/Jakarta",
    "population": null,
    "country": "Indonesia",
    "countryCode": "ID",
    "admin1": "Jakarta Special Capital Region",
    "admin2": "Central Jakarta",
    "admin3": null,
    "admin4": null,
    "adminPath": "Jakarta Special Capital Region / Central Jakarta",
    "featureCode": "PPLX",
    "featureLabel": "section of a populated place",
    "postcodes": [],
    "language": "en",
    "countryFilter": null
  }
]
```

| Field | Type | Description |
|---|---|---|
| `_input` | string | The place name you entered |
| `_source` | string | Data source tag |
| `_scrapedAt` | string | When this row was produced (UTC) |
| `rank` | integer | Position in the relevance order for this name |
| `geonameId` | integer | Stable GeoNames identifier |
| `name` | string | Place name, in the chosen language |
| `latitude`, `longitude` | number | Decimal degrees |
| `elevationMetres` | number | Metres above sea level |
| `timezone` | string | Time zone, e.g. `Europe/Berlin` |
| `population` | integer or null | Present for populated places, empty for landmarks |
| `country`, `countryCode` | string | Country name (chosen language) and two-letter code |
| `admin1` – `admin4` | string or null | Administrative levels, largest first |
| `adminPath` | string | All administrative levels joined |
| `featureCode`, `featureLabel` | string | GeoNames place type and a plain-English label |
| `postcodes` | array | Postcodes, where known |
| `language`, `countryFilter` | string | The settings this row was produced with |

### Notes and limits

- **100 matches per name is the maximum.** Higher values are capped at 100 with a warning instead of failing the run.
- **An unknown country code returns nothing, not an error.** The empty row names the filter used, so a typo in the code can be told apart from a place that does not exist.
- **Every name produces at least one row.** A lookup with no match returns a row with `_error: "no_results"`.
- **`featureLabel` is left empty** for rare place types outside the known list, rather than guessed.

# Actor input Schema

## `places` (type: `array`):

One name per line — a city, town, mountain or region. Names shorter than two characters match nothing.

## `language` (type: `string`):

Changes both the place name and the country name — München/Deutschland in German, Munich/Germany in English. Recorded on every row.

## `countryCode` (type: `string`):

Optional two-letter ISO code, e.g. US or AU — useful for names that repeat worldwide, like Springfield. An unrecognised code returns no results rather than an error.

## `maxResultsPerPlace` (type: `integer`):

The API serves at most 100 per name and has no paging, so 100 is the hard ceiling. Higher values are clamped.

## `proxyConfiguration` (type: `object`):

Optional and not needed. Open-Meteo is a keyless public API with no anti-bot layer.

## Actor input object example

```json
{
  "places": [
    "Berlin",
    "Munich",
    "Jakarta"
  ],
  "language": "en",
  "maxResultsPerPlace": 10
}
```

# Actor output Schema

## `results` (type: `string`):

One row per scraped record, stored in the run's default dataset.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "places": [
        "Berlin",
        "Munich",
        "Jakarta"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("xtracto/open-meteo-geocoding").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "places": [
        "Berlin",
        "Munich",
        "Jakarta",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("xtracto/open-meteo-geocoding").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "places": [
    "Berlin",
    "Munich",
    "Jakarta"
  ]
}' |
apify call xtracto/open-meteo-geocoding --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,xtracto/open-meteo-geocoding"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/ZafRZJJNV2p4hlAcB/builds/1TXjAi2UTbRb6qtJn/openapi.json
