Overview
Check the status of an asynchronous job (search, document generation, etc.) and retrieve results once processing is complete. This endpoint works for all job types across the Stru API platform.Universal Endpoint: This endpoint handles job status for Search, Mathcad, and Excel APIs using the same unified interface.
Authentication
Bearer token (API key from app.stru.ai)
Path Parameters
Unique job identifier returned when creating the job
Response
Returns the current job status and results (if complete).Job identifier
Current job statusPossible values:
"pending"- Queued, not yet started"in_progress"- Currently processing"completed"- Finished successfully"failed"- Encountered an error
ISO 8601 timestamp when job was created
ISO 8601 timestamp when job completed (null if not complete)
Job results (only present when status is
"completed")For search jobs, contains SearchResults object
For file generation jobs, contains download URLError details (only present when status is
"failed")Example Requests
Example Responses
Pending Job
Status Code:
200 OKIn Progress
Completed (Search Job)
Completed (File Generation Job)
Failed Job
Error Responses
Job ID does not exist
Missing or invalid API key
Polling Best Practices
Use Exponential Backoff
Use Exponential Backoff
Don’t poll at a fixed interval. Start with 1 second, then double the delay after each check (1s, 2s, 4s, 8s).This reduces unnecessary API calls and respects rate limits.
Set a Maximum Wait Time
Set a Maximum Wait Time
Always implement a timeout to prevent infinite polling loops.
Handle All Status States
Handle All Status States
Don’t just check for “completed”. Handle pending, in_progress, and failed states.
Respect Rate Limits
Respect Rate Limits
Exponential backoff helps, but also track your total request count to stay under 120/minute.
Job Retention
Jobs and their results are retained for different durations based on your subscription tier:| Tier | Job Retention | Access to Results |
|---|---|---|
| Free | 1 hour | 1 hour |
| Pro | 24 hours | 24 hours |
| Enterprise | Custom | Custom |
After the retention period, the job ID becomes invalid and returns a 404 error. Download any generated files within the retention window.
Typical Processing Times
Expected job completion times by operation type:| Operation | Typical Duration |
|---|---|
| Search (simple query) | 1-3 seconds |
| Search (complex semantic) | 3-8 seconds |
| Mathcad document generation | 5-15 seconds |
| Excel spreadsheet generation | 3-10 seconds |
| PDF conversion | 10-30 seconds |
Processing times vary based on system load and job complexity. Always implement proper polling with timeouts.
Next Steps
Process Search Results
Learn how to work with search matches, page numbers, and relevance scores
Download Generated Files
For file generation jobs, use the signed URL to download your .mcdx or .xlsx files
Error Handling
Implement robust error handling for failed jobs and timeouts
Rate Limiting
Understand rate limits and implement exponential backoff in your polling logic