The general steps on how to search for an item.
1. Define the search scope
Searching for an item in a portal helps you locate maps, layers, web apps, and other content. The sharing levels of an item determines who can search and access content. Below are sharing levels available for an item based on ArcGIS product types:
Item sharing level | ArcGIS product type support | Requires access token | Search results |
---|---|---|---|
Owner (private) | ArcGIS Location Platform ArcGIS Online ArcGIS Enterprise | Yes | Items owned by the user. |
Group | ArcGIS Online ArcGIS Enterprise | Yes | Items shared by members in a group. |
Organization | ArcGIS Online ArcGIS Enterprise | Yes | Items shared by members in the organization. |
Everyone (public) | ArcGIS Online ArcGIS Enterprise | No | All items shared publicly. |
The following are items and their sharing levels an authenticated or non-authenticated user can perform searches on:
Authenticated user | Requires access token | Search results |
---|---|---|
No | No | Only public items - Everyone (public) sharing level. |
Yes | Yes | 1. Items owned by the user - Owner (private). 2. Items shared by members in a group the user is a member - Group. 3. Items shared in the organization the user is a member - Organization. 4. All items shared publicly - Everyone (public) |
2. Provide search parameters
When searching for an item in a portal, you can refine your search by specifying search parameters. These parameters help narrow down the search criteria and filter the results to find the exact item you are looking for. Here are some key search parameters you can use:
Type | Description |
---|---|
Keywords | Include relevant keywords related to the item. This could be the item's name, description, or any other relevant information. |
Type search | Specify the type of item you are searching for. For example, you can use terms like "map," "app," "layer," or other item types to filter the results based on the item's category. |
Owner | If you know the owner of the item, you can include their username to narrow down the search to items owned by a specific user. |
Date Modified | You can filter items based on the date they were last modified. This is useful when you are looking for recently updated or added items. |
Access | Specify the access level of the item, such as "public," "private," or "shared." This helps filter items based on their accessibility. |
Tags | Use tags associated with the item to refine the search. Tags are descriptive labels that provide additional information about the item. |
Additionally, you can use SQL operators during a search to construct complex queries to further refine your search. Listed below are some of the supported operators that can be used in a search operations.
SQL Operator | Description |
---|---|
= | Equal to |
<> or != | Not equal to |
< | Less than |
> | Greater than |
<= | Less than or equal to |
>= | Greater than or equal to |
LIKE | Pattern matching with wildcard characters (%) |
IN | Matches any of a list of values |
NO | Does not match any of a list of values |
AND | Logical AND |
OR | Logical OR |
NOT | Logical NOT |
I | Tests for a NULL value |
I | Tests for a non-NULL value |
3. Run search
Once the search parameters are provided, you can then run the search.
Search for tags and an owner example
Find items by searching for tags and an owner name.
APIs
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
curl https://www.arcgis.com/sharing/rest/search \
-d 'q=tags:"USA Demographics" AND owner:"esri"' \
-d 'f=pjson'
Public and private search example
from arcgis.gis import GIS
def search_public_item(arcgis_url, search_query):
# Connect to ArcGIS Online anonymously
gis = GIS(arcgis_url)
# Perform a public search
search_results = gis.content.search(query=search_query, outside_org=True)
# Display search results
print(f"Search Results for '{search_query}':")
for result in search_results:
print(f" - Item Title: {result.title}, Item ID: {result.id}")
# Replace 'https://www.arcgis.com' with the URL of your ArcGIS Online organization
arcgis_url = 'https://www.arcgis.com'
# Replace 'your_search_query' with the term you want to search for
search_query = 'your_search_query'
# Perform the search
search_public_item(arcgis_url, search_query)
Tools
Use tools to access the portal and create and manage content for applications.
ArcGIS Enterprise
Create, manage, analyze, and share data, maps, and applications in your organization.
Portal
Create, manage, and access content and data services for applications.
Map Viewer
Create, explore, and share web maps for 2D applications.
Scene Viewer
Create, style, and explore web scenes.
Vector Tile Style Editor
Create styles for basemap and vector tile layers.
Content management tools
Create, manage, organize, and share items in a portal.
Data management tools
Import data and create hosted layers and data services. Upload and manage documents, images, and other files.
Spatial analysis tools
Perform feature and raster analysis to create new datasets with the Map Viewer.
Developer credentials tool
Create API key and OAuth 2.0 developer credentials for custom applications.
Items
Manage and share items.
ArcGIS Pro
Create, style, and explore maps and scenes.
Geoprocessing tools
Import, manage, and analyze data.