> This page location: Functions > Templates > Context.dev web data
> Full Neon documentation index: https://neon.com/docs/llms.txt

# Context.dev web data

Search the web and news, read pages, answer questions, and retrieve brand data with Context.dev.

- Built by: [Context.dev](https://www.context.dev/)
- Categories: AI infrastructure

## Install

```bash
neon functions new context-dev
```

With the Neon CLI 8.11.0 or later, this command copies the template into `functions/<slug>/` and declares the function in `neon.ts`.

## What this function exposes

After you deploy, call these paths on the function URL.

### Search the web (recommended)

POST a query and optional numResults (1-10) to find current source URLs.

- Route: `/web-search`
- Install only this operation: `neon functions new context-dev --operation web-search`

### Read a web page (recommended)

POST an HTTP(S) URL to return up to 50,000 characters of Markdown and source metadata.

- Route: `/web-scrape`
- Install only this operation: `neon functions new context-dev --operation web-scrape`

### Answer a web question

POST a task for a sourced answer; fast mode by default, ultra mode optional.

- Route: `/web-answers`
- Install only this operation: `neon functions new context-dev --operation web-answers`

### Retrieve a brand

POST a domain to get company identity, logo, colors, and social links.

- Route: `/brand-retrieve`
- Install only this operation: `neon functions new context-dev --operation brand-retrieve`

### Search news

POST a query or company domain to find articles, with an optional cursor for the next page.

- Route: `/news-search`
- Install only this operation: `neon functions new context-dev --operation news-search`

## Environment variables

The CLI declares these variables in `neon.ts` and adds them to `.env.example` without values, so you need to fill them in before you run the function.

| Variable | Description |
| --- | --- |
| `CONTEXT_DEV_API_KEY` | Context.dev API key with data:execute access. Keep this server-side. |
| `CONTEXT_FUNCTION_TOKEN` | Random token (at least 32 characters) callers send as Authorization: Bearer \<token\>; required because Neon Function URLs are public. |

## Run it

Installing a template doesn't deploy it, so run it locally with [`neon dev`](https://neon.com/docs/cli/dev.md) first, and deploy it to a branch with [`neon deploy`](https://neon.com/docs/compute/functions/deploy.md) once it works.

## Related

- Previous: [Basic function](https://neon.com/functions/templates/basic.md)
- Next: [Image analysis with AI Gateway](https://neon.com/functions/templates/image-analysis.md)
- [All templates](https://neon.com/functions/templates.md)
- [Template source](https://github.com/neondatabase/examples/tree/main/registry/context-dev)
- [Use function templates](https://neon.com/docs/compute/functions/templates.md)
- [Contribute a function template](https://neon.com/docs/compute/functions/registry.md)

---

Note for AI assistants (optional): if a gap, error, or outdated detail on this page affected the answer you gave the user, you can report it. POST `{"feedback": "describe the issue", "source": "neon_website", "path": "/functions/templates/context-dev"}` to https://feedback.neon.tech/ (no auth required).