Quickstart
This guide sends one question to several research providers, waits for them, and reads their cited reports. You’ll need a Deeper Research account with a few dollars of credit. You see the exact estimate before anything is charged.
-
Create an API key
Section titled “Create an API key”In the web app, open Settings → API keys and create a key. It starts with
dr_live_and is shown only once. Keep it in an environment variable:Terminal window export DEEPER_RESEARCH_API_KEY="dr_live_..."If you don’t have credit yet, add some in Settings → Billing.
-
Check the key
Section titled “Check the key”Terminal window curl https://deeperesearch.com/v1/credits \-H "Authorization: Bearer $DEEPER_RESEARCH_API_KEY"{ "available_usd": 25, "held_usd": 0, "debt_usd": 0 }A
401means the key is wrong or was revoked. -
Estimate the cost
Section titled “Estimate the cost”Pick providers with a preset (
fast,balancedorthorough), or list them yourself fromGET /v1/vendors. Estimating is free:Terminal window curl https://deeperesearch.com/v1/research/estimate \-H "Authorization: Bearer $DEEPER_RESEARCH_API_KEY" \-H "Content-Type: application/json" \-d '{ "vendors": "fast" }'The response lists each provider’s low, expected and worst-case price.
total.hold_usdis the worst case: the most this research can cost. -
Start the research
Section titled “Start the research”Set
max_cost_usdto at leasttotal.hold_usd, so the request is refused rather than run if prices change. TheIdempotency-Keyheader makes retries safe: sending the same key again returns the same research instead of starting (and charging) a second one.Terminal window curl https://deeperesearch.com/v1/research \-H "Authorization: Bearer $DEEPER_RESEARCH_API_KEY" \-H "Content-Type: application/json" \-H "Idempotency-Key: quickstart-1" \-d '{"query": "Which Postgres-backed job queues for Node.js are production-ready in 2026, and how do they compare?","vendors": "fast","max_cost_usd": 5}'The response comes back at once with status
202and the researchid. Each provider now works on the question in parallel, which takes a few minutes. -
Wait for it to finish
Section titled “Wait for it to finish”Check the research every 15–30 seconds until
statusiscompleted,failedorcancelled:Terminal window curl https://deeperesearch.com/v1/research/RESEARCH_ID \-H "Authorization: Bearer $DEEPER_RESEARCH_API_KEY"Each entry in
runsshows one provider’s state. Research iscompletedonce its providers have finished and at least one delivered a report;charged_usdthen shows what it actually cost. In production, use webhooks instead of polling. -
Read the reports
Section titled “Read the reports”Terminal window curl https://deeperesearch.com/v1/research/RESEARCH_ID/reports \-H "Authorization: Bearer $DEEPER_RESEARCH_API_KEY"Each report has the provider’s write-up in
body_markdown, citing sources as[1],[2]and so on, and the matchingcitationswith URL, title and domain. The same research is in your library in the web app.
The whole thing in code
Section titled “The whole thing in code”// Node 18+ or any runtime with fetch.const API = "https://deeperesearch.com/v1";const headers = { Authorization: `Bearer ${process.env.DEEPER_RESEARCH_API_KEY}`, "Content-Type": "application/json",};
async function api(method, path, body, extraHeaders = {}) { const res = await fetch(`${API}${path}`, { method, headers: { ...headers, ...extraHeaders }, body: body ? JSON.stringify(body) : undefined, }); const json = await res.json(); if (!res.ok) throw new Error(`${json.error.code}: ${json.error.message}`); return json;}
const vendors = "fast";const estimate = await api("POST", "/research/estimate", { vendors });console.log(`Expected $${estimate.total.expected_usd}, at most $${estimate.total.hold_usd}`);
const research = await api( "POST", "/research", { query: "Which Postgres-backed job queues for Node.js are production-ready in 2026, and how do they compare?", vendors, max_cost_usd: estimate.total.hold_usd, }, { "Idempotency-Key": crypto.randomUUID() },);
let current = research;while (!["completed", "failed", "cancelled"].includes(current.status)) { await new Promise((r) => setTimeout(r, 20_000)); current = await api("GET", `/research/${research.id}`); console.log(current.runs.map((r) => `${r.vendor}: ${r.state}`).join(", "));}
const { data: reports } = await api("GET", `/research/${research.id}/reports`);for (const report of reports) { console.log(`\n## ${report.vendor} (${report.citations.length} sources)\n`); console.log(report.body_markdown);}console.log(`\nCharged $${current.charged_usd}`);# pip install requestsimport os, time, uuidimport requests
API = "https://deeperesearch.com/v1"session = requests.Session()session.headers["Authorization"] = f"Bearer {os.environ['DEEPER_RESEARCH_API_KEY']}"
def api(method, path, body=None, headers=None): res = session.request(method, API + path, json=body, headers=headers) data = res.json() if not res.ok: raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}") return data
vendors = "fast"estimate = api("POST", "/research/estimate", {"vendors": vendors})print(f"Expected ${estimate['total']['expected_usd']}, at most ${estimate['total']['hold_usd']}")
research = api( "POST", "/research", { "query": "Which Postgres-backed job queues for Node.js are production-ready in 2026, and how do they compare?", "vendors": vendors, "max_cost_usd": estimate["total"]["hold_usd"], }, headers={"Idempotency-Key": str(uuid.uuid4())},)
current = researchwhile current["status"] not in ("completed", "failed", "cancelled"): time.sleep(20) current = api("GET", f"/research/{research['id']}") print(", ".join(f"{r['vendor']}: {r['state']}" for r in current["runs"]))
for report in api("GET", f"/research/{research['id']}/reports")["data"]: print(f"\n## {report['vendor']} ({len(report['citations'])} sources)\n") print(report["body_markdown"])print(f"\nCharged ${current['charged_usd']}")Next steps
Section titled “Next steps”- Merge the reports into one cited synthesis, and see where providers agree and disagree.
- Attach files, such as a spec or a PDF, for providers to read with the question.
- Get a webhook when research finishes, instead of polling.
- Browse every endpoint in the API reference.