Place search
import requests
url = "https://api.parallel.ai/v1/places/search"
payload = { "query": "<string>" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: '<string>'})
};
fetch('https://api.parallel.ai/v1/places/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.parallel.ai/v1/places/search \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"query": "<string>"
}
'{
"search_id": "<string>",
"session_id": "session_8a911eb27c7a4afaa20d0d9dc98d07c0",
"results": [
{
"name": "<string>",
"url": "<string>",
"address": "<string>",
"phone": "<string>",
"latitude": 123,
"longitude": 123,
"distance_km": 123,
"rating": "fair",
"price_level": 123,
"opening_hours": {
"monday": [
{
"opens": "<string>",
"closes": "<string>"
}
],
"tuesday": [
{
"opens": "<string>",
"closes": "<string>"
}
],
"wednesday": [
{
"opens": "<string>",
"closes": "<string>"
}
],
"thursday": [
{
"opens": "<string>",
"closes": "<string>"
}
],
"friday": [
{
"opens": "<string>",
"closes": "<string>"
}
],
"saturday": [
{
"opens": "<string>",
"closes": "<string>"
}
],
"sunday": [
{
"opens": "<string>",
"closes": "<string>"
}
]
},
"timezone": "<string>",
"open_now": true,
"description": "<string>"
}
],
"warnings": [
{
"type": "spec_validation_warning",
"message": "<string>",
"detail": {}
}
],
"usage": [
{
"name": "sku_search",
"count": 1
}
]
}{
"type": "error",
"error": {
"ref_id": "search_fcb2b4f3c75e418687bccaa1a8381331",
"message": "Request validation error"
}
}Specialized Search
Place search
Searches for places such as restaurants, shops and attractions.
POST
/
v1
/
places
/
search
Place search
import requests
url = "https://api.parallel.ai/v1/places/search"
payload = { "query": "<string>" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: '<string>'})
};
fetch('https://api.parallel.ai/v1/places/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.parallel.ai/v1/places/search \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"query": "<string>"
}
'{
"search_id": "<string>",
"session_id": "session_8a911eb27c7a4afaa20d0d9dc98d07c0",
"results": [
{
"name": "<string>",
"url": "<string>",
"address": "<string>",
"phone": "<string>",
"latitude": 123,
"longitude": 123,
"distance_km": 123,
"rating": "fair",
"price_level": 123,
"opening_hours": {
"monday": [
{
"opens": "<string>",
"closes": "<string>"
}
],
"tuesday": [
{
"opens": "<string>",
"closes": "<string>"
}
],
"wednesday": [
{
"opens": "<string>",
"closes": "<string>"
}
],
"thursday": [
{
"opens": "<string>",
"closes": "<string>"
}
],
"friday": [
{
"opens": "<string>",
"closes": "<string>"
}
],
"saturday": [
{
"opens": "<string>",
"closes": "<string>"
}
],
"sunday": [
{
"opens": "<string>",
"closes": "<string>"
}
]
},
"timezone": "<string>",
"open_now": true,
"description": "<string>"
}
],
"warnings": [
{
"type": "spec_validation_warning",
"message": "<string>",
"detail": {}
}
],
"usage": [
{
"name": "sku_search",
"count": 1
}
]
}{
"type": "error",
"error": {
"ref_id": "search_fcb2b4f3c75e418687bccaa1a8381331",
"message": "Request validation error"
}
}Body
application/json
Place search request: places matching query in or near a location.
Response
Successful Response
Place search response.