Item search

You can use the portal service to search for items. Item search is the process of querying the portal service to find users, groups, or different types of content such as maps, scenes, layers, files, services, or apps from templates and builders.

You can use content search to:

  • Search for public or private items.
  • Find different types of items.
  • Sort search results.
  • Return pages of search results.

How to search the portal

To search for items, you make an HTTPS request to the portal service and use the search operation. The search operation supports a query string with fields, and operators, such as AND, OR, and NOT. You can perform an open search for text using the default fields or you can search for text in specific fields such as the title, description, or tags. You can also specify a location to search near, or a bounding box to search in by defining the bbox parameter.

The general steps to search for items are:

  1. Define the URL to the portal service: https://www.arcgis.com/sharing/rest/search.
  2. Provide the text for your search. For example, "Streets", or "Elevation level".
  3. Define the item type for your search. For example, Web Map or Feature Service.
  4. Set the sort order for your return results.
  5. Any additional fields, such as tags, date created, or last modified.
access content
Search for different types of content items in the portal.

URL request

Use dark colors for code blocksCopy
1
https://www.arcgis.com/sharing/rest/search?<parameters>

Key parameters

NameDescriptionExamples
qThe text or formatted query with text.q="streets", q="streets AND highways", q=(title:"streets" OR description:"streets")
sortFieldThe primary sort field.sortField=numviews, sortField=created, sortField=modified
sortOrderReturn results in ascending or descending order.sortOrder=asc, sortOrder=desc

Additional parameters: To refine the search further, you can use parameters such as bbox, num, start, and categories.

Query structure

Here are a some of the general rules for formatting queries:

  • For an open search, specify the text at the beginning. e.g. q="streets"
  • To search specific fields, use a colon : after the field name.
  • Use double quotes "text" around all search text.
  • Capitalize all AND, OR, and NOT operators.
  • Use () to group operators.
  • Use the type: field to define the type of items to return. e.g. type: Web Map

For example:

Use dark colors for code blocksCopy
1
https://www.arcgis.com/sharing/rest/search?f=json&q=title:"London Tube" AND type:"Web Map" AND tags:Transportation

Default fields

When searching for text in items or groups, if you do not provide fields, the following default fields are searched.

ItemsGroups
titletitle
tagstags
descriptiondescription
snippetsnippet
tagKeywordsowner

For example:

Use dark colors for code blocksCopy
1
https://www.arcgis.com/sharing/rest/search?f=json&q="Seven Natural Wonders of the World"

Code examples

The following examples illustrate how to format queries to search for different types of content in the portal service. Most APIs set the default portal URL to https://www.arcgis.com/sharing/rest.

Search for text

Find any type of item with the keywords title or description.

APIs

ArcGIS Maps SDK for JavaScriptArcGIS Maps SDK for JavaScriptArcGIS API for PythonArcGIS REST JS
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
    portal = new Portal(); // Default is "https://www.arcgis.com/sharing/rest"
    portal.load().then(()=>{
      const query = {
        query: ["title:\"Seven Natural Wonders of the World\" OR description:\"Seven Natural Wonders of the World\""]
      };
      portal.queryItems(query).then((response)=>{
        console.log(response);
      });
    });

REST API

cURLcURLHTTP
Use dark colors for code blocksCopy
1
2
3
curl https://www.arcgis.com/sharing/rest/search \
-d 'q=title:"Seven Natural Wonders of the World" OR description:"Seven Natural Wonders of the World"' \
-d 'f=pjson'

Search for tags and an owner

Find items by searching for tags and an owner name.

APIs

ArcGIS Maps SDK for JavaScriptArcGIS Maps SDK for JavaScriptArcGIS API for PythonArcGIS REST JS
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
    portal = new Portal(); // Default is "https://www.arcgis.com/sharing/rest"
    portal.load().then(()=>{
      const query = {
        query: "tags:\"USA Demographics\" AND owner:\"esri\""
      };
      portal.queryItems(query).then((response)=>{
        console.log(response);
      });
    });

REST API

cURLcURLHTTP
Use dark colors for code blocksCopy
1
2
3
curl https://www.arcgis.com/sharing/rest/search \
-d 'q=tags:"USA Demographics" AND owner:"esri"' \
-d 'f=pjson'

Search for a type of item

Find items by searching for a type of item. Learn more about the types of items in items.

APIs

ArcGIS Maps SDK for JavaScriptArcGIS Maps SDK for JavaScriptArcGIS API for PythonArcGIS REST JS
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
        portal = new Portal(); // Default is "https://www.arcgis.com/sharing/rest"
        portal.load().then(()=>{
          const query = {
            query: ["title:\"London Map\" AND type:\"Web Map\""]
          };
          portal.queryItems(query).then((response)=>{
            console.log(response);
          });
        });

REST API

cURLcURLHTTP
Use dark colors for code blocksCopy
1
2
3
curl https://www.arcgis.com/sharing/rest/search \
-d 'q=title:"London Map" AND type:"Web Map"' \
-d 'f=pjson'

Search for a group

Find groups by searching for a text in the title.

APIs

ArcGIS Maps SDK for JavaScriptArcGIS Maps SDK for JavaScriptArcGIS API for PythonArcGIS REST JS
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
        portal = new Portal(); // Default is "https://www.arcgis.com/sharing/rest"
        portal.load().then(()=>{
        const query = {
          query: "title: Hikers"
        };
        portal.queryGroups(query).then((response)=>{
          console.log(response);
        });
      });

REST API

cURLcURLHTTP
Use dark colors for code blocksCopy
1
2
3
curl https://www.arcgis.com/sharing/rest/community/groups \
-d 'q=title:"hikers"' \
-d 'f=pjson'

Search near a location

Find items near point or a bounding box (extent).

APIs

ArcGIS Maps SDK for JavaScriptArcGIS Maps SDK for JavaScriptArcGIS API for PythonArcGIS REST JS
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
      portal = new Portal(); // Default is "https://www.arcgis.com/sharing/rest"
      portal.load().then(()=>{
        const query = {
          query: "snippet: food cart, type: Web Map",
          extent: {
              xmax: "-122.6750",
              xmin: "-122.6750",
              ymax: "45.5051",
              ymin: "45.5051"
            }

        };
      portal.queryItems(query).then((response)=>{
        console.log(response);
      });
    });

REST API

cURLcURLHTTP
Use dark colors for code blocksCopy
1
2
3
4
curl  https://www.arcgis.com/sharing/rest/search \
-d 'bbox=-122.6750,45.5051, -122.6750,45.5051' \
-d 'q="food cart" AND type:"web map"' \
-d 'f=pjson'

Tutorials

Use tools to create different types of content and build content-driven applications.

Web maps

Web scenes

Feature layers

Vector tile layers

Basemap layers

Services

Portal service

Store, manage, and access private and public content.

API support

SearchItemsUsersGroups
ArcGIS Maps SDK for JavaScript11
ArcGIS Maps SDK for .NET11
ArcGIS Maps SDK for Kotlin11
ArcGIS Maps SDK for Swift11
ArcGIS Maps SDK for Java11
ArcGIS Maps SDK for Qt11
ArcGIS API for Python
ArcGIS REST JS
Esri Leaflet2222
MapLibre GL JS2222
OpenLayers2222
Full supportPartial supportNo support
  • 1. Limited operations, use HTTP requests.
  • 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.