Search for an item

Searching for content is discovering resources available in your organization. By using the search capability, you can locate maps, layers, data, and other items that are pertinent to your needs. The search results are determined by keywords, tags, and metadata associated with each item making it important to understand how to use these item properties to find content. Tagging and describing your own items is also important to allow users to discover and use your work.

Where to search for items

You can search for items from various data sources including:

Data Source
Description
My ContentItems that users have uploaded or created themselves, such as hosted feature layers, maps, apps, and files.
Your organizationItems shared within the user's organization, including content shared by other members, groups, or departments.
Living Atlas of the WorldCurated and authoritative geographic information from Esri and its partners, including basemaps, imagery, demographic data, environmental data, and more.
ArcGIS MarketplaceAccess to a wide range of third-party apps, data, and services from Esri partners and developers, allowing users to discover and integrate additional capabilities.
ArcGIS HubItems related to initiatives, projects, or communities within ArcGIS Hub, enabling users to search for and engage with data and content associated with specific initiatives.
Open DataPublicly accessible datasets shared by organizations and governments worldwide through the ArcGIS Open Data platform, providing access to a variety of geospatial datasets.
Community Maps ProgramHigh-quality, authoritative basemaps contributed by organizations and agencies worldwide, providing detailed coverage of specific regions or themes.

Why search for items

You search for items to:

  • Quickly locate relevant spatial datasets, maps, applications, and resources.
  • Find specific content without manual browsing through folders or categories.
  • Use existing content saving time and effort in creating new maps, layers, and applications.
  • Share and access content across teams, departments, and organizations within ArcGIS Online.
  • Incorporate search results into workflows, applications, and analyses seamlessly.

How to search for an item

The general steps of searching for an item:

1. Choose a type of authentication

The purpose of an access token in ArcGIS is to provide secure, authorized access to content items, services, and functionality for both applications and users. You need to implement a type of authentication in your app to get an access token and access secure ArcGIS resources. The type of authentication you implement will determine the access privileges and billing method of your app.

The following types of authentication can be used to get an access token:

  • API key authentication
  • User authentication
  • App authentication

2. Get an access token

To get an access token, you need to implement a type of authentication in your application. Different types of authentication result in access tokens with different privileges. Learn how to implement the types of authentication workflows below:

3. Search for the item

Once you have an access token, you can perform the search operation for an item.

Example

Use a query to search for items in the portal. Below are examples of public and private searches for items in ArcGIS Online.

The public example searches for all items that contain the string, type, and owner. The private example searches for your private items that are web maps.

APIs

ArcGIS Maps SDK for JavaScriptArcGIS Maps SDK for JavaScriptArcGIS API for PythonArcGIS REST JS
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
const portal = new Portal({
  url: "https://www.arcgis.com/"
});
portal.load().then(()=>{
  const query = {
    query: "title: Seven Natural Wonders, type: web map, owner: esri_devlabs"
  };
  portal.queryItems(query).then((response)=>{
    console.log(response);
  });
});

REST API

cURLcURLHTTP
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
## Public

curl https://www.arcgis.com/sharing/rest/search \
-d 'q=title:"Seven Natural Wonders of the World" AND type:"web map" AND owner:"esri_devlabs"' \
-d 'f=pjson'

## Private

curl https://www.arcgis.com/sharing/rest/search \
-d 'q=title:"Seven Natural Wonders of the World" AND type:"web map" AND owner:"<YOUR_USER_ID>"' \
-d 'f=pjson'
-d 'token=<ACCESS_TOKEN>'

Code examples

Search for items by date

Below is an example that demonstrates how search items that are older than a specified date in your portal.

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
    portal = new Portal(); // Default is "https://www.arcgis.com/sharing/rest"
    portal.load().then(()=>{
      var queryParams = new PortalQueryParams({
        query: "CreationDate < '2022-01-01'"
      });

      portal.queryItems(query).then((response)=>{
        // Log the items older than Jan 1, 2022
        console.log("Items older than January 1, 2022:");
        result.results.forEach(function (item) {
          console.log(item.title);
        });
      });
    });
Expand

Search for an items using SQL operators

Below is an example that demonstrates how search for items using the SQL WHERE clause in ArcGIS Online.

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
46
      // Query parameters
      var queryParams = new PortalQueryParams({
        query: "title LIKE '%Wetlands%' AND type = 'Feature Service'"
      });

      // Query portal items
      portal.queryItems(queryParams).then(function(queryResult) {
        // Display item titles in console
        queryResult.results.forEach(function(item) {
          console.log(item.title);
        });
Expand

Tutorials

Import data to create a feature layer

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


Define a new feature layer

Use data management tools to define and create a new empty 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.


Create a vector tile service

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


Create a map tile service

Use ArcGIS Online or scripting APIs to publish a map tile service.


Services

API support

Use data management tools or Client APIs to create, manage, and access data services. The table below outlines the level of support for each API.

CreateManageAccess
ArcGIS Maps SDK for JavaScript1
ArcGIS Maps SDK for Kotlin1
ArcGIS Maps SDK for Swift1
ArcGIS Maps SDK for Flutter1
ArcGIS Maps SDK for Java1
ArcGIS Maps SDK for .NET1
ArcGIS Maps SDK for Qt1
ArcGIS API for Python
ArcGIS REST JS
Esri Leaflet2
MapLibre GL JS23
OpenLayers23
Full supportPartial supportNo support
  • 1. Use portal class and direct REST API requests
  • 2. Access via ArcGIS REST JS
  • 3. Requires manually setting styles for renderers

Tools

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