Get place details

Get place attributes for hotels in Berlin by requesting different field groups

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/{placeId} 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 placeId, you need to define a list of the fields you would like with the requestedFields parameter. For example, requestedFields: ["name", "categoryId", "address:streetAddress"] or requestedFields: all.

The general steps are:

  1. Get the places service URL.
  2. Set the requestedFields parameter with the fields you are interested in.
  3. Execute the request.

The fields you can use are listed below. They are organized into the following price groups:

Price groupField names
Placename, categories
Locationlocation,additionalLocations:dropOff, additionalLocations:frontDoor,addtionalLocations:road,additionalLocations:roof
Addressaddress:adminRegion, address:censusBlockId, address:country, address:designatedMarketArea, address:extended, address:locality, address:neighborhood, address:poBox, address:postTown, address:postcode, address:region, address:streetAddress
Detailsdescription, chains, contactInfo:telephone, contactInfo:website, contactInfo:fax, contactInfo:email, hours:openingText, hours:popular, hours:opening, rating:price, rating:user, socialMedia:facebookId, socialMedia:twitter, socialMedia:instagram

URL request

Use dark colors for code blocksCopy
1
https://places-api.arcgis.com/arcgis/rest/services/places-service/v1/places/<PLACE_ID>?token=<ACCESS_TOKEN>&f=pjson

Parameters

NameInTypeRequiredDefault valueDescription
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 requestedFields=name,address:streetAddress. However, you can also set this value to requestedFields=all to return all of the attributes available for a place.

The placeId attribute is always returned in addition to the other attributes you requested. If a valid attribute value is not available, null, or an empty collection, is returned and you are not charged for it. To see the fields and pricing groups they belong to, go to the table above.

query

string

none

Determines whether icons are returned and the type of icon to use with a place or category.

example icon

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 none (no icon URL will be returned).

query

string

json

The requested response format - either json or pjson (pretty json).

query

string

The authentication token with the premium:user:places privilege, used to access the Places service.

The token parameter can be either an API Key or short-lived token. See ArcGIS security documentation for more information on authenticating with a token or API key.

Alternatively, you can supply a token in the request header with one of the following keys using the "Bearer" scheme:

  • Authorization: Bearer <YOUR_TOKEN>
  • X-Esri-Authorization: Bearer <YOUR_TOKEN>

Code examples

Get place attributes

This example uses /places/{placeId} 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

  1. Reference the places service.
  2. Set the place ID.
  3. In the requestedFields parameter, specify the fields from the Place group.
  4. Set the token parameter to your access token.
Get the place group attributes for The White House.

APIs

ArcGIS REST JSArcGIS REST JSArcGIS Maps SDK for JavaScriptArcGIS API for PythonEsri LeafletMapLibre GL JSOpenLayers
Expand
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
arcgisRest
  .getPlaceDetails({
    placeId: "bd5f5dfa788b7c5f59f3bfe2cc3d9c60",
    requestedFields: ["name", "categories"],
    authentication,
  })
  .then(results => {
    console.log(JSON.stringify(results, null, 2))
  })

REST API

cURLcURLHTTP
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

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/{placeId} 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 additionaLocations:frontDoor and additionalLocations:roof do not apply and are null.

Steps

  1. Reference the places service.
  2. Set the place ID.
  3. In the requestedFields parameter, specify the fields from the location price group.
  4. Set the token parameter to your access token.
Get the location group attributes for the Manheim Arena in Illinois.

APIs

ArcGIS REST JSArcGIS REST JSArcGIS Maps SDK for JavaScriptArcGIS API for PythonEsri LeafletMapLibre GL JSOpenLayers
Expand
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
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

cURLcURLHTTP
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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/{placeId} 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:poBox, address:postTown, and address:extended do not apply and are null.

Steps

  1. Reference the places service.
  2. Set the place ID.
  3. In the requestedFields parameter, specify the fields from the Address place group.
  4. Set the token parameter to your access token.
Get the address group attributes for The White House.

APIs

ArcGIS REST JSArcGIS REST JSArcGIS Maps SDK for JavaScriptArcGIS API for PythonEsri LeafletMapLibre GL JSOpenLayers
Expand
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
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

cURLcURLHTTP
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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/{placeId} 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:opening, rating:price, and chains do not apply and are null.

Steps

  1. Reference the places service.
  2. Set the place ID.
  3. In the requestedFields parameter, specify the fields from the details price group.
  4. Set the token parameter to your access token.
Get the details group attributes for The White House.

APIs

ArcGIS REST JSArcGIS REST JSArcGIS Maps SDK for JavaScriptArcGIS API for PythonEsri LeafletMapLibre GL JSOpenLayers
Expand
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
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

cURLcURLHTTP
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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

Services

Places service

Find and get details about businesses, places, and other POI.

API support

Category searchNearby searchBounding box searchPlace details
ArcGIS Maps SDK for JavaScript1
ArcGIS Maps SDK for .NET
ArcGIS Maps SDK for Kotlin
ArcGIS Maps SDK for Swift
ArcGIS Maps SDK for Java
ArcGIS Maps SDK for Qt
ArcGIS API for Python
ArcGIS REST JS
Esri Leaflet2222
MapLibre GL JS2222
OpenLayers2222
CesiumJS2222
Full supportPartial supportNo support
  • 1. Access via ArcGIS REST JS
  • 2. Access via ArcGIS REST JS.

Tools

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.