- Context handles search and reading pages. It finds pages, reads them as Markdown or typed JSON against a schema, and returns company and brand data. No browser session to manage.
- Anchor takes over when a real browser has to act. Use it for logins with MFA or a CAPTCHA, sessions that must stay signed in, form filling, checkout, and long multi-step flows.
Prerequisites
- Python 3.10 or higher, or Node.js 22 or higher
- A Context.dev API key from API keys
- An Anchor API key from the Anchor dashboard
- An Anchor identity for the app you sign in to. Managed authentication needs the Starter plan or higher.
This guide uses Net Sweet (
netsweet.co), the demo app that ships with every Anchor account, and its demo.admin identity. You can run every step below against it with no third-party account. Find the identity ID under Identities.


Setup
- Set your API keys:
- Install dependencies:
context.dev and imports as from context.dev import ContextDev. You don’t run playwright install or launch a browser locally. The browser runs in Anchor’s cloud, and the SDK drives it over Anchor’s API.
Choose your browser power
Not every page needs the same browser. Pick the session configuration for the target and move up only when a site fights back. The task is identical in each tier; only the session changes.
Agent-vpn is
session.proxy. Captcha solving needs an active proxy or a browser profile, and extra stealth needs an active proxy. Set session.timeout so a forgotten session ends itself. The example below reads the tier from an env var (ANCHOR_TIER=light|standard|max, default standard).
Part 1: Research with Context
Search the vendor’s own site, then scrape its pricing page into typed JSON with a schema. No browser session yet.include_domains (includeDomains in TypeScript) keeps the search on the vendor’s site. Without it, the top result for “Context.dev pricing” in our test was a third-party blog with outdated prices. json_params.instructions tells the extraction to list every plan and use only facts on the page. Check success on the JSON output before you read data.
Part 2: Act on it with Anchor
Start a session signed in with your identity, then hand the chosen plan toperform-web-task. Anchor fills and submits the request in the portal, and the finally block ends the session so it stops billing.
The full, runnable script:
Expected output
This output is from the Python script. Session IDs differ on every run, and the agent may take a different number of steps.



Use it from an MCP client instead
Both products run hosted MCP servers, so you can do the same thing from one prompt in Claude Code, Cursor, Codex or any MCP client, with no glue code. You add two server URLs and two API keys.
Keep the keys in your environment, as in Setup, and start the client from that shell. Each configuration below reads them by name, so no key is written into a config file.
- Claude Code
- Cursor
- Codex
Add a Start
.mcp.json file to the project root. Claude Code expands ${VAR} in headers when it starts..mcp.json
claude in that folder, approve the two project servers, and run /mcp. Both servers show as connected.- Context
web-scrapereads the pricing page. If the agent does not know the URL, it callsweb-searchfirst. - Anchor
create_sessionopens a cloud browser that is already signed in with the identity, with the proxy and captcha settings from the prompt. - Anchor
perform_web_taskfills the form in that session and returns aworkflow_id.get_web_task_statuspolls it until it completes. - Anchor
end_sessioncloses the browser, so billing stops.
A session stays open until
end_session or its max_duration. If the agent stops before it ends the session, for example in a headless run that exits when the turn ends, the 10 minute limit in the prompt caps the cost. To check one, ask the agent to call get_session with the session id it reported, or check the Anchor dashboard.Next steps
- Move up a session tier with proxies, captcha solving and extra stealth for sites that block automated browsers
- Create an identity for your own app with Managed Authentication, including MFA
- Return structured JSON from any task with
output_schema - Watch or debug runs with session recordings and live view
- Drive the browser step by step with the Anchor Browser MCP server
- Look up a company with Context’s Brand API before Anchor files the record
- See the same pattern with Firecrawl in the Firecrawl guide

