# Location

Location-related operations

## Find nearby pins using spatial query

> Returns pins within a specified radius of a geographic location using PostGIS spatial queries. Radius is in meters.

```json
{"openapi":"3.0.0","info":{"title":"Zones API","version":"1.0.0"},"tags":[{"name":"Location","description":"Location-related operations"}],"servers":[{"url":"/api","description":"API base path"}],"paths":{"/location/pins":{"get":{"summary":"Find nearby pins using spatial query","description":"Returns pins within a specified radius of a geographic location using PostGIS spatial queries. Radius is in meters.","tags":["Location"],"parameters":[{"name":"lat","in":"query","required":true,"schema":{"type":"string"},"description":"Latitude in decimal degrees (will be parsed as a number)"},{"name":"lon","in":"query","required":true,"schema":{"type":"string"},"description":"Longitude in decimal degrees (will be parsed as a number)"},{"name":"radius","in":"query","required":false,"schema":{"type":"string","default":"1000","minimum":0,"maximum":100000},"description":"Search radius in meters (default: 1000m / 1km, min: 0m, max: 100,000m, will be parsed as a number)"}],"responses":{"200":{"description":"List of nearby pins with distances","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NearbyPinList"}}}},"500":{"$ref":"#/components/responses/InternalServerError"}}}}},"components":{"schemas":{"NearbyPinList":{"type":"object","required":["pins"],"properties":{"pins":{"type":"array","items":{"$ref":"#/components/schemas/NearbyPin"},"description":"Array of pins sorted by distance from query point"}}},"NearbyPin":{"allOf":[{"$ref":"#/components/schemas/Pin"},{"type":"object","required":["distance"],"properties":{"distance":{"type":"number","description":"Distance from query point in meters"}}}]},"Pin":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"latitude":{"type":"number","nullable":true},"longitude":{"type":"number","nullable":true},"geoPose":{"type":"object","description":"JSON object containing geographic position and orientation data"},"contentType":{"type":"string","enum":["APK","GLB","IMAGE","VIDEO","URL","LENS","GCP","AUDIO","USDZ","BIN"]},"contentUrl":{"type":"string"},"localizationData":{"type":"object","nullable":true,"description":"ARWorld localization data for iOS AR experiences","properties":{"trackingMode":{"type":"string","enum":["WORLD","GEO"],"description":"AR tracking mode for the pin"},"worldmapURL":{"type":"string","format":"uri","nullable":true,"description":"S3 URL of the ARWorld binary data"}}},"zoneId":{"type":"integer","nullable":true},"gcpId":{"type":"integer","nullable":true},"userId":{"type":"string","nullable":true},"visibility":{"type":"string","enum":["public","private","friends"],"description":"Pin visibility setting"},"relocalizationPhotoUrl":{"type":"string","nullable":true,"description":"URL of the relocalization reference photo"},"scanInstructions":{"type":"string","nullable":true,"description":"Instructions for scanning/relocalizing"},"cameraPoseHint":{"type":"object","nullable":true,"description":"Camera pose hint for AR relocalization"},"blockchainSignature":{"type":"string","nullable":true},"blockchainTxUrl":{"type":"string","nullable":true},"blockchainSyncedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"Error":{"type":"object","properties":{"error":{"type":"string"},"details":{"type":"object"}}}},"responses":{"InternalServerError":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.meshmap.com/api/zones/location.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
