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.
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
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.
| Method | HTTP / relative path | Response / retry eligibility |
|---|---|---|
search | POST /v1/search | json · no automatic retry |
contents | POST /v1/contents | json · no automatic retry |
answer | POST /v1/answer | json · no automatic retry |
research | POST /v1/research | json · no automatic retry |
getResearchTask | GET /v1/research/{task_id} | json · eligible |
streamResearchTask | GET /v1/research/{task_id}/stream | SSE stream · eligible |
financeResearch | POST /v1/finance_research | json · no automatic retry |
getAccountBalance | GET /v1/billing/account_balance | json · eligible |
images | GET /v1/images | json · eligible |
Limits and operation lifecycle
- Pass
signaland per-calltimeoutMson 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.