---
title: "Run a data tool"
method: POST
path: "/data/runs"
tags: ["Data"]
---

# Run a data tool

`POST /data/runs`

## Request

- Base URL: `https://api.crevio.co/v1`
- URL: `https://api.crevio.co/v1/data/runs`
- Auth: API key in header `Authorization`

Runs one data tool (find it with listDataTools) with `input` matching its `input_schema`, and returns the source's data. Billed from what the source charged, usually 1-5 credits; a failed run is free. Tools marked `queued` wait on the source's queue: if one is not done within about 25 seconds the run comes back `running` (HTTP 202), so poll getDataRun until it is `succeeded` or `failed`.

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `tool_id` string, required: Tool id from listDataTools, e.g. smb.search.
  - `input` object: The tool's input, per its input_schema.

## Response `200`

Finished run (succeeded or failed).

- DataRun
  - `object` string, required
  - `id` string, required
  - `tool_id` string, required
  - `status` string, required
  - `data` object, nullable, required
  - `source` string, nullable, required
  - `error` object, nullable, required
  - `credits_used` integer, required
  - `input` object, required
  - `created_at` string, required
  - `completed_at` string, nullable, required

## Other responses

- `202`: Still running on the source's queue; poll getDataRun.
- `400`: Bad request
- `401`: Authentication required
- `402`: Insufficient credits
- `404`: Resource not found
- `409`: Conflict
- `422`: Validation error
- `429`: Rate limit exceeded — 600 requests per minute per credential. Retry after the number of seconds in `Retry-After`.
- `502`: Upstream (provider) failure

---

[API](https://skmtc.dev/crevio/apis/crevio-api-v1.md) · [All operations](https://skmtc.dev/crevio/apis/crevio-api-v1/llms.txt) · [OpenAPI document](https://skmtc.dev/crevio/apis/crevio-api-v1/revisions/2219f18ad651?raw)
