Get Job Status
Get status, progress, and file-level details for an indexing job. Use files_limit and files_cursor to page through indexed files when the job contains many inputs.
To be notified when a job finishes instead of polling this endpoint, register a webhook endpoint. Each job then sends one signed event with its final status and file counts. This endpoint remains the source of truth for per-file detail. See Webhooks.
Path parameters
ID of the job to look up, as returned by the indexing endpoint that started it.
Headers
Query parameters
1-500Defaults to 50Number of files to return per page
Pagination cursor for files
Response
Successful Response
Unique identifier for the indexing job, as returned by the indexing endpoint that started it.
Current job status.
pending: queued, not yet startedrunning: in progress; seeprogressfor the current stagecompleted: all files indexed successfullycompleted_with_errors: finished, but some files failed; seefilesandresultfailed: the job failed; seeerror_codeanderror_messagecancelled: cancelled viaDELETE /v2/jobs/{job_id}timed_out: execution exceeded the time limit
Credit usage for this job. Present only when the job has completed.
RFC 3339 timestamp when the job was cancelled.
Name of the collection this job is indexing into.
Manifest jobs only: how many manifest lines were accepted, rejected or unreachable, with a sample of each. Null until the manifest has been read, and for every other kind of job.
Files whose source_identity is already in the collection with different content. They are neither skipped nor indexed; send overwrite_existing: true to replace the indexed version. Null when there are none.
RFC 3339 timestamp when the job reached a terminal state.
RFC 3339 timestamp when the job was created.
Machine-readable error code. Present when the job failed.
Human-readable error message. Present when the job failed.
Estimated seconds until the job finishes. 0 once the job is in a terminal state.
Per-file status for the files in this job. Paginated: control the page with the files_limit and files_cursor query parameters.
Pagination details for files. Pass next_cursor as the files_cursor query parameter to fetch the next page.
The indexing operation that created this job, e.g. index_s3_directory. Matches the endpoint the job was started from.
Detailed progress for a running job: the current pipeline stage and per-file counts.
Human-readable summary of the job’s current progress.
Final file counts and duration once the job reaches a terminal state.
RFC 3339 timestamp when processing began. Null while the job is pending.
RFC 3339 timestamp when the job was last updated.
Per-video records for YouTube indexing jobs: which pipeline each video actually ran through and whether an on_missing_transcript fallback fired (a fallback changes what the job bills, so it is always visible here). Absent for non-YouTube jobs.
Pointer to the job’s PII masking report. Present only for jobs that ran with mask_pii: true.
import requests
import json
BASE_URL = "https://api.filesearch.dev"
API_KEY = "your_api_key"
JOB_ID = "job_abc123"
headers = {
"Authorization": f"Bearer {API_KEY}",
}
response = requests.get(
f"{BASE_URL}/v2/jobs/{JOB_ID}",
headers=headers,
timeout=30.0
)
if response.status_code == 200:
data = response.json()
print(f"Status: {data['status']}")
for f in data.get("files") or []:
print(f" {f['uri']} -> {f['status']} (document_id={f.get('document_id')})")
else:
print(f"Error: {response.status_code}"){
"job_id": "abc123xyz-1234567890",
"status": "pending",
"collection_name": "my_documents",
"created_at": "2024-01-15T10:30:00Z",
"estimated_time_remaining_seconds": 0,
"job_type": "index_s3_directory",
"progress_message": "Job pending",
"started_at": null,
"updated_at": "2024-01-15T10:30:00Z"
}