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.

Try it
Ready-made, maintained by usPlaces, 15 fieldsv1.0

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

Latitudeoptional
Latitude of the center point in decimal degrees, such as 43.6426 (south is negative).
Example: 43.6426
Longitudeoptional
Longitude of the center point in decimal degrees, such as -79.3871 (west is negative).
Example: -79.3871
Around articleoptional
Instead of coordinates: the title of a Wikipedia article whose location is the center, such as CN Tower. That article itself is left out. Used only when latitude and longitude are empty.
Example: CN Tower
Radius moptional
Search radius in meters, from 10 to 10,000. Default 1,000.
Example: 1000
Languageoptional
Wikipedia language edition as its code, such as en, fr, de, es or ja. Default en.
Example: en
Include summaryoptional
Add the opening sentence or two of each article as summary. Default off.

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
Endpoint
POSThttps://pullrow.dev/v1/apis/wikipedia-nearby/run
  • Small runs answer in the same request; longer ones answer 202 with a run to poll.
  • fields returns only the fields you name. The examples send the ones picked on this page.
  • Idempotency-Key is optional. A retry with it is never charged twice.
  • You pay for records returned. Zero records cost zero.

Every run option, explained

Calling it needs a key
10,000 free records of this API to start. No card.
curl
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.

latitudenumber
Latitude of the center point in decimal degrees, such as 43.6426 (south is negative).
example: 43.6426
longitudenumber
Longitude of the center point in decimal degrees, such as -79.3871 (west is negative).
example: -79.3871
around_articletext
Instead of coordinates: the title of a Wikipedia article whose location is the center, such as CN Tower. That article itself is left out. Used only when latitude and longitude are empty.
example: CN Tower
radius_mnumber
Search radius in meters, from 10 to 10,000. Default 1,000.
default: 1000example: 1000
languagetext
Wikipedia language edition as its code, such as en, fr, de, es or ja. Default en.
default: enexample: en
include_summaryyes/no
Add the opening sentence or two of each article as summary. Default off.
default: falseexample: true

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

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 nameTypeShown on this page asFilled
page_idtextPage ID (hidden)3 of 3
titletextTitle3 of 3
urllinkLink3 of 3
distance_mnumberDistance m3 of 3
latitudenumberLatitude3 of 3
longitudenumberLongitude3 of 3
place_typetextPlace type3 of 3
country_codetextCountry code3 of 3
region_codetextRegion code3 of 3
descriptiontextDescription3 of 3
wikidata_idtextWikidata ID (hidden)3 of 3
imageimage linkImage3 of 3
summarytextSummary3 of 3
article_bytesnumberArticle bytes3 of 3
languagetextLanguage3 of 3

How it reads the site

Runs on a reader we built and maintain by hand for this site.

Sample records

Sample records
RecordTitleDistance mPlace typeDescriptionSummaryArticle bytesLanguageLatitudeLongitudeCountry codeRegion codeLinkImage
1CN Tower5.1landmarkCommunications and observation tower in Toronto, CanadaThe 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,257en43.642556-79.387083CAONen.wikipedia.org/wiki/CN_Towerthumb.wikimedia.org/wikipedia/commons/thumb/6/6e/CN_Tower_logo.svg/330px-CN_Tower_logo.svg.png
2CBL-FM13.7landmarkCBC Music radio station in Toronto, CanadaCBL-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,809en43.6425-79.3872CAONen.wikipedia.org/wiki/CBL-FMthumb.wikimedia.org/wikipedia/commons/thumb/1/1c/Cbc_music_toronto_2019.svg/330px-Cbc_music_toronto_2019.svg.png
3CHIN (AM)13.7landmarkMultilingual radio station in TorontoCHIN (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,268en43.6425-79.3872CAONen.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.
Known limits
  • 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.