Wikipedia

List Wikipedia pages near a place

List Wikipedia pages near a coordinate or a named page, within a radius.

GET/v1/wikipedia/geosearch
1credit
x-api-keystringheader

API key (`sfk_...`)

Parameters
6
langstringquery

Wikimedia edition code, e.g. `en`, `de`, `ja`, `simple` or `zh-min-nan`. Default: `en`.

latnumberquery

Latitude, -90 to 90. Must be paired with `lon`.

≥ -90 · ≤ 90

lonnumberquery

Longitude, -180 to 180. Must be paired with `lat`.

≥ -180 · ≤ 180

titlestringquery

Page whose coordinates to search around, instead of `lat`/`lon`.

radiusintegerquery

Radius in metres, 10 to 10,000. Default: 10,000.

≥ 10 · ≤ 10000

limitintegerquery

Results to return, 1 to 500. Default: 50. The answer is the nearest results up to this number; there is no continuation.

≥ 1 · ≤ 500

Response fields
29

Endpoint-specific response payload.

datalookupStatus
string

Whether the entity, page or data set exists. A missing entity is `not_found`; an existing entity with no rows is `found` with `empty: true`.

one of: found, not_found

datalang
string

Edition code.

datalat
numbernullable

Latitude searched around.

datalon
numbernullable

Longitude searched around.

datatitle
stringnullable

Page searched around, when one was named.

dataradius
integer

Radius in metres.

Pages near the point, nearest first.

dataresults[]pageId
integernullable

Page id.

dataresults[]ns
integernullable

Namespace id.

dataresults[]title
string

Title.

dataresults[]lat
numbernullable

Latitude; null when unknown.

dataresults[]lon
numbernullable

Longitude; null when unknown.

dataresults[]dist
numbernullable

Distance from the query point in metres.

dataresults[]primary
booleannullable

Whether this is the primary point.

dataresults[]type
stringnullable

Place type.

dataresults[]name
stringnullable

Place name.

dataresults[]dim
numbernullable

Size hint in metres.

dataresults[]country
stringnullable

Country code.

dataresults[]region
stringnullable

Region code.

dataresults[]globe
stringnullable

Globe.

Always `hasMore: false` with no next cursor: results stop at `limit` (at most 500).

datapagehasMore
boolean

Whether another page is available.

datapagenextCursor
stringnullable

Cursor to pass in the next request when more pages exist; null on the last page.

dataempty
boolean

Whether the answer is a valid empty result rather than missing.

Metadata describing the request and billing outcome.

metarequestId
string

Unique request identifier for tracing this API call.

min 1 chars

metacreditsCharged
integer

Credits charged for this request.

≥ 0

metaversion
string

Public API version that served the response.

one of: v1

Code example

curl "https://api.socialfetch.dev/v1/wikipedia/geosearch?title=Eiffel%20Tower" \
  -H "x-api-key: YOUR_API_KEY"

Responses

List Wikipedia pages near a place