OriginChainDB
Database endpoints

Search by location

Find locations inside a bounding box, within a radius, or nearest to a point.

GET /v1/tenants/{tenant}/geo/{schema}/{field}

Find records near a locationDistance is returned only for modes that provide it.
  1. Describe the search areaSupply a box, radius or nearest-point request.
  2. Search the location fieldMatch points within the selected schema.
  3. Read matching document IDsInspect distance and any pending index repair.

Before you start

Use your database bearer token.

Connection setup

Register a geospatial index on demo.locations.location and insert coordinates before running the example.

Path parameters

FieldTypeRequired
tenantstringRequired
schemastringRequired
fieldstringRequired

Query parameters

FieldTypeRequired
modestringOptional
latnumberOptional
lonnumberOptional
radius_mnumberOptional
kintegerOptional
min_latnumberOptional
min_lonnumberOptional
max_latnumberOptional
max_lonnumberOptional
limitintegerOptional

Headers

FieldTypeRequiredDescription
x-oc-db-userstringOptionalActing database user (role, grant and row-policy checks). Send with x-oc-db-key.
x-oc-db-keystringOptionalAPI key of the x-oc-db-user user.

Read the result

hits contains matching document IDs, with distance_m when the search mode provides a distance. count is the returned hit count. Check index_repair_pending before assuming the index is fully repaired.

Response statuses

HTTP status reference
StatusWhat to do
200OK
400Correct the request before retrying.
401Check the credential and Authorization header.
402Check feature access or available credits.
403Check tenant access, roles and permissions.
404Check the resource ID and API route.
429Honor Retry-After when present; back off.
500Check the outcome before retrying a write.
503Honor Retry-After when present; check write outcomes.
ยฉ 2026 Silicoyn Technologies Pvt Ltd