/search: Group Content Search

URL:
https://[root]/content/groups/[groupID]/search
Methods:
GET

Example usage

Below is a sample ArcGIS Online request URL used to access the group content search operation:

Use dark colors for code blocksCopy
1
https://org.arcgis.com/sharing/rest/content/groups/93744920722644fcb926044f2cf327f6/search?categories=/Categories/Water,/Categories/Forest&f=pjson

Below is a sample ArcGIS Enterprise request URL used to access the group content search operation:

Use dark colors for code blocksCopy
1
https://machine.domain.com/webadaptor/sharing/rest/content/groups/93744920722644fcb926044f2cf327f6/search?categories=/Categories/Water,/Categories/Forest&f=pjson

Description

This operation searches for items in a group. Searching for group content with group categories is only available at this endpoint. It is not the same as using q=group:[groupid] with search, which queries content categories defined at the organizational level. The search index is updated when users add, update, or remove content. There may be a lag between the time the content is updated and the time it's reflected in the search results. Search results 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

start

The number of the first entry in the result set response. The index number is 1-based. The default value of start is 1.

Example

Use dark colors for code blocksCopy
1
start=11

num

The maximum number of results to be included in the result set response. The default value is 10, and the maximum allowed value is
100. The actual number of returned results may be less than the num value. This happens when the number of results remaining after start is less than num.

Example:

Use dark colors for code blocksCopy
1
2
//Returns a max of 50 results in the response
num=50

q

The query string used to search. For advanced options, see Search reference.

Example:

Use dark colors for code blocksCopy
1
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 (for example., .mxd, .3ds, .lyr) are not found when doing a bbox search. The item extent is assumed to be in the WGS84 geographic coordinate system.

Example:

Use dark colors for code blocksCopy
1
bbox=-118,32,-116,34

filter

Structured filtering is accomplished by specifying a field name followed by a colon and the term you are searching for with double
quotation marks. It allows the passing in of application-level filters based on the context. Use an exact keyword match of the expected
value for the specified field. Partially matching the filter keyword will not return meaningful results.

See Search reference for advanced options.

Example:

Use dark colors for code blocksCopy
1
filter=tags:"transportation"

categories

A comma separated list or JSON array of up to eight group content categories to search group items. The exact full path of each
category is required, and an OR relationship between the categories must be specified. Each request allows a maximum of eight categories parameters with an AND relationship between the various categories parameters called.

Example: Search for group items with the water or forest group category in the United States.

Use dark colors for code blocksCopy
1
2
3
4
//Search for group items with the water or forest group category in the United States, in a comma-
  separated list
categories=/Categories/Water,/Categories/Forest
categories=/Region/United States

categoryFilters

A comma-separated list of up to three category terms to search for items that have matching categories. Up to two categoryFilters parameters are allowed per request. This parameter cannot be used with the categories parameter to search in a request.

Example:

Use dark colors for code blocksCopy
1
2
//Search for items with categories containing 'basemap' or 'ocean'.
categoryFilters=basemap, ocean

sortField

The field to sort by. You can also sort by multiple fields (comma separated). Sort field names are not case sensitive. If sortField is not defined, the results are sorted by relevancy in descending order.

Values: title | created | type | owner | modified | added | avgrating | numratings | numcomments | numviews

sortOrder

Describes whether the results are returned in ascending or descending order. The default is ascending.

Values: asc | desc

countFields

A comma-separated list of fields to count. The maximum number of fields allowed per request is three. Supported count fields are tags, type, access, contentstatus, and groupCategories.

Example:

Use dark colors for code blocksCopy
1
countFields=groupCategories, access

countSize

The maximum number of field values to count for each countFields. The default value is 10, and the maximum number allowed is 200.

Example:

Use dark colors for code blocksCopy
1
countSize=200

f

The response format. The default format is html.

Values: html | json | pjson

Response properties

PropertyDetails

total

The total number of results found for the whole query.

start

The number of the first entry in the result set for this response. The index number is 1-based.

num

The number of results included in the result set for this response.

nextStart

The next entry index if the current result set doesn't contain all results, or -1 if it is the last batch.

results

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

aggregations

A counts JSON object that consists of an array of objects, one for each countFields requested. Each count field object has 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.

Example:

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
{
  "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
        }
      ]
    }
  ]
}

JSON Response syntax

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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{
  "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>,
      "lastViewed": <date/time in UNIX format>
    }
  ],
  "aggregations": {
    "counts": [
      {
        "fieldName": "<field name1>",
        "fieldValues": [
          {
            "value": "<field value1>",
            "count": <number of counts>
          }
        ]
      }
    ]
  }
}

JSON Response example

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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
{
  "total": 11,
  "start": 5,
  "num": 2,
  "nextStart": 7,
  "results": [
    {
      "id": "4ce2756331dd40cc936674cf3ad186ee",
      "owner": "org_admin",
      "created": 1636486115877,
      "isOrgItem": true,
      "modified": 1636486115877,
      "guid": null,
      "name": "hurricanes_sub2_spatiotemporal",
      "title": "hurricanes_sub2_spatiotemporal",
      "type": "Feature Service",
      "typeKeywords": [
        "Data",
        "Service",
        "Feature Service",
        "ArcGIS Server",
        "Feature Access",
        "Hosted Service",
        "providerSDS",
        "Spatiotemporal"
      ],
      "description": "Hurricane information",
      "tags": [],
      "snippet": null,
      "thumbnail": null,
      "documentation": null,
      "extent": [],
      "categories": [],
      "spatialReference": null,
      "accessInformation": null,
      "licenseInfo": null,
      "culture": null,
      "properties": null,
      "advancedSettings": null,
      "url": "https://machine.domain.com/webadaptor/rest/services/Hosted/hurricanes_sub2_spatiotemporal/FeatureServer",
      "proxyFilter": null,
      "access": "shared",
      "size": -1,
      "subInfo": 0,
      "appCategories": [],
      "industries": [],
      "languages": [],
      "largeThumbnail": null,
      "banner": null,
      "screenshots": [],
      "listed": false,
      "numComments": 0,
      "numRatings": 0,
      "avgRating": 0,
      "numViews": 0,
      "groupCategories": [],
      "scoreCompleteness": 33,
      "groupDesignations": null,
      "lastViewed": 1613148239000
    },
    {
      "id": "29ab35f5f86645bca93944a43a233bc9",
      "owner": "org_admin",
      "created": 1636486094142,
      "isOrgItem": true,
      "modified": 1636486094142,
      "guid": null,
      "name": "hurricanes_sub2_relational",
      "title": "hurricanes_sub2_relational",
      "type": "Feature Service",
      "typeKeywords": [
        "Data",
        "Service",
        "Feature Service",
        "ArcGIS Server",
        "Feature Access",
        "Hosted Service",
        "providerSDS"
      ],
      "description": "Hurricane information",
      "tags": [],
      "snippet": null,
      "thumbnail": null,
      "documentation": null,
      "extent": [],
      "categories": [],
      "spatialReference": null,
      "accessInformation": null,
      "licenseInfo": null,
      "culture": null,
      "properties": null,
      "advancedSettings": null,
      "url": "https://machine.domain.com/webadaptor/rest/services/Hosted/hurricanes_sub2_relational/FeatureServer",
      "proxyFilter": null,
      "access": "shared",
      "size": -1,
      "subInfo": 0,
      "appCategories": [],
      "industries": [],
      "languages": [],
      "largeThumbnail": null,
      "banner": null,
      "screenshots": [],
      "listed": false,
      "numComments": 0,
      "numRatings": 0,
      "avgRating": 0,
      "numViews": 0,
      "groupCategories": [],
      "scoreCompleteness": 33,
      "groupDesignations": null,
      "lastViewed": 1613148239000
    }
  ],
 "aggregations": {
    "counts": [
      {
        "fieldName": "groupCategories",
        "fieldValues": [
          {
            "value": "/categories",
            "count": 1
          },
          {
            "value": "/categories/water",
            "count": 1
          }
        ]
      }
    ]
  }
}

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