Is there a limit to the number of items returned when searching through content on ArcGIS Online or Portal when querying with ArcGIS API for Python?

1810
3
Jump to solution
02-04-2018 01:55 PM
deleted-user-8KkqhMYcTNGx
Occasional Contributor

There seems to be a limit of 10 items when querying items on AGO. I would like to return all items in an organization. Here is the code I was using:

from arcgis.gis import GIS
gis = GIS("https://organization.maps.arcgis.com", "username", "password")
gis.content.search(query="")

Thank you for any assistance you may provide. Thank you for everything and have a delightful day.

Sincerely,

Joe Guzi

0 Kudos
1 Solution

Accepted Solutions
JohnYaist1
Esri Contributor

Hey Joe - The API reference for the content here defines the max_items parameter that provides control to the number of results returned.  By default, the max_items parameter returns 10 items. You can set that parameter to a desired number:

search_results = a_gis.content.search(query="*", max_items=50)

I don't believe there is a limit to the number you can enter for that parameter.

View solution in original post

3 Replies
JohnYaist1
Esri Contributor

Hey Joe - The API reference for the content here defines the max_items parameter that provides control to the number of results returned.  By default, the max_items parameter returns 10 items. You can set that parameter to a desired number:

search_results = a_gis.content.search(query="*", max_items=50)

I don't believe there is a limit to the number you can enter for that parameter.

deleted-user-8KkqhMYcTNGx
Occasional Contributor

jyaist-esristaff‌ Thank you so much. The documentation you referenced was way more useful than the documentation I was looking at. This was the nudge I needed. Thanks again!

SanjaykumarRajbhar
New Contributor II

How to search in specific folder. or how to retrieve all feature services folder wise?

0 Kudos