How Ollagraph actually works.
No magic, no mystery box. One response envelope across every endpoint, a fetch path that escalates on its own and tells you which tier served the request, honest credit metering that refunds on our faults, and durable async jobs. Here is the whole story.
One bearer token spans the full 124-endpoint surface — see observability for what every response tells you.
Six architectural guarantees behind every request.
One response envelope, everywhere
Scrape, extract, domain intelligence, crawl, and async jobs all answer in the same shape: ok, status_code, final_url, text, and the diagnostic fields below. Learn the envelope once and every one of the 124 endpoints reads the same. No per-endpoint parsing, no surprises when you add a new call.
A tiered fetch path with automatic fallback
Most pages return over a fast HTTP path in milliseconds. When a page needs JavaScript or pushes back with a bot wall, the request escalates to our managed stealth browser engine automatically — same request, same response shape. You never pick a tier by hand and you never get a half-rendered page back.
It tells you which tier served the request
Every response carries tier_used, cascade_path, and cascade_failures. You can see exactly how a page was fetched, what was tried first, and why it escalated — so you can trust the data, debug a flaky source, and right-size your own retries instead of guessing.
Credit metering with refund-on-error
Credits are reserved atomically in the same transaction as the call decision — two requests with one credit left will see exactly one succeed. A successful call writes one usage-log row and decrements the ledger once. Server-side faults refund automatically, so a timeout or an upstream failure never costs you a credit.
Async jobs over a durable queue
Async scrapes, batches, and full-site crawls hand off to a queue and return a job_id immediately. A pool of workers does the work, retries transient failures, and ends every job in completed, failed, or expired — never silently dropped. Poll the job endpoint or take a signed webhook on completion.
Exposed to agents over MCP
The same endpoints are published as Model Context Protocol tools, so an AI agent can scrape, extract, and enrich through one bearer token without bespoke glue code. The MCP surface mirrors the API one-to-one — the envelope an agent sees is the envelope your code sees.
See it in the response.
The envelope is the contract. These are real fields you get back today.
# Every endpoint answers in the same envelope — scrape, extract, intel, jobs.
{
"ok": true,
"status_code": 200,
"final_url": "https://example.com/",
"text": "# Example Domain\n\nThis domain is for use in...",
"tier_used": "fast_http",
"cascade_path": ["fast_http"],
"cascade_failures": [],
"credits_charged": 1,
"request_id": "req_2c9a1f7e"
} # A page that fights back escalates automatically — and tells you how it was served.
{
"ok": true,
"status_code": 200,
"final_url": "https://shop.example.com/p/123",
"tier_used": "stealth_browser",
"cascade_path": ["fast_http", "stealth_browser"],
"cascade_failures": [
{"tier": "fast_http", "reason": "bot_blocked"}
],
"credits_charged": 3
} # Long jobs return immediately; you poll the job or take the webhook.
curl -X POST https://api.ollagraph.com/v1/scrape/async \
-H "Authorization: Bearer $OLLAGRAPH_API_KEY" \
-d '{"url": "https://example.com", "format": "markdown"}'
# -> {"job_id": "job_8f31...", "status": "queued"}
curl https://api.ollagraph.com/v1/jobs/job_8f31... \
-H "Authorization: Bearer $OLLAGRAPH_API_KEY"
# -> {"status": "completed", "result": { ...same envelope as above... }} The request lifecycle.
What happens between the moment you send a request and the moment you get a response.
1. Authenticate
Your bearer key is checked against its stored hash. Invalid or expired keys are rejected before any real work is scheduled.
2. Rate limit & reserve credits
Per-plan limits are applied, then the credit ledger is decremented in the same atomic transaction as the call decision. Two simultaneous requests with one credit left will see exactly one succeed.
3. Route & fetch
Synchronous endpoints run inline; async endpoints register a job and return a job_id immediately. The fetch path starts fast and escalates to our managed stealth browser engine only when the page demands it.
4. Respond, refund on fault, log
You get the canonical envelope back with tier_used and cascade_path filled in. Server-side faults refund the credit automatically. One usage-log row is written, and your dashboard surfaces it in real time.
The same lifecycle backs scraping, browser automation, and the MCP server.
Architecture questions
1 What is the response envelope, and is it really the same on every endpoint?
What is the response envelope, and is it really the same on every endpoint?
2 What does tier_used tell me?
What does tier_used tell me?
3 Do I have to choose between the fast path and the browser?
Do I have to choose between the fast path and the browser?
4 When does a request escalate, and when does it not?
When does a request escalate, and when does it not?
5 How does credit metering avoid double-charging or undercharging?
How does credit metering avoid double-charging or undercharging?
6 What happens to credits when a request fails?
What happens to credits when a request fails?
7 How do async jobs and webhooks work?
How do async jobs and webhooks work?
8 Can an AI agent use Ollagraph directly?
Can an AI agent use Ollagraph directly?
9 Do you store the pages I fetch?
Do you store the pages I fetch?
10 How is the platform protected in transit and at rest?
How is the platform protected in transit and at rest?
One envelope. One token. Every endpoint.
1,000 free credits, refund-on-error built in, and a response that always tells you how it was served.