Compare

How do I add a backup to Context.dev's scrape API?

Keep Context.dev as your primary, since on its larger plans a page costs about the same as on UpRock or less, and send UpRock only the scrapes that come back failed, which arrive inside a normal HTTP 200 with success set to false. Leave alone the failures a second crawler can't fix, like a real 404 or a file type it doesn't support.

Updated · Read as markdown

What Context.dev does well

Context.dev (formerly Brand.dev) is a web scraping API for AI agents with a lot bundled into one key: single-page scrapes that return markdown, HTML or JSON extracted against a schema, site crawls of up to 500 pages, URL maps, search, answers, batches, monitors that watch pages for changes, PDF and Word parsing, and the brand and company data it started with. Every request loads in a real browser with JavaScript, it can fetch from a chosen country, and there are Python and TypeScript SDKs and an official MCP server with 42 tools. It claims a 99.96% scrape success rate.

And on its bigger plans it's priced like UpRock. If it covers your pages, keep it.

A failed scrape still answers 200

Context.dev's docs are direct about it: inspect each output's success "even after HTTP 200". When a scrape fails, the markdown output comes back with success: false, data: null and an error_code. Here's how we'd route each code:

error_codeWhat it meansWhat to do
WEBSITE_BLOCKEDThe site blocked Context.dev's requestSend to UpRock
REQUEST_TIMEOUTThe page didn't load in timeSend to UpRock
WEBSITE_ACCESS_ERRORContext.dev couldn't reach the siteSend to UpRock
INTERNAL_ERRORSomething failed on Context.dev's sideSend to UpRock
NOT_FOUNDA real 404 from the site (still billed)Don't retry
UNSUPPORTED_CONTENT, CONTENT_TOO_LARGE, PDF_IMAGES_ONLYThe content itself is the problemDon't retry

Problems with the request itself come back as HTTP errors, which the SDKs throw: 401 for the key, 402 when you're out of credits, 408 at the deadline, 429 at the concurrency limit, 5xx on Context.dev's side, all worth sending to UpRock. A 403 can mean a domain restriction, and a 400 a bad request; fix or respect those.

One more trap: the SDKs wait up to 60 seconds per attempt and retry twice, while a scrape's own deadline defaults to 90 seconds. Raise the timeout and turn off retries, so a slow page fails over instead of being tried three times.

What a page costs by plan

At one credit per markdown page (two with browser actions, five with JSON extraction), from Context.dev's pricing page, checked 4 Nov 2026:

PlanMonthlyCreditsPer 1,000 pages, monthlyPer 1,000, billed yearlyOverage per 1,000
Free$01,000none
Developer$2010,000$2.00$1.67$3.00
Pro$90100,000$0.90$0.75$2.00
Growth$300500,000$0.60$0.50$1.50
Scale$5001,000,000$0.50$0.42$1.00
Scale 2.5M$9502,500,000$0.38$0.32$0.75
UpRockprepaid$0.50$0.50

The per-page prices assume you use the whole allowance; past it, overage costs $0.75 to $3.00 per 1,000. Cache hits count as pages.

Context.dev and UpRock side by side

Context.devUpRock
Price per 1,000 pages$2.00 to $0.32 by plan (table above)$0.50 by card or USDC, $0.40 with UPT
Failed scrapesNot charged unless an output succeeded; a 404 isNot documented yet
Crawl, map, search, monitors, JSON extraction, brand dataYesNo. One page per call
CountrysharedParams.country, two-letter codeEvery request: 63 countries, or a region
Where requests come fromProxies; their type and location aren't statedDevices whose owners opted in
Concurrency1 to 500 by planNot published yet
MCP serverOfficial, hosted, 42 tools, OAuth or key in a headerYes, remote (streamable HTTP)
VideoYouTube captions and metadata; a TikTok video URLSearch public video by moment, $1 per 1,000 searches
To try it1,000 credits a month, no cardPrepaid credits

Where Context.dev is better: everything bundled beyond the page fetch, structured extraction, monitors, brand data, low prices on the bigger plans, and a free tier. Where UpRock fits: a second, independent network for the scrapes that fail, one price with no plan, and video search.

The fallback, in TypeScript and Python

Every version ask Context.dev for fresh markdown (maxAgeMs: 0) in the country you pass, with the SDK's retries off and its timeout raised past the scrape deadline. A successful output is used. A failed output with a routable code, or an HTTP error that isn't 400 or 403, goes to UpRock; anything else raises. UpRock gets one POST /v1/crawl request with your key in an Authorization: Bearer header; the MCP and CLI tabs do the same through UpRock's MCP server (TypeScript) or CLI (Python).

// npm i context.dev   (Node 18+)   env: CONTEXT_DEV_API_KEY, UPROCK_API_KEYimport ContextDev, { APIError } from "context.dev";​// A scrape's deadline is 90 s by default, longer than the SDK's 60 s per attempt, and the SDK// retries twice. Give it room and fail over to UpRock instead of retrying.const ctx = new ContextDev({  apiKey: process.env.CONTEXT_DEV_API_KEY,  timeout: 120_000,  maxRetries: 0,});​// Output-level error codes worth a second try on another network. NOT_FOUND (a real 404,// billed), UNSUPPORTED_CONTENT, CONTENT_TOO_LARGE and PDF_IMAGES_ONLY won't change.const TRY_UPROCK = new Set([  "WEBSITE_BLOCKED",  "REQUEST_TIMEOUT",  "WEBSITE_ACCESS_ERROR",  "INTERNAL_ERROR",]);​async function viaUpRock(url: string, country: string) {  // One call: UpRock loads the page on a real device in that country, tries a fresh device  // every 7 s (up to 3 tries) and returns markdown. Failed calls aren't billed.  const res = await fetch("https://edge.uprock.com/v1/crawl", {    method: "POST",    headers: {      Authorization: `Bearer ${process.env.UPROCK_API_KEY}`,      "Content-Type": "application/json",    },    body: JSON.stringify({ url, country }),    signal: AbortSignal.timeout(90_000),  });  const page = await res.json();  if (!res.ok) throw new Error(`UpRock ${res.status} ${page.code}: ${page.error}`);  return page.markdown ?? "";}​export async function read(url: string, country = "US") {  try {    const res = await ctx.web.scrape({      url,      formats: { markdown: true },      sharedParams: { country },      maxAgeMs: 0, // fresh fetch; cached copies (up to 3 days old by default) are billed too    });    // HTTP 200 doesn't mean the page came back: check the output itself.    if (res.markdown.success && res.markdown.data)      return { via: "context.dev", markdown: res.markdown.data };    const code = res.markdown.error_code ?? "UNKNOWN";    if (!TRY_UPROCK.has(code))      throw new Error(`Context.dev: ${code} ${res.markdown.message ?? ""}`);    console.warn(`Context.dev: ${code}; trying UpRock`);  } catch (err) {    if (err instanceof APIError) {      // 400 is a bad request and 403 covers domain restrictions: fix or respect those.      if (err.status === 400 || err.status === 403) throw err;      // 401 (key), 402 (out of credits), 408 (deadline), 429 (concurrency), 5xx.      console.warn(`Context.dev ${err.status}; trying UpRock`);    } else if ((err as Error).message.startsWith("Context.dev:")) {      throw err;    } else {      console.warn(        `Context.dev unreachable (${(err as Error).message}); trying UpRock`,      );    }  }  return { via: "uprock", markdown: await viaUpRock(url, country) };}​// node read.ts https://developer.mozilla.org/en-US/docs/Web/HTTP DEconst [url = "https://developer.mozilla.org/en-US/docs/Web/HTTP", country = "US"] =  process.argv.slice(2);const page = await read(url, country);console.log(page.via, page.markdown.slice(0, 200));

Tested 21 Oct 2026 against the live UpRock API with an invalid Context.dev key: the SDKs raised a 401 and both versions fell back to UpRock. Without an account, the output-level codes follow Context.dev's error docs and SDK types (context.dev 3.13 for Node, 2.35 for Python). On 6 Nov 2026 we ran the HTTP and MCP versions again with an UpRock API key in an Authorization header: with an invalid Context.dev key, each fell back to UpRock and got the page.

FAQ

How does Context.dev report a page it couldn't scrape?

Inside an HTTP 200. Its docs say to inspect each output's success field even after a 200; a failed markdown output has success false, no data and an error_code such as WEBSITE_BLOCKED or REQUEST_TIMEOUT. HTTP errors (401, 402, 408, 429, 5xx) are for problems with the request itself.

Is UpRock cheaper than Context.dev?

Not always. Used fully, Context.dev's plans work out to $2.00 per 1,000 pages on Developer down to $0.38 on Scale 2.5M, and yearly billing takes two months off. UpRock is $0.50 per 1,000 pages without a plan. The case for UpRock here is a second network for the pages that fail, not price.

Does Context.dev charge for failed scrapes?

Its credits docs say the charge applies when at least one output succeeds, including cache hits, and a target 404 is still charged. Validation, authentication, permission, timeout, rate-limit and server errors aren't.

Why set maxAgeMs to 0?

Context.dev serves cached copies up to three days old by default, and a cache hit is still billed. maxAgeMs 0 asks for a fresh fetch, which is what you want before deciding a page failed.

Is there a risk in sending lots of failing requests?

On the free plan, yes. Context.dev's troubleshooting docs say free organizations can have all keys disabled after repeated failed requests, so it's worth moving stubborn pages elsewhere instead of retrying them.

Other use cases to explore

References

Get started

Add UpRock in one paste.

Paste this into Claude Code, Codex, Cursor or any agent with a terminal. It reads our docs, sets up the MCP server or CLI, and tells you the cost before it spends anything.

Set up UpRock for me: read https://uprock.ai/agents.md, connect the UpRock MCP server, and run one test crawl. Tell me what it costs before you spend anything.

How do I add a backup to Context.dev's scrape API? | UpRock AI