Group Content Search

Description

This operation searches for items in a group.

The search index is updated whenever users add, update, or delete content. There can be a lag between the time that the content is updated and the time when it's reflected in the search results.

The results of a search only contain items that the user has permission to access.

Care should be taken when using ArcGIS REST API search operations (search, user search, group search, group content search) to find items, groups, and users programmatically. The Portal uses a powerful search engine to index information and to allow full text searching on it. This search engine uses many different inputs to find the appropriate results and rank them. This often makes search 'fuzzy', making it ideal for human interaction, but not necessarily ideal for looking for specific records programmatically. Developers should avoid using search to find specific items (e.g. by title) as the results of these types of queries might change as the search engine evolves.

Request Parameters

ParameterDetails
[Common Parameters]

For a complete listing, see Common parameters.

[Paging Parameters]

For a complete list of paging parameters, see Paging parameters.

q

The query string used to search. Search requires q, bbox, or both.

Example: q=redlands+map

bbox

The bounding box for a spatial search defined as minx, miny, maxx, or maxy.

Spatial search is an overlaps/intersects function of the query bbox and the extent of items.

Items that have no extent (e.g., mxds, 3dds, lyr) will not be found when doing a bbox search.

Item extent is assumed to be in the WGS84 geographic coordinate system.

Example: bbox=-118,32,-116,34

categories

A comma separated list or JSON array of up to 8 group content categories to search group items. Exact full path of each category is required, OR relationship between the categories specified.

Each request allows a maximum of 8 categories parameters with AND relationship between the different categories parameters called.

Example: search for group items with water or forest group category in the US

categories=/Categories/Water,/Categories/Forest
categories=/Region/United States

or

categories: ["/Categories/Water", "/Categories/Forest"]
categories: ["/Region/United States"]
categoryFilters

A comma separated list of up to 3 category terms to search items that have matching categories.

Up to 2 categoryFilters parameter are allowed per request. It can not be used together with categories to search in a request.

Example: search for items with categories having 'basemap' or 'ocean'

categoryFilters=basemap, ocean
sortField

Field to sort by. You can also sort by multiple fields (comma separated) for items, sort field names are case-insensitive.

Supported sort field names are title, created, type, owner, modified, added, avgrating, numratings, numcomments, and numviews.

sortOrder

Description: Describes whether the results return in ascending or descending order. Default is ascending.

Note:

This applies when working with sortField.

Values: asc | desc

countFields

A comma separated list of fields to count. Maximum count fields allowed per request is 3.

Supported count fields: tags, type, access, contentstatus, groupCategories.

Example: countFields=groupCategories, access

countSize

The maximum number of field values to count for each countFields.

The default value is 10, and maximum size allowed is 200.

Example: countSize=200

Response Properties

PropertyDetails
query

The query string searched.

[Paging Properties]

The following paging properties are included in the response and they are described in Paging properties.

total, start, num, nextStart

results

A JSON array of item objects. See the response properties of an item.

Note:

ownerFolder, protected and commentsEnabled properties of an item are not included in search response.

aggregations

A counts JSON object that consists of an array of objects, one for each countFields requested. Each count field object has a fieldName and fieldValues properties with fieldName representing the count field and fieldValues consisting of an array for each field value along with its corresponding count.

Note:

Field values are counted case insensitively and are always returned lower cased. For instance, 'Basemap' and 'basemap' will be counted as 1 field value instead of 2.

aggregations is included in response when countFields is requested. It is recommended to only query for aggregated counts once per search query, i.e. on the first pagination batch or use with num=0 to empty the results for better performance.

Counts are approximate and are not always accurate.

Example:

{
    "counts": [{
        "fieldName": "contentstatus",
        "fieldValues": [
          {
            "value": "deprecated",
            "count": 4
          },
          {
            "value": "org_authoritative",
            "count": 2
          }
        ]
      },
      {
        "fieldName": "access",
        "fieldValues": [
          {
            "value": "private",
            "count": 59
          },
          {
            "value": "public",
            "count": 15
          },
          {
            "value": "account",
            "count": 6
          },
          {
            "value": "shared",
            "count": 2
          }
        ]
      }
    ]
  }

Example Usage

URL for Group Content Search

https://www.arcgis.com/sharing/rest/content/groups/93744920722644fcb926044f2cf327f6/search

JSON Response Syntax

{
  "query": "<query string>",
  "total": <total number of results>,
  "start": <results in first set>,
  "num": <number of results per page>,
  "nextStart": <result number of next page>,
  "results": [
    {
      "id": "<item id>",
      "owner": "<owner username>",
      "created": date created shown in UNIX time,
      "modified": date modified shown in UNIX time,
      "guid": "<unique id>",
      "name": "<item name>",
      "title": "<item title>",
      "type": "<type>",
      "typeKeywords": ["<keyword1>", "<keyword2>", "<keyword3>", "<keyword4>"],
      "description": "<description>",
      "tags": ["<tag1>", "<tag2>", "<tag3>"],
      "snippet": "<summary>",
      "thumbnail": "<file name>",
      "extent": [
        [minX, minY],
        [maxX, maxY]
      ],
      "spatialReference": "<coordinate system>",
      "accessInformation": <credits>,
      "licenseInfo": "<access and use constraints>",
      "culture": "<culture code>",
      "url": <URL>,
      "proxyFilter": {},
      "access": "private | shared |  org | public",
      "size": <size>,
      "properties": {},
		    "appCategories": [],
		    "industries": [<list of industries>],
		    "languages": [<list of languages>],
		    "largeThumbnail": "<URL to thumbnail>",
		    "banner": "<URL to banner>",
		    "screenshots": [<list of URL to screenshots>],
		    "listed": true | false,
      "numComments": <number of comments>,
      "numRatings": <number of ratings>,
      "avgRating": <average rating>,
      "numViews": <number of views>
    }
  ],
  "aggregations": {
    "counts": [
      {
        "fieldName": "<field name1>",
        "fieldValues": [
          {
            "value": "<field value1>",
            "count": <number of counts>
          }
        ]
      }
    ]
  }
}

JSON Response Example

{
  "query": "park",
  "total": 11,
  "start": 5,
  "num": 2,
  "nextStart": 7,
  "results": [
    {
      "id": "eca787aacf9b4c0a8817f36276609db3",
      "owner": "test",
      "created": 1224884011000,
      "modified": 1474327423000,
      "guid": "{578DF0AF-660E-4735-9A83-D48395774CA2}",
      "name": "yellowstone national park",
      "title": "Forest resources within the study area.",
      "type": "MapDocument mxd",
      "typeKeywords": ["mxd", "map", "arcmap"],
      "description": "This map is intended to be used as part of the ArcCatalog Quick start tutorial.",
      "tags": ["Yellowstone National Park", "U.S.", "vegetation", "hydrology", "inlandWaters"],
      "snippet": "<b>Yellowstone National Park</b>",
      "thumbnail": "thumbnail/yellowstone_map.png",
      "extent": [ 
         [-110.05, 44.13], 
         [-110, 44.98] 
      ],        
	     "spatialReference": null,       
      "accessInformation": null,        
      "licenseInfo": "ArcEditor is a powerful GIS desktop system for editing and managing geographic data.",    
      "culture": "en-US",       
      "url": null,   
      "proxyFilter": null,     
      "access": "public",   
      "size": 105,
      "properties": null,
		    "appCategories": [],
		    "industries": [],
		    "languages": [],
		    "largeThumbnail": null,
		    "banner": null,
		    "screenshots": [],
		    "listed": false,            
      "numComments": 5,        
      "numRatings": 16,        
      "avgRating": 3.25,        
      "numViews": 169  
    },
    {
      "id": "28c343b688224d0ca1b5ba741c28de6e",
      "owner": "jsmith33",
      "created": 1263460602000,
      "modified": 1474327425000,
      "guid": "1D70DAC0-505A-463F-A948-B324FD18BE2A",
      "name": "National_Parks_in_the_Northwest",
      "title": "National Parks in the Northwest",
      "type": "Layer Package",
      "typeKeywords": ["Data", "Layer Package", "ArcMap", "ArcGlobe", "ArcGIS Explorer", "lpk"],
      "description": null,
      "tags": ["Parks"],
      "snippet": null,
      "thumbnail": "thumbnail/thumbnail.png",
      "extent": [
           [-130.098, 15.469],
           [-63.337, 54.048]
      ],
      "spatialReference": "GCS_North_American_1983",
      "accessInformation": null,
      "licenseInfo": null,
      "culture": "en-us",
      "url": null,
      "proxyFilter": null,
      "access": "public",
      "size": 612,
      "properties": null,
		    "appCategories": [],
		    "industries": [],
		    "languages": [],
		    "largeThumbnail": null,
		    "banner": null,
		    "screenshots": [],
		    "listed": false,
      "numComments": 1,
      "numRatings": 6,
      "avgRating": 3,
      "numViews": 86
    }
   ],
  "aggregations": {
    "counts": [
      {
        "fieldName": "access",
        "fieldValues": [
          {
            "value": "public",
            "count": 2
          }
        ]
      }
    ]
  }
}