Every agent run creates a job. Jobs are asynchronous — you submit parameters, get a job ID back, then poll until results are ready.
Job Lifecycle
| Status | Description |
|---|
queued | Job is waiting to be processed |
running | Agent is actively collecting data |
completed | Finished — results are available |
failed | Error occurred — check the error field |
cancelled | Cancelled by you — no credits charged |
Job results expire after 7 days. Download your data before the expires_at timestamp.
Quick Example
from mindcase import Mindcase
client = Mindcase(api_key="mk_live_abc123def456")
# Sync — run() handles polling for you
results = client.run("instagram/profiles", params={
"usernames": ["nike"]
})
print(results.data)
# Async — manage polling yourself
job = client.run_async("instagram/profiles", params={
"usernames": ["nike"]
})
print(f"Job {job.id}: {job.status}")
# Check later
status = client.jobs.get(job.id)
if status.is_done:
results = client.jobs.results(job.id)