WebApp AI Fetch Issue - Looking for help

Thanks for flagging these issues everyone! These increased latencies are related to deprecating the spatial indexing service we’ve been using behind these APIs.

Our current indexing solution is based on S2 cells and the increased latency correlates with how densely given area is covered with images. For example querying a 1km x 1km bbox in an area with 500 images will be faster than one with 5000. I’m collecting the stats on these latencies so we can fine tune how this works in the future.

@IreuN :

Same here, could we at least increase the limit to 0.017 (zoom 10 tile equivalent) ?

We’re not planning to increase limits soon, we’re not happy yet with stability of these APIs.

Also I’ve switched to download zoom 11 tile equivalent tile, using graph API, but I’m now getting b’{“error”:{“code”:1,“message”:“An unknown error occurred”,“error_subcode”:99}}’ message :woman_tipping_hand:

You’re already hitting the hard timeout of 30s, meaning there is a lot of data to query in the area you’re filtering for. I’d suggest splitting the bbox into e.g. 2 or 4 and making multiple requests with parts of that bbox. We’ll have improved error messages at some point too.

If you’re using Python, you might want to also take a look at GitHub - mapillary/mapillary-python-sdk: A Python 3 library built on the Mapillary API v4 to facilitate retrieving and working with Mapillary data. where APIs are based on vector tile parsing + Graph API filling in the missing metadata gaps. Perhaps that could work out of the box for you?

@cristiandavilatwd : The issue you’re facing is related to the chages in how we do spatial lookups. The latency is related to the amount of images in S2 cells overlapping with the bbox you’re querying. I’d suggest splitting the bbox and sending multiple requests for now. I agree, the latencies in “dense” areas are not great, I’ll see what we can do to improve them short term.

Regarding limits, keep in mind that max is 2000, with no pagination for these parameters.

We ackownledge that historically these (spatial) APIs are limited and we’d like to revise them at some point.

1 Like