# Context.dev

Search descriptions, native domain filters, and request-reported credits, with a broader native web-data API.

Canonical: https://searchsdk.dev/docs/providers/context
Markdown: https://searchsdk.dev/docs/providers/context.md

<a id="overview"></a>

## Normalized search

Normalized search maps `description` to snippet, `request_id` to provenance, and `key_metadata.credits_consumed` to credit usage. A returned `partial: true` produces a provider warning. String relevance is not a numeric score.

**context-search.ts · server**

```typescript
import { createSearch } from '@belweave/search-sdk';
import { context } from '@belweave/search-sdk/context';

const apiKey = process.env.CONTEXT_API_KEY;
if (!apiKey) throw new Error('CONTEXT_API_KEY is required');

const client = createSearch({ provider: context({ apiKey }) });
const response = await client.web.search({
  query: 'SQLite write concurrency',
  limit: 5,
});
console.log(response.results, response.attempts);
```

The normalized adapter requests at least ten native results because the provider overview and reference disagree on the minimum, then trims to the SDK limit. Those trimmed results can affect reported usage. Optional Markdown and highlight extraction are not enabled by normalized search.

100 include / 100 exclude; 500 UTF-16 code-unit query ceiling.

<a id="native-client"></a>

## Provider-native client

**context-native.ts · server**

```typescript
import { createContextClient } from '@belweave/search-sdk/native-context';

const apiKey = process.env.CONTEXT_API_KEY;
if (!apiKey) throw new Error('CONTEXT_API_KEY is required');

const client = createContextClient({ apiKey, timeoutMs: 10_000 });
const response = await client.search({ body: { query: 'SQLite write concurrency', numResults: 10 } });
console.log(response.data, response.metadata);
```

Read provider data from `response.data` and sanitized transport details from `response.metadata`. Native TypeScript response types are not runtime schema validation. Preserve the operation's native response and source identities.

<a id="operations"></a>

## Native operation inventory

Methods available on this native client. Paths are relative to each operation's fixed base; a provider may use more than one origin. Eligible operations retry only when you opt into a client retry policy.

| Method | HTTP / relative path | Response / retry eligibility |
| --- | --- | --- |
| `headLogo` | `HEAD /` | raw · eligible |
| `submitFeedback` | `POST /feedback` | json · no automatic retry |
| `listLogs` | `GET /org/logs` | json · eligible |
| `getLog` | `GET /org/logs/{request_id}` | json · eligible |
| `listProfiles` | `GET /org/browser/profiles` | json · eligible |
| `getUsage` | `GET /org/usage` | json · eligible |
| `getUsageHistory` | `GET /org/usage/history` | json · eligible |
| `listWebhookDeliveries` | `POST /webhooks/deliveries` | json · no automatic retry |
| `getWebhookDelivery` | `GET /webhooks/deliveries/{delivery_id}` | json · eligible |
| `listWebhookDeliveryAttempts` | `GET /webhooks/deliveries/{delivery_id}/attempts` | json · eligible |
| `retryWebhookDelivery` | `POST /webhooks/deliveries/{delivery_id}/retry` | json · no automatic retry |
| `scrape` | `POST /web/scrape` | json · no automatic retry |
| `searchNews` | `POST /news/search` | json · no automatic retry |
| `answers` | `POST /web/answers` | json · no automatic retry |
| `parse` | `POST /parse` | json · no automatic retry |
| `map` | `GET /web/urls` | json · eligible |
| `crawl` | `POST /web/crawl` | json · no automatic retry |
| `extract` | `POST /web/extract` | json · no automatic retry |
| `search` | `POST /web/search` | json · no automatic retry |
| `enrichPerson` | `POST /people/enrich` | json · no automatic retry |
| `retrieveBrand` | `POST /brand/retrieve` | json · no automatic retry |
| `searchBrands` | `GET /brand/search` | json · eligible |
| `styleguide` | `GET /web/styleguide` | json · eligible |
| `fonts` | `GET /web/fonts` | json · eligible |
| `classifyNaics` | `GET /web/naics` | json · eligible |
| `classifySic` | `GET /web/sic` | json · eligible |
| `prefetch` | `POST /utility/prefetch` | json · no automatic retry |
| `createMonitor` | `POST /monitors` | json · no automatic retry |
| `listMonitors` | `GET /monitors` | json · eligible |
| `getMonitor` | `GET /monitors/{monitor_id}` | json · eligible |
| `updateMonitor` | `PATCH /monitors/{monitor_id}` | json · no automatic retry |
| `deleteMonitor` | `DELETE /monitors/{monitor_id}` | json · no automatic retry |
| `listMonitorRuns` | `GET /monitors/{monitor_id}/runs` | json · eligible |
| `getMonitorRun` | `GET /monitors/{monitor_id}/runs/{run_id}` | json · eligible |
| `listMonitorChanges` | `GET /monitors/{monitor_id}/changes` | json · eligible |
| `listAccountRuns` | `GET /monitors/runs` | json · eligible |
| `listMonitorCreditUsage` | `GET /monitors/credit-usage` | json · eligible |
| `getMonitorLimits` | `GET /monitors/limits` | json · eligible |
| `listChanges` | `GET /monitors/changes` | json · eligible |
| `getChange` | `GET /monitors/changes/{change_id}` | json · eligible |
| `runMonitorNow` | `POST /monitors/{monitor_id}/run` | json · no automatic retry |
| `rotateMonitorWebhookSecret` | `POST /monitors/{monitor_id}/webhook/rotate-secret` | json · no automatic retry |
| `submitBatch` | `POST /batch/submit` | json · no automatic retry |
| `listBatches` | `GET /batch/list` | json · eligible |
| `getBatch` | `GET /batch/{batch_id}` | json · eligible |
| `deleteBatch` | `DELETE /batch/{batch_id}` | json · no automatic retry |
| `getBatchResults` | `GET /batch/{batch_id}/results` | json · eligible |
| `cancelBatch` | `POST /batch/{batch_id}/cancel` | json · no automatic retry |
| `searchCompanies` | `POST /company/search` | json · no automatic retry |

Additional client helpers: `logoUrl`. These reuse catalog operations or expose a native output variant. Their input and response types remain in the provider subpath.

<a id="lifecycle"></a>

## Limits and operation lifecycle

- Pass `signal` and per-call `timeoutMs` on native request input when needed.
- Persist a returned job identifier before explicitly reading or polling the same job. Native clients do not automatically poll.
- SSE data is incremental provider event text. Parse and validate terminal or error events according to the provider contract; there is no reconnect or replay.
- Native operations may create, delete, ingest, or incur charges. A successful HTTP response is not proof that a remote job completed.

<a id="sources"></a>

## Official sources

Use the official reference for current schemas, account access, and operation-specific requirements.

- [Search reference](https://docs.context.dev/api-reference/web-scraping/search)
- [Search overview](https://docs.context.dev/search/overview)
- [Page content](https://docs.context.dev/search/page-content)

- [Native request and response reference](https://searchsdk.dev/docs/api/native-transport)
- [All providers](https://searchsdk.dev/docs/providers)
