Pocket Search
← Back

Deep Research API & MCP server · 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.

Prepaid credits, no subscription. Packs start at $6.

Perplexity / OpenAI SDK compatible MCP server for Claude & ChatGPT 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. Pick a preset to set the depth.

Returns a polished report

The completed response includes a cited Markdown report written from the full research behind it, ready to store, render, or pass 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.

Survives disconnects

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

Works in Claude

Pocket Search is also an MCP server. Add it as a custom connector in Claude, ChatGPT, or any MCP client and ask from the chat. Runs use the same prepaid credits. See the MCP guide

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 as above from here: res comes back "queued"
// with an id; poll retrieve() until terminal.

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, and fast finishes return part of theirs.

Get a key

Create a key in seconds

Any Pocket Search account can create an API key instantly, even on the free credits. No waitlist, no approval.

FAQ

Deep research API FAQ

Is the API available now?

Yes. Any Pocket Search account, even on the free credits (no signup), can create a key and run a first request in minutes.

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 preset on each request: fast/low run Focused, medium/high run Thorough, and xhigh/wide-research run Comprehensive. You can also send mode directly as 10m, 30m, or 60m.

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.

Can Claude or other MCP clients use the research?

Yes. Pocket Search is also an MCP server at https://pocketsearch.ai/mcp. Add it as a custom connector in Claude, ChatGPT, or any other MCP client and sign in. Runs use the same prepaid credits as the HTTP API, and a retried request with the same idempotency key is never charged twice.

What about refunds?

Failed runs return their reserved credits automatically, and fast finishes return part of theirs: a Thorough run done in under 15 min returns 1 of its 2 credits, and a Comprehensive run done in under 30 min returns 3 of its 4. 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.

Documentation

All the details live in the docs

Every endpoint, preset, and status, plus the MCP guide, with copy-paste examples.