Query data
OriginChain answers five kinds of question against the same database. Pick the one that matches what you're trying to do - structured filters use SQL, similarity uses vectors, keywords use full-text, relationships use graph, and natural-language sentences use Ask.
Each shape gets its own reference page below. The HTTP API reference lists every endpoint in one place. SDKs (Python, TypeScript, Go) wrap each one.
Use when you need filters, GROUP BY, aggregates, or JOINs. SELECT with WHERE / GROUP BY / LIMIT plus INNER / LEFT / RIGHT / FULL OUTER joins (up to 32 tables).
Use for semantic search, RAG, and recommendations. Top-k nearest-neighbor lookup over embeddings with optional metadata filtering.
Use for keyword search. BM25 ranked, boolean AND, or exact-phrase. 18-language stemming and lemmatization in 9.
Use for relationship walks - neighbors, multi-hop BFS, shortest path, PageRank. 19 algorithms.
Use when you'd rather write English than SQL. Sentence in, rows out. Compiled plans are cached so repeat questions are fast.
Shared mechanics.
Every shape compiles to a JSON-serialisable Plan tree, cached by question hash, replayable. ?explain=true on any read endpoint returns the executed plan annotated with per-node row counts and µs timings. Cancel an in-flight plan with the ULID handed back in X-OC-Query-Id.
For the operator catalog (Scan, IndexScan, Filter, HashJoin, OuterJoin, Aggregate, Sort, Limit, RelationHop), see core concepts → plan tree.