Search Medical Papers
Search medical and biomedical papers with a natural-language question.
Federates PubMed, PMC full-text, ClinicalTrials.gov, and Semantic Scholar,
then synthesizes a cited answer.
Implementation: invokes the `medical-agent` Lambda (TypeScript, Mastra,
Claude Sonnet). Streaming responses flow through the `captain-stream` S2
basin — identical pattern to `/v2/collections/{name}/query`.
Request
This endpoint expects an object.
question
Natural-language question.
include_trials
Whether the agent may call ClinicalTrials.gov.
max_sources
Target number of cited sources in the final answer.
recency_years
Prefer evidence within the last N years where the question allows.
stream
If true, response is text/event-stream; otherwise JSON.
Response
Synthesized answer with cited sources. Returns JSON by default; when stream=true the response is text/event-stream with tool.start, tool.end, text.delta, and run.end events.
answer
Synthesized answer with inline citations.
domain
The scientific domain, e.g. 'medical'.
gaps
Things the agent could not find or verify.
latency_ms
End-to-end wall-clock latency.
sources
tool_calls
Number of tool calls the agent made.
Errors
400
Search Medical Papers Request Bad Request Error
401
Search Medical Papers Request Unauthorized Error
403
Search Medical Papers Request Forbidden Error