Skip to main content

Hi, 

I am following the tutorial here to search for images lying within a bounding box. I only get 250 returns back for my aoi. Am I missing something? Please advise :)

 

Cheers,

Shashank

Hi @sbaglapl , I know that if you are searching an area with more than 250 results, only the first 250 are displayed, and you must paginate to access further records. An example is available here. Can you let me know if that helps? 

 

 


Hi @mirons , yes that is helpful, thank you so much :)


Hi @mirons. I’m running into this same problem, but I have a large number of images that I need the IDs for. I was able to successfully follow your suggestion to use the next_url to get the next page of image IDs, but this list of IDs also tops out at 250 images. Could you help me figure out how to print a list of all image IDs that are returned from an API search, even if there is, say, ~1000 of them (i.e. multiple pages of results). 

 

Thank you!


Hi @GabiZuccolotto24, you have two options to resolve this problem. The first is to repeat this next_url process till you reach the end of the list. As long as the return you receive from the API has a next_url you can call that new next_url in the same way as you did the first one and get the following 250 images. 
Essentially you repeat the step you just did until you no longer receive a return with a next_url. Every time adding the 250 image IDs to an array. 
If you want to make a single call you can use the Planet Python SDK, which is a bit more complicated to use, but will allow you to set the amount of max results you would like. This is the documentation for the run_search() function in the SDK that would allow you to set the limit variable to 2000 for example. This is a script that demos how to create this type of search using the SDK.
Hope this helps!

 


Reply