query

Execute an RQL query

Execute SQL-like queries against documents using ReasonDB Query Language (RQL).

Supports:

  • WHERE clauses for filtering by tags, author, metadata
  • SEARCH clause for BM25 full-text search (fast keyword matching)
  • REASON clause for LLM semantic search (intelligent answer extraction)
  • GROUP BY and aggregate functions (COUNT, SUM, AVG)
  • EXPLAIN to view query execution plans
post/v1/query

Request body

querystring required

RQL query string

timeout_msinteger

Optional timeout in milliseconds

Example request

{
  "query": "SELECT * FROM legal WHERE author = 'Alice' LIMIT 10"
}

Response

Query executed successfully

total_countinteger

Total count before pagination

execution_time_msinteger

Execution time in milliseconds

Changes

Changed in 3 of the 7 revisions of this API.257

  • 30999982e9d4131See the full diff
    • ▲

      the response's property type changed from object to no type for status

      response-property-type-changed

    • ●

      removed the optional property / from the response with the status

      response-optional-property-removed

    • ●

      removed the optional property / from the response with the status

      response-optional-property-removed

    • ●

      removed the optional property / from the response with the status

      response-optional-property-removed

    • ○

      added to the response property allOf list for the response status

      response-property-all-of-added

  • 180d59085b7811See the full diff
    • ●

      removed the optional property // from the response with the status

      response-optional-property-removed

    • ○

      added the optional property // to the response with the status

      response-optional-property-added

  • 9404aa4fdc22115See the full diff
    • ▲

      the response's property type changed from no type to object for status

      response-property-type-changed

    • ●

      removed the optional property // from the response with the status

      response-optional-property-removed

    • ○

      added the optional property // to the response with the status

      response-optional-property-added

    • ○

      added the optional property / to the response with the status

      response-optional-property-added

    • ○

      added the optional property / to the response with the status

      response-optional-property-added

    • ○

      added the optional property / to the response with the status

      response-optional-property-added

    • ○

      removed from the response property allOf list for the response status

      response-property-all-of-removed

    This revision also has 12 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog