NAV Navbar
shell

Introduction

Welcome to the Lonely Planet Content API! You can use the API to access data related to locations around the world and their respective points of interest (POIs).

This API is language agnostic and is based on sending a JSON formatted payload to our API after which you will receive a JSON formatted response to your request.

Authentication

The Content API uses API keys to provide access to the API. It expects the API key to be included in all API requests to the server in a header that looks like this:

X-API-Key: API_KEY_GOES_HERE

To authorize, specify "X-API-Key:" in the header of the request with your API key as the value. For example:

curl  https://api.demo.content-api.lonelyplanet.com/continents \
  --header "Content-Type: application/json" \
  --header "X-API-Key: API_KEY_GOES_HERE" \
  --request POST \
  --data '{
    "start": 0,
    "limit": 10
}'

Make sure to replace API_KEY_GOES_HERE with your API key.

Continents

The continents endpoint allows you to query for all continents specified in your configuration.

Parameters

Parameter Default Type Description
start 0 number Which records to start querying data from
limit 1 number How many records to return
order "" string How to order the data being returned (SQL syntax)
name "" string Specify a single record to return based using Name
continentID "" string Specify a single record to return using ID

Get All Continents

curl  https://api.demo.content-api.lonelyplanet.com/continents \
  --header "Content-Type: application/json" \
  --header "X-API-Key: API_KEY_GOES_HERE" \
  --request POST \
  --data '{
    "start": 0,
    "limit": 3
}'

The above command returns JSON structured like this:

{
  "start": 0,
  "limit": 3,
  "data": {
    "continents": [
      {
        "ContinentId": "358197",
        "Name": "Central America"
      },
      {
        "ContinentId": "361211",
        "Name": "North America"
      },
      {
        "ContinentId": "362990",
        "Name": "South America"
      }
    ]
  }
}

Get Continent by ID

curl  https://api.demo.content-api.lonelyplanet.com/continents \
  --header "Content-Type: application/json" \
  --header "X-API-Key: API_KEY_GOES_HERE" \
  --request POST \
  --data '{
    "start": 0,
    "limit": 1,
    "continentID": "362990"
}'

The above command returns JSON structured like this:

{
  "start": 0,
  "limit": 10,
  "data": {
    "continents": [
      {
        "ContinentId": "358537",
        "Name": "South America"
      }
    ]
  }
}

Get Continent by Name

curl  https://api.demo.content-api.lonelyplanet.com/continents \
  --header "Content-Type: application/json" \
  --header "X-API-Key: API_KEY_GOES_HERE" \
  --request POST \
  --data '{
    "start": 0,
    "limit": 1,
    "name": "South American"
}'

The above command returns JSON structured like this:

{
  "start": 0,
  "limit": 10,
  "data": {
    "continents": [
      {
        "ContinentId": "358197",
        "Name": "South America"
      }
    ]
  }
}

Countries

The countries endpoint allows you to query for all countries specified in your configuration.

Parameters

Parameter Default Type Description
start 0 number Which records to start querying data from
limit 1 number How many records to return
order "" string How to order the data being returned (SQL syntax)
name "" string Specify a single record to return using Name
continentID "" string Specify records to return using the the Continent ID
curl  https://api.demo.content-api.lonelyplanet.com/countries \
  --header "Content-Type: application/json" \
  --header "X-API-Key: API_KEY_GOES_HERE" \
  --request POST \
  --data '{
    "start": 0,
    "limit": 3
}'

The above command returns JSON structured like this:

{
  "start": 0,
  "limit": 3,
  "data": {
    "countries": [
      {
        "countryId": "1001857",
        "name": "Palestinian Territories",
        "continentId": "361008"
      },
      {
        "countryId": "1001862",
        "name": "Israel",
        "continentId": "361008"
      },
      {
        "countryId": "1002117",
        "name": "Malaysia",
        "continentId": "355738"
      }
    ]
  }
}

HTTP Request

POST https://api.demo.content-api.lonelyplanet.com/countries

This endpoint retrieves all countries.

Get Country by Name

curl  https://api.demo.content-api.lonelyplanet.com/countries \
  --header "Content-Type: application/json" \
  --header "X-API-Key: API_KEY_GOES_HERE" \
  --request POST \
  --data '{
    "start": 0,
    "limit": 3,
    "name": "Canada"
}'

The above command returns JSON structured like this:

{
  "start": 0,
  "limit": 3,
  "data": {
    "countries": [
      {
        "countryId": "361212",
        "name": "Canada",
        "continentName": "361211"
      }
    ]
  }
}

HTTP Request

POST https://api.demo.content-api.lonelyplanet.com/countries

This request retrieves a continent with a matching countryName.

Get Country by countryID

curl  https://api.demo.content-api.lonelyplanet.com/countries \
  --header "Content-Type: application/json" \
  --header "X-API-Key: API_KEY_GOES_HERE" \
  --request POST \
  --data '{
    "start": 0,
    "limit": 3,
    "countryId": "361212"
}'

The above command returns JSON structured like this:

{
  "start": 0,
  "limit": 3,
  "data": {
    "countries": [
      {
        "countryId": "361212",
        "name": "Canada",
        "continentName": "361211"
      }
    ]
  }
}

HTTP Request

Cities

The cities endpoint allows you to query for all cities specified in your configuration.

Parameters

Parameter Default Type Description
cityId "" string The name of a specific record to return
name "" string The name of a specific record to return
start 0 number Which records to start querying data from
limit 1 number How many records to return
order "" string How to order the data being returned (SQL syntax)
latitude "" string The latitude value to search on
longitude "" string The longitude value to search on
distance 0 number If specified, distance in meters from the latitude/longitude to search within.
curl  https://docs.demo.content-api.lonelyplanet.com \
  --header "Content-Type: application/json" \
  --header "X-API-Key: API_KEY_GOES_HERE" \
  --request POST \
  --data '{
    "start": 0,
    "limit": 1
}'

HTTP Request

POST https://docs.demo.content-api.lonelyplanet.com

This request retrieves all cities.

Get City by Name

curl  https://docs.demo.content-api.lonelyplanet.com \
  --header "Content-Type: application/json" \
  --header "X-API-Key: API_KEY_GOES_HERE" \
  --request POST \
  --data '{
    "start": 0,
    "limit": 1,
    "name": [
        "Chicago"
    ]
}'

The above command returns JSON structured like this:


HTTP Request

POST https://docs.demo.content-api.lonelyplanet.com

This request retrieves all cities matching the cityIds specified.

Get City by Latitude and Long

curl  https://docs.demo.content-api.lonelyplanet.com \
  --header "Content-Type: application/json" \
  --header "X-API-Key: API_KEY_GOES_HERE" \
  --request POST \
  --data '{
    "start": 0,
    "limit": 1,
    "latitude": "41.881832",
    "longitude": "-87.623177"
}'

The above command returns JSON structured like this:


HTTP Request

POST https://docs.demo.content-api.lonelyplanet.com

This request retrieves all cities with boundaries matching the latitude/longitude specified.

Get Cities by Distance from Latitude and Longitude

curl  https://docs.demo.content-api.lonelyplanet.com \
  --header "Content-Type: application/json" \
  --header "X-API-Key: API_KEY_GOES_HERE" \
  --request POST \
  --data '{
    "start": 0,
    "limit": 1,
    "latitude": "41.881832",
    "longitude": "-87.623177",
    "distance": 2000
}'

The above command returns JSON structured like this:


HTTP Request

POST https://docs.demo.content-api.lonelyplanet.com

This request retrieves all cities with boundaries matching the latitude/longitude within the distance specified.

POIs

The pois endpoint allows you to query for all pois specified in your configuration.

Parameters

Parameter Default Type Description
start 0 number Which records to start querying data from
limit 1 number How many records to return
order "" string How to order the data being returned (SQL syntax)
name "" string Specify records to return using the city's name
cityId "" string Specify records to return using the Continent ID
hasImage false bool Only returns records with an associated image

Get POIs by cityId

curl  https://api.demo.content-api.lonelyplanet.com/pois \
  --header "Content-Type: application/json" \
  --header "X-API-Key: API_KEY_GOES_HERE" \
  --request POST \
  --data '{
    "start": 0,
    "limit": 3,
    "order": "",
    "cityIds": [
        "361932"
    ]
}'

The above command returns JSON structured like this:

{
  "start": 0,
  "limit": 3,
  "data": {
    "cityIds": ["361932"],
    "poiIds": null,
    "neighborhoodIds": null,
    "pois": [
      {
        "poiId": "1016707",
        "cityId": "361932",
        "neighborhoodId": "1319210",
        "name": "Buckingham Athletic Club Hotel",
        "nameClean": "Buckingham Athletic Club Hotel",
        "shortDescription": "<p>On the 40th floor of the Chicago Stock Exchange building, this 21-room hotel isn't easy to find. The benefit if you do? It's quiet (on weekends and evenings especially) and has expansive views. Elegant rooms are so spacious they’d be considered suites elsewhere. Lots of freebies add to the excellence, including access to the namesake gym with lap pool.</p>",
        "longDescription": "<p>On the 40th floor of the Chicago Stock Exchange building, this 21-room hotel isn't easy to find. The benefit if you do? It's quiet (on weekends and evenings especially) and has expansive views. Elegant rooms are so spacious they’d be considered suites elsewhere. Lots of freebies add to the excellence, including access to the namesake gym with lap pool.</p>",
        "latitude": 41.876631,
        "longitude": -87.631974,
        "streetAddress": "440 S LaSalle St",
        "url": "http://www.thebuckinghamclub.com",
        "price": "r $200-280",
        "priceTier": "2",
        "hours": "",
        "phoneNumbers": "[\"+1 312 663 8910\"]",
        "emails": "[]",
        "transports": "[{\"type\": \"Metro\", \"description\": \"Brown, Orange, Purple, Pink Line to LaSalle\"}]",
        "isTopChoice": 0,
        "score": 4,
        "publishedAt": "2019-02-10",
        "fieldSources": "",
        "providers": "atlas",
        "imageId": "",
        "parentId": "",
        "strapLine": "",
        "imageUrl": "",
        "dominantColor": "",
        "source": "",
        "subtypeId": "f00a5f9a-3fee-441d-8b22-7ddc2dfd3b92",
        "subTypeName": "Boutique Hotel",
        "subTypeNameClean": "Boutique Hotel",
        "typeName": "Sleep",
        "typeActiveType": "1",
        "typeOrder": 3,
        "typeIconId": "sleep"
      },
      {
        "poiId": "1016736",
        "cityId": "361932",
        "neighborhoodId": "1319218",
        "name": "Hyatt Regency McCormick Place",
        "nameClean": "Hyatt Regency McCormick Place",
        "shortDescription": "<p>If you’re staffing a trade-show booth at <a class=\"poi\" href=\"/pois/378723\">McCormick Place</a>, you can’t beat the short walk to your bed in this attached hotel, where lobby monitors keep track of meeting schedules. However, if you’re not a conventioneer, even the skyline views and comfy beds mightn't be reason enough to stay in this isolated 1258-room behemoth, 2.5 miles south of the Loop.</p>",
        "longDescription": "<p>If you’re staffing a trade-show booth at <a class=\"poi\" href=\"/pois/378723\">McCormick Place</a>, you can’t beat the short walk to your bed in this attached hotel, where lobby monitors keep track of meeting schedules. However, if you’re not a conventioneer, even the skyline views and comfy beds mightn't be reason enough to stay in this isolated 1258-room behemoth, 2.5 miles south of the Loop.</p>",
        "latitude": 41.85191,
        "longitude": -87.618606,
        "streetAddress": "2233 S Martin Luther King Jr Dr",
        "url": "http://www.hyatt.com",
        "price": "r $189-299",
        "priceTier": "2",
        "hours": "",
        "phoneNumbers": "[\"+1 312 567 1234\"]",
        "emails": "[]",
        "transports": "[{\"type\": \"Metro\", \"description\": \"Green Line to Cermack-McCormick Pl\"}]",
        "isTopChoice": 0,
        "score": 2,
        "publishedAt": "2019-08-09",
        "fieldSources": "",
        "providers": "atlas",
        "imageId": "",
        "parentId": "",
        "strapLine": "",
        "imageUrl": "",
        "dominantColor": "",
        "source": "",
        "subtypeId": "a41a66fc-f44d-4c2f-9974-c9eb60f49875",
        "subTypeName": "Hotel",
        "subTypeNameClean": "Hotel",
        "typeName": "Sleep",
        "typeActiveType": "1",
        "typeOrder": 3,
        "typeIconId": "sleep"
      },
      {
        "poiId": "1016748",
        "cityId": "361932",
        "neighborhoodId": "1319211",
        "name": "AC Hotel Chicago Downtown",
        "nameClean": "AC Hotel Chicago Downtown",
        "shortDescription": "<p>This eight-story property targets millennials and business travelers. The rooms, furnished in crisp shades of gray and white with hardwood floors, feel fresh and airy. Each has a multi-plug work space, free wi-fi and mini-refrigerator. It's a great location, within easy walking distance to loads of food and drink options. The small indoor pool and 4th-floor lounge add value.</p>",
        "longDescription": "<p>This eight-story property targets millennials and business travelers. The rooms, furnished in crisp shades of gray and white with hardwood floors, feel fresh and airy. Each has a multi-plug work space, free wi-fi and mini-refrigerator. It's a great location, within easy walking distance to loads of food and drink options. The small indoor pool and 4th-floor lounge add value.</p>",
        "latitude": 41.893485,
        "longitude": -87.625591,
        "streetAddress": "630 N Rush St",
        "url": "http://www.achotels.marriott.com",
        "price": "r $210-320",
        "priceTier": "2",
        "hours": "",
        "phoneNumbers": "[\"+1 312 981 6600\"]",
        "emails": "[]",
        "transports": "[{\"type\": \"Metro\", \"description\": \"Red Line to Grand\"}]",
        "isTopChoice": 0,
        "score": 3,
        "publishedAt": "2019-02-08",
        "fieldSources": "",
        "providers": "atlas",
        "imageId": "",
        "parentId": "",
        "strapLine": "",
        "imageUrl": "",
        "dominantColor": "",
        "source": "",
        "subtypeId": "a41a66fc-f44d-4c2f-9974-c9eb60f49875",
        "subTypeName": "Hotel",
        "subTypeNameClean": "Hotel",
        "typeName": "Sleep",
        "typeActiveType": "1",
        "typeOrder": 3,
        "typeIconId": "sleep"
      }
    ]
  }
}

HTTP Request

POST https://api.demo.content-api.lonelyplanet.com/pois

This request retrieves all pois matching the cityIds specified.

Get POI by poiId

curl  https://api.demo.content-api.lonelyplanet.com/pois \
  --header "Content-Type: application/json" \
  --header "X-API-Key: API_KEY_GOES_HERE" \
  --request POST \
  --data '{
    "start": 0,
    "limit": 3,
    "order": "",
    "poiIds": [
        "1016771"
    ]
}'

The above command returns JSON structured like this:

{
  "start": 0,
  "limit": 3,
  "data": {
    "cityIds": null,
    "poiIds": ["1016771"],
    "neighborhoodIds": null,
    "pois": [
      {
        "poiId": "1016771",
        "cityId": "361932",
        "neighborhoodId": "1319210",
        "name": "Hotel Monaco",
        "nameClean": "Hotel Monaco",
        "shortDescription": "<p>The Monaco's rooms are large, with bold-red window curtains, geometric carpeting and curlicued dark-wood headboards; window nooks let you sit and watch the street action below. Amenities such as dog beds for pooches, child-safety kits for families, a fitness facility and free wi-fi ensure the Monaco draws a mixed crowd of business travelers and holiday-makers.</p>",
        "longDescription": "<p>The Monaco's rooms are large, with bold-red window curtains, geometric carpeting and curlicued dark-wood headboards; window nooks let you sit and watch the street action below. Amenities such as dog beds for pooches, child-safety kits for families, a fitness facility and free wi-fi ensure the Monaco draws a mixed crowd of business travelers and holiday-makers.</p>",
        "latitude": 41.886496,
        "longitude": -87.62617,
        "streetAddress": "225 N Wabash Ave",
        "url": "http://www.monaco-chicago.com",
        "price": "r $269-399",
        "priceTier": "2",
        "hours": "",
        "phoneNumbers": "[\"+1 312 960 8500\"]",
        "emails": "[]",
        "transports": "[{\"type\": \"Metro\", \"description\": \"Brown, Orange, Green, Purple, Pink Line to State/Lake\"}]",
        "isTopChoice": 0,
        "score": 4,
        "publishedAt": "2019-02-10",
        "fieldSources": "",
        "providers": "atlas",
        "imageId": "",
        "parentId": "",
        "strapLine": "",
        "imageUrl": "",
        "dominantColor": "",
        "source": "",
        "subtypeId": "f00a5f9a-3fee-441d-8b22-7ddc2dfd3b92",
        "subTypeName": "Boutique Hotel",
        "subTypeNameClean": "Boutique Hotel",
        "typeName": "Sleep",
        "typeActiveType": "1",
        "typeOrder": 3,
        "typeIconId": "sleep"
      }
    ]
  }
}

HTTP Request

POST https://api.demo.content-api.lonelyplanet.com/pois

This request retrieves all pois matching the poiIds specified.

Get POIs by neighborhoodId

curl  https://api.demo.content-api.lonelyplanet.com/pois \
  --header "Content-Type: application/json" \
  --header "X-API-Key: API_KEY_GOES_HERE" \
  --request POST \
  --data '{
    "start": 0,
    "limit": 2,
    "order": "",
    "neighborhoodIds": [
        "1319212"
    ]
}'

The above command returns JSON structured like this:

{
  "start": 0,
  "limit": 2,
  "data": {
    "cityIds": null,
    "poiIds": null,
    "neighborhoodIds": ["1319212"],
    "pois": [
      {
        "poiId": "1016703",
        "cityId": "361932",
        "neighborhoodId": "1319212",
        "name": "Old Chicago Inn",
        "nameClean": "Old Chicago Inn",
        "shortDescription": "<p>Sure the street din may seep into this century-old, 10-room greystone building, but that’s the price you pay for being in a high-energy nightlife hub. Most of the chambers have wood floors and vintage accents; a few rooms share a bathroom. In addition to continental breakfast, you get a free dinner at the owner’s pub, Trader Todd’s, two doors down.</p>",
        "longDescription": "<p>Sure the street din may seep into this century-old, 10-room greystone building, but that’s the price you pay for being in a high-energy nightlife hub. Most of the chambers have wood floors and vintage accents; a few rooms share a bathroom. In addition to continental breakfast, you get a free dinner at the owner’s pub, Trader Todd’s, two doors down.</p>",
        "latitude": 41.940579,
        "longitude": -87.654301,
        "streetAddress": "3222 N Sheffield Ave",
        "url": "http://www.oldchicagoinn.com",
        "price": "r $135-190",
        "priceTier": "1",
        "hours": "",
        "phoneNumbers": "[\"+1 773 472 2278\"]",
        "emails": "[]",
        "transports": "[{\"type\": \"Metro\", \"description\": \"Red, Brown, Purple Line to Belmont\"}]",
        "isTopChoice": 0,
        "score": 3,
        "publishedAt": "2019-02-05",
        "fieldSources": "",
        "providers": "atlas",
        "imageId": "",
        "parentId": "",
        "strapLine": "",
        "imageUrl": "",
        "dominantColor": "",
        "source": "",
        "subtypeId": "a29f596f-146a-4bb9-a137-37c02039b274",
        "subTypeName": "B&B",
        "subTypeNameClean": "B&B",
        "typeName": "Sleep",
        "typeActiveType": "1",
        "typeOrder": 3,
        "typeIconId": "sleep"
      },
      {
        "poiId": "1016720",
        "cityId": "361932",
        "neighborhoodId": "1319212",
        "name": "Hotel Versey",
        "nameClean": "Hotel Versey",
        "shortDescription": "<p>High-spirited Hotel Versey plays off two themes: the Cubs (Wrigley Field is a mile away) and music history (touring indie bands often stayed here during its earlier, more humble incarnation). Quirky art on the subjects livens up otherwise standard rooms. It's in a dandy location: an easy amble to the lakefront's parks and beaches, and a 15-minute bus ride to downtown.</p>",
        "longDescription": "<p>High-spirited Hotel Versey plays off two themes: the Cubs (Wrigley Field is a mile away) and music history (touring indie bands often stayed here during its earlier, more humble incarnation). Quirky art on the subjects livens up otherwise standard rooms. It's in a dandy location: an easy amble to the lakefront's parks and beaches, and a 15-minute bus ride to downtown.</p>",
        "latitude": 41.932877,
        "longitude": -87.645417,
        "streetAddress": "644 W Diversey Pkwy",
        "url": "http://www.hotelversey.com",
        "price": "r $159-289",
        "priceTier": "2",
        "hours": "",
        "phoneNumbers": "[\"+1 773 525 7010\"]",
        "emails": "[]",
        "transports": "[{\"type\": \"Metro\", \"description\": \"Brown, Purple Line to Diversey\"}]",
        "isTopChoice": 0,
        "score": 3,
        "publishedAt": "2019-02-05",
        "fieldSources": "",
        "providers": "atlas",
        "imageId": "",
        "parentId": "",
        "strapLine": "",
        "imageUrl": "",
        "dominantColor": "",
        "source": "",
        "subtypeId": "a41a66fc-f44d-4c2f-9974-c9eb60f49875",
        "subTypeName": "Hotel",
        "subTypeNameClean": "Hotel",
        "typeName": "Sleep",
        "typeActiveType": "1",
        "typeOrder": 3,
        "typeIconId": "sleep"
      }
    ]
  }
}

HTTP Request

POST https://api.demo.content-api.lonelyplanet.com/pois

This request retrieves all pois matching the neighborhoodIds specified.

Get POIs by Distance from Latitude and Longitude

curl  https://api.demo.content-api.lonelyplanet.com/pois \
  --header "Content-Type: application/json" \
  --header "X-API-Key: API_KEY_GOES_HERE" \
  --request POST \
  --data '{
    "start": 0,
    "limit": 2,
    "latitude": "41.881832",
    "longitude": "-87.623177",
    "distance": 2000
}'

The above command returns JSON structured like this:

{
  "start": 0,
  "limit": 2,
  "data": {
    "cityIds": null,
    "poiIds": null,
    "neighborhoodIds": null,
    "pois": [
      {
        "poiId": "1016695",
        "cityId": "361932",
        "neighborhoodId": "1319209",
        "name": "Whitehall Hotel",
        "nameClean": "Whitehall Hotel",
        "shortDescription": "<p>This old-world hotel offers cozy rooms with vintage mahogany furniture and earth-toned wallpaper and carpeting. It’s popular with wedding parties; you’ll often see gown-clad beauties flowing by. Michigan Ave is superbly close. Free wi-fi.</p>",
        "longDescription": "<p>This old-world hotel offers cozy rooms with vintage mahogany furniture and earth-toned wallpaper and carpeting. It’s popular with wedding parties; you’ll often see gown-clad beauties flowing by. Michigan Ave is superbly close. Free wi-fi.</p>",
        "latitude": 41.898979,
        "longitude": -87.625891,
        "streetAddress": "105 E Delaware Pl",
        "url": "http://www.thewhitehallhotel.com",
        "price": "r $150-350",
        "priceTier": "2",
        "hours": "",
        "phoneNumbers": "[\"+1 312 944 6300\"]",
        "emails": "[]",
        "transports": "[{\"type\": \"Metro\", \"description\": \"Red Line to Chicago\"}]",
        "isTopChoice": 0,
        "score": 2,
        "publishedAt": "2019-02-06",
        "fieldSources": "",
        "providers": "atlas",
        "imageId": "",
        "parentId": "",
        "strapLine": "",
        "imageUrl": "",
        "dominantColor": "",
        "source": "",
        "subtypeId": "b4a42b36-a96f-4ead-bda8-510a6f668cc1",
        "subTypeName": "Historic Hotel",
        "subTypeNameClean": "Historic Hotel",
        "typeName": "Sleep",
        "typeActiveType": "1",
        "typeOrder": 3,
        "typeIconId": "sleep"
      },
      {
        "poiId": "1016714",
        "cityId": "361932",
        "neighborhoodId": "1319211",
        "name": "St Clair Hotel",
        "nameClean": "St Clair Hotel",
        "shortDescription": "<p>Opened in 2018, the St Clair is a Red Roof Inn that's been gussied up with modern furniture and bedding. The 208 rooms remain cramped, but now sport pillow-top mattresses, vintage Chicago photos, and crisp white-and-gray colors. It's still pretty basic, but rates can be low. Plus it's steps from the Michigan Ave shopping bonanza. Free wi-fi.</p>",
        "longDescription": "<p>Opened in 2018, the St Clair is a Red Roof Inn that's been gussied up with modern furniture and bedding. The 208 rooms remain cramped, but now sport pillow-top mattresses, vintage Chicago photos, and crisp white-and-gray colors. It's still pretty basic, but rates can be low. Plus it's steps from the Michigan Ave shopping bonanza. Free wi-fi.</p>",
        "latitude": 41.893421,
        "longitude": -87.622973,
        "streetAddress": "162 E Ontario St",
        "url": "http://www.thestclairhotel.com",
        "price": "r $159-279",
        "priceTier": "2",
        "hours": "",
        "phoneNumbers": "[\"+1 312 787 3580\"]",
        "emails": "[]",
        "transports": "[{\"type\": \"Metro\", \"description\": \"Red Line to Grand\"}]",
        "isTopChoice": 0,
        "score": 2,
        "publishedAt": "2019-02-10",
        "fieldSources": "",
        "providers": "atlas",
        "imageId": "",
        "parentId": "",
        "strapLine": "",
        "imageUrl": "",
        "dominantColor": "",
        "source": "",
        "subtypeId": "a41a66fc-f44d-4c2f-9974-c9eb60f49875",
        "subTypeName": "Hotel",
        "subTypeNameClean": "Hotel",
        "typeName": "Sleep",
        "typeActiveType": "1",
        "typeOrder": 3,
        "typeIconId": "sleep"
      }
    ]
  }
}

HTTP Request

POST https://api.demo.content-api.lonelyplanet.com/pois

This request retrieves all pois with boundaries matching the latitude/longitude within the distance specified.

Collections

Get collections

Parameters

Parameter Default Type Description
start 0 number Which records to start querying data from
limit 1 number How many records to return
order "" string How to order the data being returned (SQL syntax)
cityIds [] string array What cityIds to search on if any is specified
collectionIds [] string array What collectionIds to search on if any is specified
curl  https://api.demo.content-api.lonelyplanet.com/collections \
  --header "Content-Type: application/json" \
  --header "X-API-Key: API_KEY_GOES_HERE" \
  --request POST \
  --data '{
    "start": 0,
    "limit": 1,
    "order": ""
}'

The above command returns JSON structured like this:

{
  "start": 0,
  "limit": 1,
  "data": {
    "cityIds": ["362220"],
    "collections": [
      {
        "collectionId": "0018e4d7-3fd6-41fe-aaa5-6438eea27683",
        "name": "Shopping",
        "nameClean": "Shopping",
        "type": "BestOf",
        "category": "Shopping",
        "order": 1,
        "priority": 3,
        "cityId": "362220"
      }
    ],
    "pois": [
      {
        "poiId": "1129042",
        "cityId": "362220",
        "neighborhoodId": "1342221",
        "typeId": "311b7ff7-3bac-4c82-a12a-703129c257d0",
        "name": "Charleston Crafts Cooperative",
        "nameClean": "Charleston Crafts Cooperative",
        "shortDescription": "<p>A pricey, well-edited selection of contemporary South Carolina–made crafts, such as sweetgrass baskets, hand-dyed silks and wood carvings.</p>",
        "longDescription": "<p>A pricey, well-edited selection of contemporary South Carolina–made crafts, such as sweetgrass baskets, hand-dyed silks and wood carvings.</p>",
        "latitude": 32.7800643836151,
        "longitude": -79.9297264721377,
        "streetAddress": "161 Church St",
        "url": "http://www.charlestoncrafts.org",
        "price": "",
        "priceTier": "-1",
        "hours": "10am-6pm",
        "phoneNumbers": "[\"+1 843 723 2938\"]",
        "emails": "[]",
        "transports": "[]",
        "isTopChoice": 0,
        "score": 3,
        "publishedAt": "2018-08-28",
        "fieldSources": "",
        "providers": "atlas"
      }
    ]
  }
}

HTTP Request

POST https://api.demo.content-api.lonelyplanet.com/collections

This request retrieves all collections.

Search by cityId

curl  https://api.demo.content-api.lonelyplanet.com/collections \
  --header "Content-Type: application/json" \
  --header "X-API-Key: API_KEY_GOES_HERE" \
  --request POST \
  --data '{
    "start": 0,
    "limit": 2,
    "order": "",
    "cityIds": [
        "361932"
    ]
}'

The above command returns JSON structured like this:

{
  "start": 0,
  "limit": 2,
  "data": {
    "cityIds": ["361932"],
    "collections": [
      {
        "collectionId": "11c94143-efb5-4ae2-978d-ed96f0ca2605",
        "name": "Brunch Spots",
        "nameClean": "Brunch Spots",
        "type": "BestOf",
        "category": "Eating",
        "order": 11,
        "priority": 3,
        "cityId": "361932"
      },
      {
        "collectionId": "13fc4630-8216-4641-83eb-47950e42cf41",
        "name": "Eating",
        "nameClean": "Eating",
        "type": "BestOf",
        "category": "Eating",
        "order": 1,
        "priority": 3,
        "cityId": "361932"
      }
    ],
    "pois": [
      {
        "poiId": "1515892",
        "cityId": "361932",
        "neighborhoodId": "1319214",
        "typeId": "4999e608-28d9-4437-9f2c-1f5e3d9a080b",
        "name": "Dove's Luncheonette",
        "nameClean": "Dove's Luncheonette",
        "shortDescription": "<p>Sit at the retro counter for Tex-Mex plates of pork-shoulder posole and buttermilk fried chicken with chorizo-verde gravy. Dessert? It's pie, of course – maybe horchata, lemon cream or peach jalapeño, baked by <a class=\"poi\" href=\"/pois/1176338\">Hoosier Mama</a>. Soul music spins on a record player, tequila flows from the 70 bottles rattling behind the bar, and presto: all is right in the world.</p>",
        "longDescription": "<p>Sit at the retro counter for Tex-Mex plates of pork-shoulder posole and buttermilk fried chicken with chorizo-verde gravy. Dessert? It's pie, of course – maybe horchata, lemon cream or peach jalapeño, baked by <a class=\"poi\" href=\"/pois/1176338\">Hoosier Mama</a>. Soul music spins on a record player, tequila flows from the 70 bottles rattling behind the bar, and presto: all is right in the world.</p>",
        "latitude": 41.909519,
        "longitude": -87.677196,
        "streetAddress": "1545 N Damen Ave",
        "url": "http://www.doveschicago.com",
        "price": "mains $13-22",
        "priceTier": "2",
        "hours": "9am-10pm Mon-Thu, to 11pm Fri, 8am-11pm Sat, 8am-10pm Sun",
        "phoneNumbers": "[\"+1 773 645 4060\"]",
        "emails": "[]",
        "transports": "[{\"type\": \"Metro\", \"description\": \"Blue Line to Damen\"}]",
        "isTopChoice": 0,
        "score": 4,
        "publishedAt": "2019-02-11",
        "fieldSources": "",
        "providers": "atlas"
      },
      {
        "poiId": "1176342",
        "cityId": "361932",
        "neighborhoodId": "1319216",
        "typeId": "4999e608-28d9-4437-9f2c-1f5e3d9a080b",
        "name": "Meli Cafe",
        "nameClean": "Meli Cafe",
        "shortDescription": "<p>Meli is the Greek word for ‘honey,’ and it’s apt for this sweet breakfast spot. Cage-free eggs served over a bed of potatoes, spinach-and-feta omelets, seasonal berry crepes and the decadent French toast (made from challah bread dipped in vanilla-bean custard) start the day off right. Meli has a few outposts around town.</p>",
        "longDescription": "<p>Meli is the Greek word for ‘honey,’ and it’s apt for this sweet breakfast spot. Cage-free eggs served over a bed of potatoes, spinach-and-feta omelets, seasonal berry crepes and the decadent French toast (made from challah bread dipped in vanilla-bean custard) start the day off right. Meli has a few outposts around town.</p>",
        "latitude": 41.877702,
        "longitude": -87.647038,
        "streetAddress": "301 S Halsted St",
        "url": "http://www.melicafe.com",
        "price": "mains $12-16",
        "priceTier": "1",
        "hours": "7am-3pm",
        "phoneNumbers": "[\"+1 312 454 0748\"]",
        "emails": "[]",
        "transports": "[{\"type\": \"Metro\", \"description\": \"Blue Line to UIC-Halsted\"}]",
        "isTopChoice": 0,
        "score": 3,
        "publishedAt": "2019-02-07",
        "fieldSources": "",
        "providers": "atlas"
      }
    ]
  }
}

HTTP Request

POST https://api.demo.content-api.lonelyplanet.com/collections

This request retrieves collections matching the cityIds specified.

Search by cityId

curl  https://api.demo.content-api.lonelyplanet.com/collections \
  --header "Content-Type: application/json" \
  --header "X-API-Key: API_KEY_GOES_HERE" \
  --request POST \
  --data '{
    "start": 0,
    "limit": 2,
    "order": "",
    "cityIds": [
        "361932"
    ]
}'

The above command returns JSON structured like this:

{
    "start": 0,
    "limit": 5,
    "data": {
        "cityIds": [
            "361932"
        ],
        "collections": [
            {
                "collectionId": "11c94143-efb5-4ae2-978d-ed96f0ca2605",
                "name": "Brunch Spots",
                "nameClean": "Brunch Spots",
                "type": "BestOf",
                "category": "Eating",
                "order": 11,
                "priority": 3,
                "cityId": "361932",
                "Pois": [
                    {
                        "poiId": "1247080",
                        "cityId": "361932",
                        "neighborhoodId": "1319210",
                        "typeId": "dcd1e0eb-e004-40e3-8e55-6e8b9f0a6b3f",
                        "name": "Bike & Roll"
                    },
                    {
                        "poiId": "1176404",
                        "cityId": "361932",
                        "neighborhoodId": "1319215",
                        "typeId": "5f357592-4e48-4a4c-8ce9-dad2f669d03b",
                        "name": "Revolution Brewing"
                    },
                    {
                        "poiId": "1515892",
                        "cityId": "361932",
                        "neighborhoodId": "1319214",
                        "typeId": "4999e608-28d9-4437-9f2c-1f5e3d9a080b",
                        "name": "Dove's Luncheonette"
                    },
                    {
                        "poiId": "1176342",
                        "cityId": "361932",
                        "neighborhoodId": "1319216",
                        "typeId": "4999e608-28d9-4437-9f2c-1f5e3d9a080b",
                        "name": "Meli Cafe"
                    },
                    {
                        "poiId": "1614877",
                        "cityId": "361932",
                        "neighborhoodId": "1319216",
                        "typeId": "4999e608-28d9-4437-9f2c-1f5e3d9a080b",
                        "name": "Smyth"
                    }
                ]
            }
        ]
    }
 }

Search by CollectionsId

curl  https://api.demo.content-api.lonelyplanet.com/collections \
  --header "Content-Type: application/json" \
  --header "X-API-Key: API_KEY_GOES_HERE" \
  --request POST \
  --data '{
    "start": 0,
    "limit": 2,
    "order": "",
    "CollectionIds": [
        "037371c9-7d5c-4402-ad96-8cf5d0412fab"
    ]
}'
{
    "start": 0,
    "limit": 5,
    "data": {
        "cityIds": null,
        "collections": [
            {
                "collectionId": "037371c9-7d5c-4402-ad96-8cf5d0412fab",
                "name": "Spectator Sports",
                "nameClean": "Spectator Sports",
                "type": "BestOf",
                "category": "Entertainment",
                "order": 3,
                "priority": 3,
                "cityId": "360803",
                "Pois": [
                    {
                        "poiId": "1071522",
                        "cityId": "360803",
                        "neighborhoodId": "",
                        "typeId": "34a27d3c-c57d-4f6d-9ba1-076eadfa8439",
                        "name": "Globen"
                    }
                ]
            }
        ],
        "pois": null
    }
}

HTTP Request

POST https://api.demo.content-api.lonelyplanet.com/collections

This request retrieves collections matching the collectionIds specified.

Errors

The Content API uses the following error codes:

Error Code Meaning
400 Not Found -- The requested data could not be found.
403 Forbidden -- Invalid API key specified or the data requested is not associated with this API key.
404 Not Found -- The specified URL could not be found.
422 Bad Request -- Incorrect formatting of posted data.
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.