Select to view content in your preferred language

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?

3541
3
Jump to solution
02-04-2018 01:55 PM
deleted-user-8KkqhMYcTNGx
Deactivated User

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

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
Deactivated User

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
Emerging Contributor

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

0 Kudos