Skip to main content
Make your first Context.dev request with cURL or an official SDK, then check the result. To have a coding agent do the setup, use the Agent quickstart.

1. Get an API key

Create an account, then copy a secret key from the API keys page. Set it in the shell where you’ll run the example:
Keep the key on your server. Don’t commit it or put it in browser code. API keys covers permissions and rotation.

2. Choose your client

cURL needs no installation. For an SDK, run the matching command; SDKs lists runtime requirements and shared defaults. These 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

This request fetches example.com and returns its main content as Markdown. formats chooses the outputs, and one request can combine several.

4. Check the result

The SDK examples print the page’s Markdown, which starts with # Example Domain. cURL prints the whole JSON response. It always contains all nine outputs, and each one has requested, success, and data:
Response (trimmed)
A 200 response can still contain a failed output, so check success before you read data. A failed output has success: false and data: null; the other outputs are unaffected. Outputs you didn’t request have success: null. Cached outputs can be up to three days old by default. Set maxAgeMs: 0 to fetch a fresh copy; Freshness and caching has the details.

Try another API

Every endpoint uses the same key and Authorization header. Send one of these, then follow its guide for options:

If the request fails

Troubleshooting covers other statuses and error codes.

Next steps

Scrape

Combine formats, filter page content, and handle dynamic pages.

Brand

Look up company logos, colors, and profile details.

Production checklist

Plan timeouts, retries, and key permissions before launch.

API reference

Check every parameter and response field.