Wikipedia Places Nearby API
Wikipedia articles about places near a point or near a named landmark, nearest first: title, link, distance in meters, coordinates, place type, country and region codes, short description, Wikidata id, lead image and, on request, a short summary. Any Wikipedia language.
$0.50 per 1,000 records
You pay only for the records you get. Zero records cost zero. 10,000 free records of this API to start (5,000 at the base price of $1 per 1,000), no card.
Data from en.wikipedia.org/w/api.php?action=help&modules=query%2Bgeosearch
Get this data
Try it here with a few records, download the sample, fill a Google Sheet, or call it from your own code.
Try it
Run it on this page, or call it from your code with the endpoint in the developer section. A free key covers 10,000 records of this API, no card. Create a free key
For developers: the API and MCPThe endpoint, code in curl, JavaScript and Python, every input, and files for your tools
- Small runs answer in the same request; longer ones answer
202with a run to poll. fieldsreturns only the fields you name. The examples send the ones picked on this page.Idempotency-Keyis optional. A retry with it is never charged twice.- You pay for records returned. Zero records cost zero.
curl -X POST "https://pullrow.dev/v1/apis/wikipedia-nearby/run" \
-H "Authorization: Bearer $PULLROW_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":{"latitude":43.6426},"max_items":50}'Inputs
Send them as input in the request body. Leave one out to use its default.
What's in each record
15 fields: 13 here, 2 technical ones under Technical details.
Basics
- Title
Article title, usually the place's name.
Example CN Tower
- Distance m
Straight-line distance from the center point in meters.
Example 5.1
- Place type
Kind of place from the article's coordinate tag, such as landmark, city, railwaystation, edu, airport or mountain.
Example landmark
- Description
Wikipedia's short description of the article, such as Communications and observation tower in Toronto, Canada.
Example Communications and observation tower in Toronto, Canada
- Summary
Opening sentence or two of the article in plain text, when include_summary is on.
Example The CN Tower (French: Tour CN) is a 553.3-metre-high (1,815.3 ft) communications and observation tower in Toronto,…
- Article bytes
Size of the article in bytes; longer articles are usually better-known places.
Example 74,257
- Language
Code of the Wikipedia language edition the article comes from.
Example en
Location
- Latitude
Latitude of the article's main point.
Example 43.642556
- Longitude
Longitude of the article's main point.
Example -79.387083
- Country code
Two-letter ISO 3166-1 country code from the article's coordinate tag, such as CA.
Example CA
- Region code
Region part of the ISO 3166-2 code from the coordinate tag, such as ON for Ontario.
Example ON
Links
- Link
Link to the article on Wikipedia.
Example en.wikipedia.org/wiki/CN_Tower
Pictures and media
- Image
Link to the article's lead picture, about 320 pixels wide.
Example Open the image
Technical detailsField names and types for developers, and the 2 fields hidden above
Hidden by default
These 2 fields come with each record too. They are internal codes, notes about how the record was read or a copy of what was searched for, so the lists above leave them out.
- Page ID
page_idWikipedia's id of the article in this language edition. - Wikidata ID
wikidata_idThe matching Wikidata item, such as Q134883, for joining other open data.
Field names and types
The names your code reads in each record. "Filled" counts how many of the 3 sample records carry the field.
| Field name | Type | Shown on this page as | Filled |
|---|---|---|---|
page_id | text | Page ID (hidden) | 3 of 3 |
title | text | Title | 3 of 3 |
url | link | Link | 3 of 3 |
distance_m | number | Distance m | 3 of 3 |
latitude | number | Latitude | 3 of 3 |
longitude | number | Longitude | 3 of 3 |
place_type | text | Place type | 3 of 3 |
country_code | text | Country code | 3 of 3 |
region_code | text | Region code | 3 of 3 |
description | text | Description | 3 of 3 |
wikidata_id | text | Wikidata ID (hidden) | 3 of 3 |
image | image link | Image | 3 of 3 |
summary | text | Summary | 3 of 3 |
article_bytes | number | Article bytes | 3 of 3 |
language | text | Language | 3 of 3 |
How it reads the site
Runs on a reader we built and maintain by hand for this site.
Save as pipeline
A pipeline remembers this API, your inputs and the fields you picked. It can run on a schedule and email you the results.
Sample records
| Record | Title | Distance m | Place type | Description | Summary | Article bytes | Language | Latitude | Longitude | Country code | Region code | Link | Image |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | CN Tower | 5.1 | landmark | Communications and observation tower in Toronto, Canada | The CN Tower (French: Tour CN) is a 553.3-metre-high (1,815.3 ft) communications and observation tower in Toronto, Ontario, Canada. Completed in 1976, it is located in downtown Toronto, built on the former Railway Lands. | 74,257 | en | 43.642556 | -79.387083 | CA | ON | en.wikipedia.org/wiki/CN_Tower | thumb.wikimedia.org/wikipedia/commons/thumb/6/6e/CN_Tower_logo.svg/330px-CN_Tower_logo.svg.png |
| 2 | CBL-FM | 13.7 | landmark | CBC Music radio station in Toronto, Canada | CBL-FM (94.1 MHz) is the flagship station of the CBC Music network. It is a non-commercial station, licensed to Toronto, Ontario, and is owned by the Canadian Broadcasting Corporation. | 9,809 | en | 43.6425 | -79.3872 | CA | ON | en.wikipedia.org/wiki/CBL-FM | thumb.wikimedia.org/wikipedia/commons/thumb/1/1c/Cbc_music_toronto_2019.svg/330px-Cbc_music_toronto_2019.svg.png |
| 3 | CHIN (AM) | 13.7 | landmark | Multilingual radio station in Toronto | CHIN (1540 kHz) is a commercial AM radio station in Toronto, Ontario, Canada. It is owned by CHIN Radio/TV International, and broadcasts a multilingual radio format. | 15,268 | en | 43.6425 | -79.3872 | CA | ON | en.wikipedia.org/wiki/CHIN_(AM) | thumb.wikimedia.org/wikipedia/commons/thumb/0/04/Radio_Station_CHIN_Toronto.jpg/330px-Radio_Station_CHIN_Toronto.jpg |
Sample records from the example output this API publishes. Email addresses and phone numbers in them are masked. Hover over a column name to see the field name your code reads.
Reliability
Counted from real runs. Our own health checks are left out. A run succeeded when it finished and the site neither blocked it nor broke it.
Incidents and repairs
How it is kept working What a repair can't do
A ready-made API, maintained by us. It is not part of the daily check or the automatic rebuild yet.
- You pay only for records returned. A run that returns none costs nothing.
- At most 500 places per run, the nearest first, within 10 km of the center. A busy city center can hold more than 500 articles inside the radius: shrink the radius or move the point to reach the others.
- Only articles that carry coordinates on Wikipedia appear, each at its main point, so a long road or river shows up only where its main coordinates sit.
- place_type, country_code and region_code come from the article's own coordinate tag and are empty for roughly 30 to 40 percent of articles; image is empty for about one in five, when an article has no lead picture.
- Titles, descriptions and summaries are Wikipedia's, under the CC BY-SA licence: credit Wikipedia and link the article when you show them. Wikipedia does not endorse this API.
- summary is filled only when include_summary is on: the opening sentence or two of the article as plain text, at most about 420 characters. It makes large runs a little slower.
- Wikipedia changes all the time, so a later run can return different articles; distance_m is the straight-line distance from the center, as Wikipedia reports it.
Version history
A run uses the live version unless the request names another one with version.
Manage this API
Only your workspace sees this part.
Automatic repair
Off: a rebuilt version is stored and waits for you in the version history.
Delete this API
Removes the API, its versions and the saved records of its runs. Calls to its address then answer 404. Records already charged stay charged. This cannot be undone.