What are place details?
Place details are the attributes associated with a place such as name, street address, hours of operation, phone number, website, social media sites, and user ratings. The number of attributes available for a place can vary. For example, attributes such as opening hours may not be available for places that are geographic places or landmarks.
You can use place details to:
- Return key attributes for a place.
- Find the address and locale information.
- Get telephone, email, and website information.
- Get user and cost ratings.
- Gain insight and compare places.
How to get place details
To get place attributes you use the places service /places/{place
request with a valid place ID. To get a place ID, you can perform a nearby search or bounding box search. Once you have a place
, you need to define a list of the fields you would like with the requested
parameter. For example, requested
or requested
.
The general steps are:
- Get the places service URL.
- Set the
requested
parameter with the fields you are interested in.Fields - Execute the request.
The fields you can use are listed below. They are organized into the following price groups:
Price group | Field names |
---|---|
Place | name , categories |
Location | location ,additional , additional ,addtional ,additional |
Address | address , address , address , address , address , address , address , address , address , address , address , address |
Details | description , chains , contact , contact , contact , contact , hours , hours , hours , rating , rating , social , social , social |
URL request
https://places-api.arcgis.com/arcgis/rest/services/places-service/v1/places/<PLACE_ID>?token=<ACCESS_TOKEN>&f=pjson
Parameters
Name | In | Type | Required | Default value | Description |
---|---|---|---|---|---|
path |
| The Id of the place for which you want to fetch additional details. | |||
query | array[string] |
| The array of fields that define the attributes to return for a place. Use this parameter to define the attributes you would like returned,
for example The | ||
query | string | none | Determines whether icons are returned and the type of icon to use with a place or category. Use this parameter to define the type of icon URL for a given place or category. Place icons are available in the following formats:
The SVG and CIM symbols default to 15 x 15 pixels but can be scaled smoothly for display in larger UI elements or to emphasize these features on a map. The PNG icons are provided as 48 x 48 pixels but for map display the recommended size is 16 x 16 pixels. The default is | ||
query | string | json | The requested response format - either | ||
query | string |
| The authentication token, created from an ArcGIS Location Platform account, with the The Alternatively, you can supply a token in the request header with one of the following keys using the "Bearer" scheme:
|
Code examples
Get place attributes
This example uses /places/{place
to get the place attributes for bd5f5dfa788b7c5f59f3bfe2cc3d9c60
. The place attributes are the primary attributes for every place and include name
and categories
. The values are always valid. The attributes are displayed below.
Steps
- Reference the places service.
- Set the place ID.
- In the
requested
parameter, specify the fields from theFields Place
group. - Set the token parameter to your access token.
APIs
arcgisRest
.getPlaceDetails({
placeId: "bd5f5dfa788b7c5f59f3bfe2cc3d9c60",
requestedFields: ["name", "categories"],
authentication,
})
.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>' \
Get location attributes
This example uses /places/{place
to get the location attributes for cff0074688d7fc1c0a1cd65d83f29f38
. The location attributes include location, drop off, front door, roof, and road coordinates. All of the valid attributes with valid values are displayed below. Attributes such as additiona
and additional
do not apply and are null
.
Steps
- Reference the places service.
- Set the place ID.
- In the
requested
parameter, specify the fields from theFields location
price group. - Set the token parameter to your access token.
APIs
arcgisRest
.getPlaceDetails({
placeId: "cff0074688d7fc1c0a1cd65d83f29f38",
requestedFields: [
"location",
"additionalLocations:dropOff",
"additionalLocations:frontDoor",
"additionalLocations:roof",
"additionalLocations:road",
],
authentication,
})
.then(results => {
console.log(JSON.stringify(results, null, 2))
})
REST API
curl 'https://places-api.arcgis.com/arcgis/rest/services/places-service/v1/places/cff0074688d7fc1c0a1cd65d83f29f38' \
-d 'requestedFields=location, additionalLocations:dropOff,additionalLocations:frontDoor,additionalLocations:roof,additionalLocations:road' \
-d 'f=pjson' \
-d 'token=<ACCESS_TOKEN>' \
Get address attributes
This example uses /places/{place
to get the address attributes for bd5f5dfa788b7c5f59f3bfe2cc3d9c60
. The address attributes describe the location and delivery information associated with a place. All of the attributes with valid values are displayed below. Attributes such as address
, address
, and address
do not apply and are null
.ss
Steps
- Reference the places service.
- Set the place ID.
- In the
requested
parameter, specify the fields from theFields Address
place group. - Set the token parameter to your access token.
APIs
arcgisRest
.getPlaceDetails({
placeId: "bd5f5dfa788b7c5f59f3bfe2cc3d9c60",
requestedFields: [
"address:adminRegion",
"address:censusBlockId",
"address:country",
"address:designatedMarketArea",
"address:extended",
"address:locality",
"address:neighborhood",
"address:poBox",
"address:postcode",
"address:postTown",
"address:region",
"address:streetAddress",
],
authentication,
})
.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=address:adminRegion,address:censusBlockId, address:country, address:designatedMarketArea,address:extended, address:locality, address:neighborhood, address:poBox, address:postcode, address:postTown, address:region, address:streetAddress' \
-d 'f=pjson' \
-d 'token=<ACCESS_TOKEN>' \
Get details attributes
This example uses /places/{place
to get the details attributes for bd5f5dfa788b7c5f59f3bfe2cc3d9c60
. The details attributes include a description, contact, social, and rating information. All of the valid attributes with valid values are displayed below. Attributes such as hours
, rating
, and chains
do not apply and are null
.
Steps
- Reference the places service.
- Set the place ID.
- In the
requested
parameter, specify the fields from theFields details
price group. - Set the token parameter to your access token.
APIs
arcgisRest
.getPlaceDetails({
placeId: "bd5f5dfa788b7c5f59f3bfe2cc3d9c60",
requestedFields: [
"contactInfo:telephone",
"contactInfo:website",
"contactInfo:fax",
"contactInfo:email",
"socialMedia:facebookId",
"socialMedia:instagram",
"socialMedia:twitter",
"chains",
"description",
"rating:user",
"rating:price",
"hours:opening",
"hours:popular",
"hours:openingText",
],
authentication,
})
.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=contactInfo:telephone,contactInfo:website,contactInfo:fax,contactInfo:email,socialMedia:facebookId,socialMedia:instagram,socialMedia:twitter,chains,description,rating:user,rating:price' \
-d 'f=pjson' \
-d 'token=<ACCESS_TOKEN>' \
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.