Search spots and places
Real-time search over the map, backed by Postgres:
spots: mapped danger spots whose title, area or description matchesq. Matching is fuzzy (pg_trgm), so typos likekalerwornansnastill match, and prefix and substring hits rank first.places: places in Uganda matchingq(from OpenStreetMap Nominatim, cached in the database for 30 days), each with the mapped spots within 2 km (nearby). Places near mapped spots are listed first. This is how a search for "Mulago" surfaces the Kalerwe spot 1.2 km away.
For search-as-you-type, call with places=0 on every keystroke (spots only, typically
under 20 ms) and without it after a short pause.
Rate limits: 120 searches per minute, and 30 uncached place lookups per minute.
When only the place lookup is throttled, the response is 429 but still contains the
matching spots.
GET
https://deathspot.org/api/searchQuery parameters
Returns
200
Matching spots and places.
429
Too many searches, or too many uncached place lookups. In the second case spots is still returned.