Skip to main content
A source is a persistent content origin with documents, indexing state, and refresh history. Sources can represent websites or GitHub repositories.

Shared and private sources

A public source can reuse existing indexed content. Your workspace’s subscription controls its relationship to that source; it does not make the global source your private copy. Use collection rules and credentials to control retrieval access. For domain sources, identifiers normalize to the URL origin. https://docs.example.com/foo and https://docs.example.com/bar identify the same source root; choose path filters to define a site section.

Analyze a website

Source analysis inspects candidate paths and estimates URL coverage. It can start a crawl run and consume resources; authorize its scope before starting it. The standalone synchronous discovery endpoint has been removed.

Start analysis

Requires sources:discover and runs:write: Node.js and Python examples use the Bulkgrid SDKs. Set BULKGRID_API_KEY in your backend environment; cURL examples also use BULKGRID_BASE_URL=https://bulkgrid.com. CLI examples require the Bulkgrid CLI and an API key with the scopes listed below; browser login does not grant source-management permissions. Set SOURCE_ID, ANALYSIS_ID, and RUN_ID from returned IDs as needed.
Save the returned analysis id and any runId. Analysis does not create a source subscription. The analysis endpoints retain their existing paths under /sources/discover/analyses.

Read progress and results

Requires sources:discover:
States are crawling, analyzing, completed, partial, and failed. Results include the URL, estimated URL count, discovered paths, level summaries, warnings, and errors. Counts may be unavailable while work is in progress. partial indicates incomplete coverage; estimates are not guaranteed storage or credit quotes. Use bounded polling and preserve the ID if the wait expires. Do not blindly resubmit a start request after a timeout: work may already have begun.

Choose ingestion boundaries

Use the analysis to select relevant paths or pages before creating a source. The path recommendation flow can help choose include/exclude rules; it is distinct from starting analysis and from source creation.

Create or subscribe to a website source

Requires sources:write. Plan limits apply: Free can subscribe to existing public sources, while creating a new public source requires Pro. Private-source creation also requires Pro. Source counts are uncapped; processing, retrieval, storage, and concurrency allowances still apply.
The response contains source and created. Save source.id. created: false can indicate reuse of an existing source. Creating the source record is not proof that documents are indexed; inspect source status.

Choose the content boundary

  • discover discovers content using the source’s path configuration.
  • selected_pages processes explicitly selected document URLs. Store them in crawl_config.selectedUrls.
  • Use collection rules to curate the content each application can retrieve.
Website subscriptions can have workspace-specific labels, selections, and path filters. Changes to shared crawl options can affect the shared source and are plan-gated; they are distinct from selecting content for a collection.

Read, update, and remove

See documents and changes to inspect indexed content and Collections to control retrieval.

GitHub repositories

GitHub sources synchronize repository content directly rather than crawling GitHub’s website. Repository sources require Pro and are private to the Bulkgrid workspace, even when the repository is public.

Create a source

Requires sources:write. Use a public repository URL in the form https://github.com/{owner}/{repo}.
The server returns 202 with source, run, and dispatchDeferred. A deferred dispatch means the job was saved and is awaiting dispatch; avoid creating a duplicate source. Creating the same repository again in the workspace returns 409.

Configuration

A canonical website URL does not replace the repository as the source of indexed content. The website preview can complete independently of repository synchronization.

Monitor and refresh

Repository runs have type: "source_sync". Poll the run and source status, and inspect indexed document counts before using search. Use POST /api/v1/sources/{sourceId}/recrawl for a manual sync. It requires sources:write and runs:write, plus an active paid plan. For GitHub sources this starts repository synchronization, not a website deep crawl. Add the source to a collection and authorize that collection for your application or AI client. See Collections.

Refresh and monitor

Request a manual refresh

Requires sources:write and runs:write. Manual refresh requires an active or trialing paid plan; otherwise the API returns 403 with LIMIT_MANUAL_REINDEX.
The response identifies the source and run. Inspect the returned run rather than assuming a refresh has already completed. A shared source remains shared when refreshed. Refreshing it does not create a private copy for the requesting workspace.

Scheduled refresh

Website source configuration supports crawl_interval and, for custom, custom_interval_minutes. GitHub creation supports daily, weekly, and monthly. Available frequencies depend on the plan; handle returned plan-limit errors rather than assuming every interval is available.

Check source status

Requires sources:read:
The status includes isCrawling, latestStatus, latestError, totalSize, totalItems, and indexedItems. Use indexed counts and errors to distinguish ingestion progress from searchable content. Use GET /api/v1/sources/{sourceId}/runs with runs:read for history. Use run status to inspect a particular job and source documents to inspect its content.

Documents and changes

Requires sources:read and access to the source through workspace ownership or subscription.

List documents

The response contains documents, parent, nextOffset, limit, and total. Continue from nextOffset until it is null. The default limit is 50, capped at 100. Use parent to browse a source path; withTotal is not required. Documents include source content identifiers and metadata useful for inspecting crawl and indexing state. A source document ID is distinct from a run result ID.

Browse folders

Use GET /api/v1/sources/{sourceId}/folders?parent=/ to browse folders under a path. Use folder or URL collection rules to curate content for retrieval.

Inspect a run’s changes

The runId query parameter is required:
kind accepts added, changed, or removed, and defaults to changed. The default limit is 50, capped at 500. The response contains documents, total, nextOffset, and limit. Use GET /api/v1/sources/{sourceId}/runs with runs:read to find the relevant source run. Changes are scoped to the requested run, not an unspecified latest comparison.