Skip to article

Context.dev

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

On this page

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
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.

Provider-native client

context-native.ts · server
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.

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.

49 / 49
MethodHTTP / relative pathResponse / retry eligibility
headLogoHEAD /raw · eligible
submitFeedbackPOST /feedbackjson · no automatic retry
listLogsGET /org/logsjson · eligible
getLogGET /org/logs/{request_id}json · eligible
listProfilesGET /org/browser/profilesjson · eligible
getUsageGET /org/usagejson · eligible
getUsageHistoryGET /org/usage/historyjson · eligible
listWebhookDeliveriesPOST /webhooks/deliveriesjson · no automatic retry
getWebhookDeliveryGET /webhooks/deliveries/{delivery_id}json · eligible
listWebhookDeliveryAttemptsGET /webhooks/deliveries/{delivery_id}/attemptsjson · eligible
retryWebhookDeliveryPOST /webhooks/deliveries/{delivery_id}/retryjson · no automatic retry
scrapePOST /web/scrapejson · no automatic retry
searchNewsPOST /news/searchjson · no automatic retry
answersPOST /web/answersjson · no automatic retry
parsePOST /parsejson · no automatic retry
mapGET /web/urlsjson · eligible
crawlPOST /web/crawljson · no automatic retry
extractPOST /web/extractjson · no automatic retry
searchPOST /web/searchjson · no automatic retry
enrichPersonPOST /people/enrichjson · no automatic retry
retrieveBrandPOST /brand/retrievejson · no automatic retry
searchBrandsGET /brand/searchjson · eligible
styleguideGET /web/styleguidejson · eligible
fontsGET /web/fontsjson · eligible
classifyNaicsGET /web/naicsjson · eligible
classifySicGET /web/sicjson · eligible
prefetchPOST /utility/prefetchjson · no automatic retry
createMonitorPOST /monitorsjson · no automatic retry
listMonitorsGET /monitorsjson · eligible
getMonitorGET /monitors/{monitor_id}json · eligible
updateMonitorPATCH /monitors/{monitor_id}json · no automatic retry
deleteMonitorDELETE /monitors/{monitor_id}json · no automatic retry
listMonitorRunsGET /monitors/{monitor_id}/runsjson · eligible
getMonitorRunGET /monitors/{monitor_id}/runs/{run_id}json · eligible
listMonitorChangesGET /monitors/{monitor_id}/changesjson · eligible
listAccountRunsGET /monitors/runsjson · eligible
listMonitorCreditUsageGET /monitors/credit-usagejson · eligible
getMonitorLimitsGET /monitors/limitsjson · eligible
listChangesGET /monitors/changesjson · eligible
getChangeGET /monitors/changes/{change_id}json · eligible
runMonitorNowPOST /monitors/{monitor_id}/runjson · no automatic retry
rotateMonitorWebhookSecretPOST /monitors/{monitor_id}/webhook/rotate-secretjson · no automatic retry
submitBatchPOST /batch/submitjson · no automatic retry
listBatchesGET /batch/listjson · eligible
getBatchGET /batch/{batch_id}json · eligible
deleteBatchDELETE /batch/{batch_id}json · no automatic retry
getBatchResultsGET /batch/{batch_id}/resultsjson · eligible
cancelBatchPOST /batch/{batch_id}/canceljson · no automatic retry
searchCompaniesPOST /company/searchjson · 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.

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.

Official sources

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