Pocket Search

Deep Research API · Perplexity Agent API compatible

High-quality deep research for agents and production workflows

Perplexity Agent API compatible. POST to /v1/agent, poll for the result. Works with the Perplexity SDK and the OpenAI SDK out of the box.

Focused, Thorough, and Comprehensive use 1, 2, and 4 prepaid credits per run.

Perplexity / OpenAI SDK compatible 10, 30, or 60 minutes Reads full pages and PDFs Structured source data
# Submit a research question (async-only: every create returns queued)
curl -X POST https://pocketsearch.ai/v1/agent \
  -H "Authorization: Bearer $POCKET_SEARCH_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input": "State of solid state battery manufacturing, 2026",
       "preset": "high"}'

# {"id": "resp_7f3d…", "status": "queued", "output": []}

# Poll /v1/agent/resp_7f3d… until terminal, read .output

Three research grades

Choose the depth for each API run

Reads real pages

Every run fetches and reads source pages and PDFs, not just snippets. Set 10m, 30m, or 60m to control depth.

Returns Markdown

The completed response includes a cited report that can be stored, rendered, or passed to another system without conversion.

Keeps sources structured

The search_results output item carries every query and source the research examined. The Markdown report links to the cited subset.

Editing pass included

Every report goes through a final editing pass that cleans up process artifacts and produces reader-ready prose.

Survives disconnects

Research continues on the server if a process exits or the network drops. Finished results remain available for 24 hours.

Research receipt included

Every terminal response carries a research_receipt under usage.pocket_search. It lists queries run with their surfaced results and source investigations.

SDK compatibility

Works with Perplexity and OpenAI SDKs

The API implements the Perplexity Agent API format. Point your existing SDK at Pocket Search by changing the base URL and API key. The same endpoints serve both SDKs.

Perplexity SDK

// baseURL: no /v1 suffix
// (the SDK bakes /v1 into paths)
import Perplexity from
  '@perplexity-ai/perplexity_ai';

const client = new Perplexity({
  apiKey: POCKET_SEARCH_KEY,
  baseURL: "https://pocketsearch.ai",
});

const res = await client.responses
  .create({
    preset: "high",
    input: "Solid state batteries…",
  });

// Every create is async: res comes back "queued" with an id.
// Poll until terminal, then read the answer.
let out = res;
while (!["completed", "failed", "incomplete", "cancelled"].includes(out.status)) {
  await new Promise((r) => setTimeout(r, 15000));
  out = await client.responses.retrieve(res.id);
}
console.log(out.output_text);

OpenAI SDK

// baseURL: include /v1 suffix
// (the SDK expects it in baseURL)
import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: POCKET_SEARCH_KEY,
  baseURL: "https://pocketsearch.ai/v1",
});

const res = await client.responses
  .create({
    model: "default",
    input: "Solid state batteries…",
  });

// Same pattern: create returns "queued" with an id; poll retrieve().
let out = res;
while (!["completed", "failed", "incomplete", "cancelled"].includes(out.status)) {
  await new Promise((r) => setTimeout(r, 15000));
  out = await client.responses.retrieve(res.id);
}
console.log(out.output_text);

Both SDKs surface response.output_text on the poll. Credit cost, duration, refunds, and the research_receipt live under usage.pocket_search.

Pricing

Three grades, one credit balance

Focused, Thorough, and Comprehensive use 1, 2, or 4 prepaid credits. Packs start at $6. See every pack on the pricing page.

$6 pack 16 Focused · 8 Thorough · 4 Comprehensive
$20 pack 56 Focused · 28 Thorough · 14 Comprehensive
$35 pack 120 Focused · 60 Thorough · 30 Comprehensive
No subscription. Buy credits, use them at any grade. Failed runs return their reserved credits automatically.

Get a key

Request API access

Request a key and we'll send you a quickstart guide.

Enter your email for API access updates.

FAQ

Deep research API FAQ

Is the API available now?

Yes. Request a key above and we'll send you a quickstart guide.

Which research modes does the API support?

Three grades: Focused (up to 10 min), Thorough (up to 30 min), and Comprehensive (up to 60 min). Set mode to 10m, 30m, or 60m on each request.

How is pricing calculated?

Focused, Thorough, and Comprehensive use 1, 2, and 4 credits. With the $35 pack, that's about $0.29, $0.58, or $1.17 per report.

How does the async API work?

Every POST /v1/agent returns a response ID immediately — the API is async-only. Research continues on the server if the client disconnects. Poll GET /v1/agent/{id} until status is terminal, then read the output.

What does a completed response contain?

A Perplexity Agent API compatible response with an output array: a search_results item with every query and source examined, and a message item with the Markdown report. Usage includes a research_receipt with queries run, sources opened, and source investigations. Timestamps and status are included.

How does authentication work?

Send your API key as a Bearer token in the Authorization header. Keys are issued directly by Pocket Search.

Does the API work with Perplexity and OpenAI SDKs?

Yes. The API implements the Perplexity Agent API format at /v1/agent (aliased at /v1/responses for OpenAI SDK compatibility). Point your existing SDK at Pocket Search by changing the base URL and API key.

What happens if a run fails?

Failed runs return their reserved credits automatically. The response includes credits_charged and credits_refunded so billing can be verified in code.

How long are results retained?

24 hours after a run finishes. Poll the same run ID during that window to retrieve the result.