Get place details

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

What are place details?

details are the associated with a place such as name, street address, phone number, website, and social media sites. The number of attributes available for a place can vary.

You can use place details to:

  • Return key for a .
  • Find the address and locale information.
  • Get telephone, email, and website information.
  • Gain insight and compare places.

How to get place details

To get place you use the /places/{placeId} request with a valid . 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
Addressaddress:adminRegion, address:country, address:extended, address:locality, address:poBox, address:postTown, address:postcode, address:region, address:streetAddress
DetailscontactInfo:telephone, contactInfo:website, contactInfo:fax, contactInfo:email, socialMedia:facebookId, socialMedia:twitter, socialMedia:instagram

URL request

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, created from an ArcGIS Location Platform account, 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.

This parameter is required unless you supply an access 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
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
arcgisRest
  .getPlaceDetails({
    placeId: "bd5f5dfa788b7c5f59f3bfe2cc3d9c60",
    requestedFields: ["name", "categories"],
    authentication,
  })
  .then(results => {
    console.log(JSON.stringify(results, null, 2))
  })

REST API

cURLcURLHTTP
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.

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
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
arcgisRest
  .getPlaceDetails({
    placeId: "cff0074688d7fc1c0a1cd65d83f29f38",
    requestedFields: [
      "location"
    ],
    authentication,
  })
  .then(results => {
    console.log(JSON.stringify(results, null, 2))
  })

REST API

cURLcURLHTTP
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' \
-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
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
arcgisRest
  .getPlaceDetails({
    placeId: "bd5f5dfa788b7c5f59f3bfe2cc3d9c60",
    requestedFields: [
      "address:adminRegion",
      "address:country",
      "address:extended",
      "address:locality",
      "address:poBox",
      "address:postcode",
      "address:postTown",
      "address:region",
      "address:streetAddress",
    ],
    authentication,
  })
  .then(results => {
    console.log(JSON.stringify(results, null, 2))
  })

REST API

cURLcURLHTTP
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:country,address:extended, address:locality, 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 contact and social media information. All of the valid attributes with valid values are displayed below.

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
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
arcgisRest
  .getPlaceDetails({
    placeId: "bd5f5dfa788b7c5f59f3bfe2cc3d9c60",
    requestedFields: [
      "contactInfo:telephone",
      "contactInfo:website",
      "contactInfo:fax",
      "contactInfo:email",
      "socialMedia:facebookId",
      "socialMedia:instagram",
      "socialMedia:twitter"
    ],
    authentication,
  })
  .then(results => {
    console.log(JSON.stringify(results, null, 2))
  })

REST API

cURLcURLHTTP
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' \
-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.


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

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close