Skip to article

You.com

Web and news retrieval, optional extraction, and separate answer and research APIs.

On this page

Normalized search

Normalized search reads only the web section with snippets. Native count can apply independently to result sections; it is not a combined web-plus-news ceiling. Extraction settings belong to the native request.

you-search.ts · server
import { createSearch } from '@belweave/search-sdk';
import { you } from '@belweave/search-sdk/you';

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

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

Do not flatten news, knowledge, and full-page content into one source shape. Answer and Research are synthesis operations. SDK convenience defaults and raw HTTP defaults can differ; set native extraction behavior deliberately.

500 include or 5,000 exclude; both lists cannot be combined.

Provider-native client

you-native.ts · server
import { createYouClient } from '@belweave/search-sdk/native-you';

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

const client = createYouClient({ apiKey, timeoutMs: 10_000 });
const response = await client.search({ body: { query: 'SQLite write concurrency', count: 5 } });
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.

MethodHTTP / relative pathResponse / retry eligibility
searchPOST /v1/searchjson · no automatic retry
contentsPOST /v1/contentsjson · no automatic retry
answerPOST /v1/answerjson · no automatic retry
researchPOST /v1/researchjson · no automatic retry
getResearchTaskGET /v1/research/{task_id}json · eligible
streamResearchTaskGET /v1/research/{task_id}/streamSSE stream · eligible
financeResearchPOST /v1/finance_researchjson · no automatic retry
getAccountBalanceGET /v1/billing/account_balancejson · eligible
imagesGET /v1/imagesjson · eligible

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.