Thanks to visit codestin.com
Credit goes to docs.context.dev

Skip to main content
Scrape content, retrieve brand and design data, or start a background job. Choose an API below and try it with cURL or the TypeScript, Python, Ruby, Go, or PHP SDK. Prefer to have an agent set this up? Copy the setup prompt in Agent Quickstart.

1. Get an API key

Create an account, then copy a secret API key from API Keys in the dashboard. Set the key in the shell where you’ll run your request:
Keep this key on your server. Do not commit it or include it in browser code.

2. Choose your client

cURL needs no package installation. Choose your language below; the SDK setup guides cover runtime requirements. These shell commands work on macOS, Linux, or WSL.
Skip go mod init if your project already has a go.mod. Save the SDK example in a file and run it with the matching command:

3. Make a request

Choose an API, then your language.
Read example.com and keep its main content. A successful request costs 1 credit.
The SDK examples print the page’s Markdown, beginning with the heading Example Domain. The cURL request returns JSON; this excerpt shows the fields to check:
Response excerpt
Page text can change. The full response also includes content length, page metadata, cache information, and credit usage.Markdown requests may return cached results up to one day old by default. Set maxAgeMs=0 when you need a new fetch. See Scrape for content selection and freshness options.

If the request fails

For 401, check that the key is set in the same shell or process as your request. For 400 or 422, read the response message and error_code, when present, before retrying. For 429, wait for the Retry-After window. Troubleshooting covers other errors, including blocked websites, missing brands, and timeouts.

Keep building

Extract structured data

Extract fields from a website into your JSON Schema.

Crawl a website

Follow links and collect content from multiple pages.

Retrieve brand data

Look up company logos, colors, and profile details.

Production checklist

Prepare your integration for retries, missing data, and usage limits.

API reference

Check all request parameters and response fields.