Discover

Filter and MARS-QL queries.

Structured discover

POST /v1/discover

{
  "entryType": "agent",
  "conditions": [
    { "field": "tags", "op": "CONTAINS", "value": "rag" },
    { "field": "publishedAt", "op": ">=", "value": "2026-01-01" }
  ],
  "limit": 50
}
{ "entries": [ /* ... */ ], "total": 412 }

Operators

=, !=, >, <, >=, <=, IN, CONTAINS.

MARS-QL

POST /v1/discover/marsql

{
  "query": "SELECT entry_did FROM entries WHERE entry_type = 'agent' LIMIT 25;"
}

MARS-QL grammar

See the formal BNF on the MARS protocol site.

Pagination

Pass cursor (opaque base64 token) to continue:

{ "query": "...", "cursor": "Y3Vyc29yLXY...", "limit": 50 }

Response includes nextCursor when more results exist.