Skip to article

Parallel

Query-based retrieval with excerpts, with separate native objectives, extraction, and task APIs.

On this page

Normalized search

The normalized adapter maps one query into search_queries and returns search source excerpts without treating an objective or Task response as an ordinary source list. Native excerpts remain native material rather than a generated answer.

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

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

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

Native Search can use an objective in addition to queries. Extract, Tasks, FindAll, and monitoring have different lifecycle models. The normalized client does not silently create or poll them.

200 include or 200 exclude under SDK policy; both lists cannot be combined.

Provider-native client

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

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

const client = createParallelClient({ apiKey, timeoutMs: 10_000 });
const response = await client.search({ body: { search_queries: ['SQLite write concurrency'], mode: 'basic' } });
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.

39 / 39
MethodHTTP / relative pathResponse / retry eligibility
searchPOST /v1/searchjson · no automatic retry
imageSearchPOST /v1/images/searchjson · no automatic retry
extractPOST /v1/extractjson · no automatic retry
createTaskGroupPOST /v1/tasks/groupsjson · no automatic retry
retrieveTaskGroupGET /v1/tasks/groups/{taskgroup_id}json · eligible
streamTaskGroupEventsGET /v1/tasks/groups/{taskgroup_id}/eventsSSE stream · eligible
addRunsToTaskGroupPOST /v1/tasks/groups/{taskgroup_id}/runsjson · no automatic retry
fetchTaskGroupRunsGET /v1/tasks/groups/{taskgroup_id}/runsSSE stream · eligible
retrieveTaskGroupRunGET /v1/tasks/groups/{taskgroup_id}/runs/{run_id}json · eligible
createTaskRunPOST /v1/tasks/runsjson · no automatic retry
retrieveTaskRunGET /v1/tasks/runs/{run_id}json · eligible
streamTaskRunEventsGET /v1/tasks/runs/{run_id}/eventsSSE stream · eligible
retrieveTaskRunInputGET /v1/tasks/runs/{run_id}/inputjson · eligible
retrieveTaskRunResultGET /v1/tasks/runs/{run_id}/resultjson · eligible
fastEntitySearchPOST /v1beta/findall/entity-searchjson · no automatic retry
ingestFindAllRunPOST /v1beta/findall/ingestjson · no automatic retry
createFindAllRunPOST /v1beta/findall/runsjson · no automatic retry
retrieveFindAllRunStatusGET /v1beta/findall/runs/{findall_id}json · eligible
cancelFindAllRunPOST /v1beta/findall/runs/{findall_id}/canceljson · no automatic retry
addEnrichmentToFindAllRunPOST /v1beta/findall/runs/{findall_id}/enrichjson · no automatic retry
streamFindAllEventsGET /v1beta/findall/runs/{findall_id}/eventsSSE stream · eligible
extendFindAllRunPOST /v1beta/findall/runs/{findall_id}/extendjson · no automatic retry
findAllRunResultGET /v1beta/findall/runs/{findall_id}/resultjson · eligible
getFindAllRunSchemaGET /v1beta/findall/runs/{findall_id}/schemajson · eligible
createMonitorPOST /v1/monitorsjson · no automatic retry
listMonitorsGET /v1/monitorsjson · eligible
monitorStatsGET /v1/monitors/statsjson · eligible
retrieveMonitorGET /v1/monitors/{monitor_id}json · eligible
cancelMonitorPOST /v1/monitors/{monitor_id}/canceljson · no automatic retry
listMonitorEventsGET /v1/monitors/{monitor_id}/eventsjson · eligible
triggerMonitorRunPOST /v1/monitors/{monitor_id}/triggerjson · no automatic retry
updateMonitorPOST /v1/monitors/{monitor_id}/updatejson · no automatic retry
clearMemoryPOST /v1beta/memory/clearjson · no automatic retry
evictFromMemoryPOST /v1beta/memory/evictjson · no automatic retry
retrieveMemoryPOST /v1beta/memory/retrievejson · no automatic retry
chatCompletionsPOST /v1beta/chat/completionsjson · no automatic retry
chatCompletionsStreamPOST /v1beta/chat/completionsSSE stream · no automatic retry
createResponsePOST /v1/responsesjson · no automatic retry
createResponseStreamPOST /v1/responsesSSE stream · no automatic retry

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.