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

Style layers in a web map

Use Map Viewer to style layers in a web map.


Map Viewer

Web scenes

Style layers in a web scene

Use Scene Viewer to style layers in a web scene.


Scene Viewer

Display a web scene

Feature layers

Import data to create a feature layer

Use data management tools to import files and create a feature layer in a feature service.


Manage a feature layer

Use a hosted feature layer item to set the properties and settings of a feature layer in a feature service.


Vector tile layers

Create a vector tile service

Use data management tools to create a new vector tile service from a feature service.


Add a vector tile layer

Access and display a vector tile layer in a map.


Basemap layers

Create a custom basemap style

Use the Vector Tile Style Editor to style a vector tile basemap layer.


Display a custom basemap style

Add and display a styled vector tile basemap layer.


Services

API support

SearchItemsUsersGroupsSettingsSecurity
ArcGIS Maps SDK for JavaScript1111
ArcGIS Maps SDK for .NET1111
ArcGIS Maps SDK for Kotlin1111
ArcGIS Maps SDK for Swift1111
ArcGIS Maps SDK for Flutter1111
ArcGIS Maps SDK for Java1111
ArcGIS Maps SDK for Qt1111
ArcGIS API for Python
ArcGIS REST JS
Esri Leaflet222222
MapLibre GL JS222222
OpenLayers222222
CesiumJS222222
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.