DataPI.

What would you like to understand?

Preparing search…
    All results and search filters →

    Start here

    Quickstart: from token to verified result

    Create a workspace token, inspect an operation, submit an asynchronous request and read the result.

    What you are building

    A DataPI integration has four steps: create a workspace credential, read the operation contract, submit a request, then retrieve the result by polling or by receiving a signed completion webhook. The machine API is separate from the browser API used by the dashboard.

    1. Inspect before you submit

    1. Inspect before you submit
    curl --fail-with-body \
      https://api.datapi.ir/v1/operations/social.instagram.profile.read \
      -H "Authorization: Bearer $DATAPI_API_TOKEN"

    A 200 response describes availability, input/output schemas, examples and limits. Do not assume every catalog entry is executable.

    2. Submit an asynchronous request

    2. Submit an asynchronous request
    curl --fail-with-body -X POST https://api.datapi.ir/v1/requests \
      -H "Authorization: Bearer $DATAPI_API_TOKEN" \
      -H "Content-Type: application/json" \
      -H "Idempotency-Key: profile-sample-001" \
      -d '{"operation":"social.instagram.profile.read","input":{"username":"sample_creator"},"mode":"async"}'

    The default mode is async. A 202 response means accepted, not finished. Save request_id, status_url and result_url.

    3. Poll, then read the result

    3. Poll, then read the result
    curl --fail-with-body https://api.datapi.ir/v1/requests/$REQUEST_ID \
      -H "Authorization: Bearer $DATAPI_API_TOKEN"
    
    curl --fail-with-body https://api.datapi.ir/v1/requests/$REQUEST_ID/result \
      -H "Authorization: Bearer $DATAPI_API_TOKEN"

    Poll with backoff. Stop on succeeded, failed, timed_out or canceled. The result endpoint returns 409 until ready and 410 after expiry.

    Browser dashboard is different

    Related pages

    Runtime contract snapshot: DataPI API v1.0.0 · 75 HTTP operations documented of 265 runtime operations · 40 catalog operations · 11 available at capture. Captured: . Source: https://api.datapi.ir/v1/contracts.