Skip to main content

List Location Records

GET /api/v0/location-records
Returns location attestations matching the specified filters.

Query Parameters

ParameterTypeDescription
chainstringFilter by chain: base-sepolia, sepolia, arbitrum, celo
proverstringFilter by the address that created the attestation
subjectstringFilter by the subject/recipient address
fromTimestampISO 8601Attestations after this time
toTimestampISO 8601Attestations before this time
bboxstringBounding box: minLng,minLat,maxLng,maxLat
limitnumberMax results (default: 100, max: 1000)
offsetnumberPagination offset

Examples

Filter by Chain

curl "https://api.astral.global/api/v0/location-records?chain=base-sepolia"

Filter by Address

curl "https://api.astral.global/api/v0/location-records?prover=0xabcd...1234"

Filter by Time Range

curl "https://api.astral.global/api/v0/location-records?\
fromTimestamp=2024-01-01T00:00:00Z&\
toTimestamp=2024-01-31T23:59:59Z"

Filter by Bounding Box

Query attestations within a geographic area (San Francisco):
curl "https://api.astral.global/api/v0/location-records?\
bbox=-122.52,37.70,-122.35,37.82"

Pagination

# Page 1
curl "https://api.astral.global/api/v0/location-records?limit=20&offset=0"

# Page 2
curl "https://api.astral.global/api/v0/location-records?limit=20&offset=20"

Response

{
  "data": [
    {
      "uid": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
      "chain": "base-sepolia",
      "prover": "0xabcdef1234567890abcdef1234567890abcdef12",
      "subject": "0xabcdef1234567890abcdef1234567890abcdef12",
      "timestamp": "2024-01-15T12:34:56Z",
      "event_timestamp": "2024-01-15T12:34:56Z",
      "srs": "EPSG:4326",
      "location_type": "geojson-point",
      "location": "{\"type\":\"Point\",\"coordinates\":[-122.4194,37.7749]}",
      "longitude": -122.4194,
      "latitude": 37.7749,
      "recipe_types": [],
      "recipe_payloads": [],
      "media_types": [],
      "media_data": [],
      "memo": "San Francisco city center",
      "revoked": false,
      "created_at": "2024-01-15T12:35:00Z",
      "updated_at": "2024-01-15T12:35:00Z"
    }
  ],
  "count": 1,
  "limit": 100,
  "offset": 0
}

Response Fields

FieldTypeDescription
uidstringUnique attestation identifier (EAS UID)
chainstringBlockchain where attestation is registered
proverstringAddress that created the attestation
subjectstringRecipient address (often same as prover)
timestampstringBlock timestamp
event_timestampstringWhen the location event occurred
srsstringSpatial reference system (typically EPSG:4326)
location_typestringFormat identifier (e.g., geojson-point)
locationstringStringified GeoJSON geometry
longitudenumberExtracted longitude (for points)
latitudenumberExtracted latitude (for points)
memostringOptional description
revokedbooleanWhether attestation has been revoked

Error Responses

Invalid Chain

{
  "status": "error",
  "message": "Invalid chain parameter",
  "detail": "Supported chains: base-sepolia, sepolia, arbitrum, celo"
}

Invalid Bounding Box

{
  "status": "error",
  "message": "Invalid bbox format",
  "detail": "Expected format: minLng,minLat,maxLng,maxLat"
}