1. Select a category
The first step is to identify one or more place categoriescategoryId, fullLabel, and parents (IDs)./categories request.
The steps to find a category are:
- Reference the places service.
- Define a filter category.
- Set the access token.
https://places-api.arcgis.com/arcgis/rest/services/places-service/v1/categories?filter=<CATEGORY>&token=<ACCESS_TOKEN>&f=pjsonAPIs
import requests
url = "https://places-api.arcgis.com/arcgis/rest/services/places-service/v1/categories"
params = {
"f": "pjson",
"token": "ACCESS_TOKEN"
}
response = requests.get(url, params=params)
print(response.text)REST API
curl 'https://places-api.arcgis.com/arcgis/rest/services/places-service/v1/categories?token=<ACCESS_TOKEN>&f=pjson'2. Search for places
The next step is to perform a search with /near-point or /within-extent. To filter and return the best results, you should provide a list of categoriescategoryId, fullLabel, and parents (IDs).name, place, location, and categories. You can use the place attributes to display them on a map or to get more details about each place.
You can perform the following types of place search with the JavaScript Maps SDK, scripting APIs, or open source libraries. The general steps are to:
- Reference the places service.
- Set the min and max
xandyvalues for theradiusorextent, as well as thecategory.Ids - Set the access token.
https://places-api.arcgis.com/arcgis/rest/services/places-service/v1/places/near-point?x=<LONGITUDE>&y=<LATITUDE>&radius=<METERS>&categoryIds=<IDs>&pageSize=<SIZE>&token=<ACCESS_TOKEN>&f=pjsonAPIs
places.queryPlacesNearPoint({
point: {
x: 24.938,
y: 60.169
},
categoryIds: ["4bf58dd8d48988d12d941735", "4bf58dd8d48988d164941735", "4bf58dd8d48988d181941735"],
radius: 500
}).then(results => {
console.log(JSON.stringify(results.places, null, 2));
});
REST API
curl 'https://places-api.arcgis.com/arcgis/rest/services/places-service/v1/places/near-point' \
-d 'x=24.938' \
-d 'y=60.169' \
-d 'radius=500' \
-d 'categoryIds=4bf58dd8d48988d12d941735,4bf58dd8d48988d164941735,4bf58dd8d48988d163941735' \
-d 'token=<ACCESS_TOKEN>' \
-d 'f=pjson'
3. Get place details
The last step is to request additional place attributes for each place/places/{place operation.
To get place details, you need to define the following:
- Reference the places service.
- Set the place ID
A place ID is an unique identifier for a returned from either a nearby or bounding box search.place . You can use the ID with the places service to return additional attribute information such as name, address, description, contact information, website, social links, hours of operation, price ratings, and user ratings. - Set the
requestedparameter to specify the fields you want. The request fields are grouped into Place, Address, and/or Details price groups. The number of attributes returned can vary depending on the type of place.Fields - Set the access token.
https://places-api.arcgis.com/arcgis/rest/services/places-service/v1/places/<placeId>?requestedFields=<place_details>&token=<ACCESS_TOKEN>&f=pjsonAPIs
places.fetchPlace({
placeId: "bd5f5dfa788b7c5f59f3bfe2cc3d9c60",
requestedFields: ["name", "categories"]
})
.then(results => {
console.log(JSON.stringify(results, null, 2))
})
REST API
curl 'https://places-api.arcgis.com/arcgis/rest/services/places-service/v1/places/bd5f5dfa788b7c5f59f3bfe2cc3d9c60' \
-d 'requestedFields=name,categories' \
-d 'f=pjson' \
-d 'token=<ACCESS_TOKEN>' \
Additional resources
Tutorials

Find nearby places and details
Find points of interest near a location and get detailed information about them.

Find places in a bounding box
Perform a text-based search to find places within a bounding box.