Base URL
Endpoints
| Endpoint | Purpose |
|---|---|
POST /query | Query S&P 500 filing evidence and return the requested response sections. |
GET /metadata-filters | List the metadata-filter fields and operators available for S&P 500 filings. |
Minimal Query
mode: "basic" and effort: "medium". It returns rendered evidence, evidence_instructions, and summary by default. To generate an answer, set include.answer to true.
Response Shape
/query returns a response with a stable request_id and optional top-level sections:
| Section | Contains |
|---|---|
evidence | Grounding text selected by include.evidence_format; rendered evidence includes a source-key footer, while XML evidence omits it. |
evidence_instructions | Domain-owned guidance for downstream LLMs on how to use the returned evidence. Returned by default when evidence is included. |
agent_context | Derived Markdown context block for direct handoff to another LLM or agent. |
metadata_distribution | Metadata distribution keyed by canonical field names, with readable display names and metric values inside each entry. |
metadata_dashboard | Rendered ASCII summary of the metadata distribution. |
summary | Selected mode, effort, filters, warnings, and evidence-path count. |
retrieval_plan | Retrieval query plan for agentic_research. |
answer | Generated answer grounded in retrieved filing evidence. Returned when include.answer is true. |
analysis | Generated analysis of the retrieved sources and metadata. Returned when include.analysis is true. |
Example Response Sections
Responses always includerequest_id. By default, /query returns rendered evidence, evidence_instructions, and summary. Other top-level sections are returned when enabled by include or by the selected query mode. The examples below are abbreviated to show their structure.
request_id
evidence
The API returns evidence as a string. With evidence_format: "rendered", the formatted evidence includes a trailing <source_key> quick reference. relevance_score is a system-derived integer from 0 to 10 that indicates how closely the evidence chain matches the query. confidence_score reflects the system’s confidence in the specific fact captured by that entry. An entry can cite multiple sources: all cited sources support the shared <consensus> claim, while each source can contribute distinct <observed_epistemic_statuses> and <additional_context>.
Returned JSON field:
evidence_instructions
evidence_instructions is returned by default when evidence is included. This top-level string contains domain-owned guidance for how a downstream LLM should use the returned evidence to generate a grounded answer. It is separate from the evidence content itself. Set include.evidence_instructions to false to omit it.
agent_context
Set include.agent_context to true to return agent_context. This top-level object is intended for direct handoff to another LLM or agent. It is a derived convenience payload, not the canonical evidence contract. Clients building custom prompts or UIs should use evidence and evidence_instructions directly.
Request agent_context without duplicating the raw top-level evidence fields:
content_type is currently always "text/markdown". text combines the domain-owned evidence-use instructions with the selected evidence format. With evidence_format: "rendered", the context includes rendered evidence; with evidence_format: "xml", it includes XML evidence with the same public XML formatting behavior as top-level evidence. source_fields lists the canonical response fields used to construct the payload.
metadata_distribution
This abbreviated example shows two distribution metrics keyed by canonical field names. evidence_paths is the evidence-path count. Metric entries include display_name plus values for distributions, or value for text summaries. The ... entry marks omitted metrics and is not returned literally.
metadata_dashboard
The API returns metadata_dashboard as a string.
Returned JSON field:
summary
retrieval_plan
answer
answer is returned only when include.answer is true.
analysis
analysis is returned only when include.analysis is true.