Skip to main content
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

StatusDescription
queuedJob is waiting to be processed
runningAgent is actively collecting data
completedFinished — results are available
failedError occurred — check the error field
cancelledCancelled 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)