The Fifth World

Get nearby places

This endpoint returns an array of pages for places near a set of coordinates, with the ability to set what threshold to consider as “near.”

Request

Path Parameters
Query Parameters Value
lat The latitude of your starting point.
lon The longitude of your starting point.
dist Optional. The distance in meters to look from the starting point. This defaults to 10,000 (10 km) if you don’t provide anything.

Examples

Example Request
GET /v1/near/51.178889/-1.826111/25000 HTTP/1.1 Host: api.thefifthworld.com

Response

If you don’t provide a latitude and longitude, the API responds with a 500 HTTP response. If you do provide both a latitude and a longitude, the endpoint responds with a 200 HTTP status and a JSON object providing an array of pages that describe places within the search radius.

Page Object
Property Value Type Value
id number The page’s unique numerical ID.
title string The title of the page.
description string The page’s description. It appears in the page’s header provided to search engines, social media, and other such bots and spiders.
slug string A string used to create the page’s unique path.
path string The unique path of this page on the Fifth World website. If you add https://thefifthworld.com to the front of this string, you’ll have its URL. By default, we create this string by taking the path of the page’s parent and appending a / and the page’s own slug to it.
parent number The unique numerical ID of this page’s parent page. If equal to 0, that means that this page does not have a parent.
data object Any structured data associated with the current version fo the page.
depth number How “deep” the page appears in the overall page hierarchy. A page that has no parent has a depth of 0. Such a page’s child would have a depth of 1, and if that page has a child, its depth will equal 2. If you wanted to trace the lineage of a page back to a “root” page that has no parents, this number tells you how many pages you will need to trace to get there.
permissions object This object has three properties: read (a boolean that indicates if you have read permission for this page, which should alwways equal true), write (a boolean that indicates if you have write permission for this page), and code. This last three-digit code uses the same conventions as Unix permissions, with the owner understood as the person who created the page, the group understood as authenticated members of the Fifth World, and the world understood as the general public. Pages default to 774, meaning that any authenticated member of the Fifth World can edit them, and anyone in the world can read them. A hidden page has a value of 700, allowing its owner to see and edit it, but no one else. A locked page has a value of 444, allowing anyone to see it, but only administrators to edit it.
type string The page’s type.
tags object An object that provides the key/value pairs of the page’s tags.
location object or boolean If a page has a location associated with it (as pages of type Place should), this property provides an object, which itself provides two properties, both numbers: lat (which provides the location’s latitude) and lon (which provides the location’s longitude). If a page does not have any location associated with it, this property equals false.
likes array This property provides an array of the unique member ID’s of everyone who has liked this page.
files array This property provides an array of File objects (see below).
owner object The page’s owner (the person who first created it). This object includes properties id (the member’s unique numerical ID) and name (the string that this member has provided for hens name).
history array This property provides an array of Change objects (see below), providing the history of changes made to this page.
lineage array This property includes an array of this page’s “ancestors,” so if this page has a parent, a Page object for that page will appear in this array, and if that page has a parent, a Page object for its parent will also appear in the array. The “root” page (the one that has no parent of its own) appears first, and the page’s direct parent comes last. If the page has no parent, then you will find an empty array here.
File Object
Property Value Type Value
name string The unique key used to find the file on the CDN.
thumbnail string The unique key used to find the file’s thumbnail on the CDN. Only images have thumbnails.
mime string The MIME type of this file.
size number The file’s size in bytes.
readableSize string The file’s size, parsed into a human-readable string (e.g., if size equals 104,864, then readableSize will equal 104.9 kB).
page number The unique numerical ID of the page this file belongs to.
timestamp number When the uploader uploaded this file, presented as a Unix Epoch timestamp (the number of seconds since midnight on 1 January 1970 UTC).
uploader number The unique numerical ID of the member who uploaded this file.
urls object An object with two properties: full (providing the URL from which you can access the full file on the CDN) and thumbnail (providing the URL from which you can access the thumbnail on the CDN). Only images have thumbnails.
Change Object
Property Value Type Value
id number A unique numerical ID for this change.
timestamp string The time when this change happened.
msg string The commit message that the editor provided to explain the change and why hen made it.
content object An object providing the content of the changes made. Many of these properties map to those in the Page object, but they usually include the body property as well. This property includes the unparsed wikitext of the page. When you view the page, the content displayed comes from the body property of the most recent change made, parsed into HTML.
editor object An object with two properties: id (the unique numerical ID of the member who made this change) and name (the name that the member who made this change provided for henself).

Example

Example Response
[ { "id": 44377, "title": "Stonehenge", "description": "Stonehenge has stood on the Salisbury Plain of the River Avon's watershed for some 5,000 years.", "slug": "stonehenge", "path": "/eurasia/europe/british-isles/avon/stonehenge", "parent": 44376, "depth": 4, "permissions": 774, "type": "Place", "tags": {}, "location": { "lat": 51.178889, "lon": -1.826111 }, "likes": [], "files": [], "owner": { "id": 1004, "name": "Jason Godesky" }, "history": [ { "id": 164312, "timestamp": "2020-11-26T00:29:53.000Z", "msg": "", "content": { "title": "Stonehenge", "path": "/eurasia/europe/british-isles/avon/stonehenge", "parent": "/eurasia/europe/british-isles/avon", "body": "**Stonehenge** has stood on the Salisbury Plain of the [[River Avon|River Avon's watershed]] for some 5,000 years.\r\n\r\n[[Location:51.178889,-1.826111]]", "description": "", "image": "", "msg": "" }, "editor": { "name": "Jason Godesky", "id": 1004 } } ], "lineage": [ { "id": 245, "title": "Eurasia", "description": "Eurasia spans across a greater area than any other continent. It lies primarily in the eastern and northern hemispheres, stretching from the Atlantic Ocean to the Pacific.", "slug": "eurasia", "path": "/eurasia", "parent": 0, "depth": 0, "permissions": 774, "type": "Continent", "tags": {}, "location": false, "owner": { "id": 1004, "name": "Jason Godesky" } }, { "id": 44339, "title": "Europe", "description": "Europe lies at the western end of Eurasia. Many Europeans have deemed this peninsula a continent unto itself, but this has little to do with geography, and much more to do with history.", "slug": "europe", "path": "/eurasia/europe", "parent": 245, "depth": 1, "permissions": 774, "type": "Region", "tags": {}, "location": false, "owner": { "id": 1004, "name": "Jason Godesky" } }, { "id": 44375, "title": "British Isles", "description": "The British Isles", "slug": "british-isles", "path": "/eurasia/europe/british-isles", "parent": 44339, "depth": 2, "permissions": 774, "type": "Region", "tags": {}, "location": false, "owner": { "id": 1004, "name": "Jason Godesky" } }, { "id": 44376, "title": "River Avon", "description": "The River Avon and its watershed", "slug": "river-avon", "path": "/eurasia/europe/british-isles/avon", "parent": 44375, "depth": 3, "permissions": 774, "type": "Watershed", "tags": {}, "location": false, "owner": { "id": 1004, "name": "Jason Godesky" } } ] } ]