# Create one asynchronous request (/api-reference/data-api/postDataRequests)

Creates one asynchronous request and returns 202 with its id and status; the work runs in the background, so follow up with data_wait_request or data_get_request and read the output with data_get_result or data_read_result_content. The body takes a required url plus at most one mode: omit both task and tool for a standard scrape, set task to generate a reusable tool from a natural-language description of the site, or set tool to call a saved tool (recipe_id) with new input values. Submitting charges tokens; send an Idempotency-Key so an exact-body retry replays the original request for free instead of creating a duplicate. Use data_create_batch for many URLs.

## POST /api/v1/data/requests

Create one asynchronous request

- Operation ID: `postDataRequests`

- Tags: `Data API`

Creates one asynchronous request and returns 202 with its id and status; the work runs in the background, so follow up with data_wait_request or data_get_request and read the output with data_get_result or data_read_result_content. The body takes a required url plus at most one mode: omit both task and tool for a standard scrape, set task to generate a reusable tool from a natural-language description of the site, or set tool to call a saved tool (recipe_id) with new input values. Submitting charges tokens; send an Idempotency-Key so an exact-body retry replays the original request for free instead of creating a duplicate. Use data_create_batch for many URLs.

### Security

- Required scope: `scrape:write`

- `ApiKey` (apiKey, X-API-Key)

- `ApiKeyBearer` (http)

### Parameters

- `Idempotency-Key` (header) — string; Optional. Generate a unique value before a write and retain it for an exact-body retry; replay is free and a different body returns 409 IDEMPOTENCY_CONFLICT.; example="rh-docs-01J2QG-unique"

### Request body

- `application/json`: #/components/schemas/DataRequest

  - Examples: `{
  "legacyScrape": {
    "summary": "Create a standard scrape request",
    "value": {
      "url": "https://example.com",
      "mode": "auto",
      "proxy": "random",
      "proxy_type": "datacenter"
    }
  },
  "createWebsiteTool": {
    "summary": "Create a tool from a public site and task description",
    "value": {
      "url": "https://shop.example",
      "task": {
        "description": "Find office desks and return each name and price",
        "example_input": {
          "query": "office desks"
        }
      }
    }
  },
  "callWebsiteTool": {
    "summary": "Call a saved tool with new input values",
    "value": {
      "url": "https://shop.example",
      "tool": {
        "recipe_id": "550e8400-e29b-41d4-a716-446655440000",
        "input": {
          "query": "standing desks"
        }
      }
    }
  }
}`

### Responses

- **202** — Accepted or idempotently replayed Error body uses the documented PublicError DTO.

  - `application/json`: #/components/schemas/CreateJobResponse

  - Example: `{
  "id": "9a20bd58-ed33-4a5b-b63f-b52bb1a62248",
  "status": "pending"
}`

  - Examples: `{
  "accepted": {
    "summary": "New asynchronous request",
    "value": {
      "id": "9a20bd58-ed33-4a5b-b63f-b52bb1a62248",
      "url": "https://example.com",
      "status": "pending",
      "cached": false,
      "protected": false,
      "pricing_version": 2,
      "route_mode": "http",
      "base_tokens": 1,
      "protected_tokens": 0,
      "captcha_tokens": 0,
      "created_at": "2026-08-22T12:00:00.000Z",
      "charged_tokens": 1,
      "idempotent_replay": false
    }
  },
  "replay": {
    "summary": "Same key and payload replay",
    "value": {
      "id": "9a20bd58-ed33-4a5b-b63f-b52bb1a62248",
      "url": "https://example.com",
      "status": "pending",
      "cached": false,
      "protected": false,
      "pricing_version": 2,
      "route_mode": "http",
      "base_tokens": 1,
      "protected_tokens": 0,
      "captcha_tokens": 0,
      "created_at": "2026-08-22T12:00:00.000Z",
      "charged_tokens": 0,
      "idempotent_replay": true
    }
  }
}`

- **400** — Invalid request or idempotency key Error body uses the documented PublicError DTO.

  - `application/json`: #/components/schemas/PublicError

  - Example: `{
  "error": "Request failed",
  "code": "VALIDATION_ERROR",
  "message": "Invalid request or idempotency key Error body uses the documented PublicError DTO.",
  "requestId": "req_01J2QG"
}`

- **409** — Idempotency conflict Error body uses the documented PublicError DTO.

  - `application/json`: #/components/schemas/PublicError

  - Example: `{
  "error": "Request failed",
  "code": "RESULT_NOT_READY",
  "message": "Idempotency conflict Error body uses the documented PublicError DTO.",
  "requestId": "req_01J2QG"
}`

- **503** — Data API Error body uses the documented PublicError DTO.

  - `application/json`: #/components/schemas/PublicError

  - Example: `{
  "error": "Request failed",
  "code": "PRICING_NOT_ACTIVE",
  "message": "Data API Error body uses the documented PublicError DTO.",
  "requestId": "req_01J2QG"
}`

### Referenced OpenAPI components

#### `#/components/parameters/IdempotencyKey`

```json

{
  "name": "Idempotency-Key",
  "in": "header",
  "required": false,
  "description": "Optional. Generate a unique value before a write and retain it for an exact-body retry; replay is free and a different body returns 409 IDEMPOTENCY_CONFLICT.",
  "schema": {
    "type": "string",
    "minLength": 8,
    "maxLength": 200
  },
  "example": "rh-docs-01J2QG-unique"
}

```

#### `#/components/schemas/DataRequest`

```json

{
  "type": "object",
  "description": "extraction, task and tool are mutually exclusive. task creates a public, read-only website tool from a task description; tool calls a saved version with input parameters. task/tool requests do not accept supplied cookies, headers or browser_actions. Website task costs follow actual usage and are not capped by max_credits_per_request.",
  "allOf": [
    {
      "$ref": "#/components/schemas/RequestTransport"
    }
  ],
  "properties": {
    "extraction": {
      "$ref": "#/components/schemas/ExtractionRequest"
    },
    "task": {
      "$ref": "#/components/schemas/WebsiteTask"
    },
    "tool": {
      "$ref": "#/components/schemas/WebsiteToolCall"
    }
  },
  "not": {
    "anyOf": [
      {
        "required": [
          "extraction",
          "task"
        ],
        "properties": {
          "extraction": {},
          "task": {}
        }
      },
      {
        "required": [
          "extraction",
          "tool"
        ],
        "properties": {
          "extraction": {},
          "tool": {}
        }
      },
      {
        "required": [
          "task",
          "tool"
        ],
        "properties": {
          "task": {},
          "tool": {}
        }
      }
    ]
  },
  "if": {
    "anyOf": [
      {
        "required": [
          "task"
        ],
        "properties": {
          "task": {}
        }
      },
      {
        "required": [
          "tool"
        ],
        "properties": {
          "tool": {}
        }
      }
    ]
  },
  "then": {
    "properties": {
      "cookies": {
        "type": "object",
        "maxProperties": 0
      },
      "headers": {
        "type": "object",
        "maxProperties": 0
      },
      "browser_actions": {
        "type": "array",
        "maxItems": 0
      }
    }
  },
  "unevaluatedProperties": false
}

```

#### `#/components/schemas/CreateJobResponse`

```json

{
  "allOf": [
    {
      "$ref": "#/components/schemas/PublicJobCreated"
    },
    {
      "type": "object",
      "required": [
        "charged_tokens",
        "pricing_version",
        "route_mode",
        "idempotent_replay"
      ],
      "properties": {
        "charged_tokens": {
          "type": "integer",
          "minimum": 0,
          "description": "Base credits charged by this submission operation; dynamic protected/CAPTCHA debits occur later. Zero on an idempotent replay."
        },
        "pricing_version": {
          "type": "integer",
          "minimum": 1
        },
        "route_mode": {
          "$ref": "#/components/schemas/DataRouteMode"
        },
        "idempotent_replay": {
          "type": "boolean",
          "example": false,
          "description": "True only when this response replays a previous submission with the same idempotency key and payload."
        },
        "result_kind": {
          "type": "string",
          "enum": [
            "extraction"
          ],
          "description": "Present for structured extraction requests."
        },
        "page_status": {
          "type": "string",
          "description": "Underlying page-fetch status for extraction requests; top-level status tracks extraction readiness."
        }
      }
    }
  ]
}

```

#### `#/components/headers/X-Credits-Charged`

```json

{
  "description": "Credits charged by the current submission operation. Idempotent replays return 0.",
  "schema": {
    "type": "integer",
    "minimum": 0
  }
}

```

#### `#/components/headers/X-Credits-Remaining`

```json

{
  "description": "Current tenant token balance after the operation.",
  "schema": {
    "type": "integer",
    "minimum": 0
  }
}

```

#### `#/components/headers/X-Credit-Pricing-Version`

```json

{
  "description": "Public pricing version used for the operation.",
  "schema": {
    "type": "integer",
    "minimum": 1
  }
}

```

#### `#/components/headers/X-Route-Mode`

```json

{
  "description": "Effective route mode used by the operation; batch responses may be mixed.",
  "schema": {
    "type": "string",
    "enum": [
      "direct",
      "auto",
      "browser",
      "http",
      "residential",
      "residential_browser",
      "mixed"
    ]
  }
}

```

#### `#/components/schemas/PublicError`

```json

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "error",
    "code",
    "message",
    "requestId"
  ],
  "properties": {
    "error": {
      "type": "string"
    },
    "code": {
      "type": "string",
      "description": "Stable public error code. PROXY_QUOTE_EXPIRED means the optional quote_version supplied at admission is no longer current; refresh the pricing view and submit again."
    },
    "message": {
      "type": "string"
    },
    "requestId": {
      "type": "string"
    }
  }
}

```

#### `#/components/schemas/RequestTransport`

```json

{
  "type": "object",
  "required": [
    "url"
  ],
  "properties": {
    "quote_version": {
      "$ref": "#/components/schemas/ProxyQuoteVersion",
      "description": "Optional opaque pricing version for this individual request. For a batch, pass the quote_version on each job. Older clients may omit it."
    },
    "url": {
      "type": "string",
      "format": "uri",
      "maxLength": 4096
    },
    "mode": {
      "type": "string",
      "enum": [
        "direct",
        "auto",
        "browser",
        "http",
        "residential",
        "residential_browser"
      ],
      "description": "Optional route mode. When omitted, javascript=true resolves to browser and javascript=false resolves to http. direct uses bounded HTTP, auto uses HTTP then browser rendering, and browser starts in the browser. http, residential, and residential_browser remain supported explicit route modes. direct and http use the selected network class's HTTP tariff, browser uses its browser tariff, residential uses the residential HTTP tariff, and residential_browser uses the residential browser tariff. auto bills the terminal HTTP or browser stage after execution."
    },
    "geo_country": {
      "type": "string",
      "minLength": 2,
      "maxLength": 2,
      "example": "US",
      "description": "Requested ISO 3166-1 alpha-2 proxy exit country; input is normalized to uppercase. The effective proxy route is verified before the target is requested; browser contexts then apply timezone/geolocation. An unavailable or mismatched route fails with PROXY_GEO_VERIFICATION_FAILED."
    },
    "max_credits_per_request": {
      "type": "integer",
      "minimum": 1,
      "description": "Hard ceiling for total whole tokens charged to this newly accepted request. It includes HTTP or browser execution, CAPTCHA and measured traffic from a successful result. The limit is shared by immediate and deferred billing stages. If execution must stop before producing a complete result, the request ends with budget_exhausted."
    },
    "proxy": {
      "type": "string",
      "enum": [
        "random",
        "off",
        "own"
      ],
      "default": "random",
      "description": "random uses RunHarvester proxies, off connects directly, own leaves only through your own nodes (computers and proxies) with proxy_type and geo_country as filters by their probe results; own traffic is not charged. A failing node is retried on up to two other nodes."
    },
    "own_pool": {
      "$ref": "#/components/schemas/OwnPool"
    },
    "own_strategy": {
      "type": "string",
      "enum": [
        "random",
        "sticky"
      ],
      "description": "With proxy own, random picks any usable node; sticky keeps one node per batch and host, or per own_session."
    },
    "own_session": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "description": "With proxy own and sticky, requests with the same value use the same node while it stays usable."
    },
    "fallback": {
      "type": "string",
      "enum": [
        "platform"
      ],
      "description": "With proxy own, use the platform proxy (charged as usual) when none of your nodes can carry the request; without it the request fails with NO_OWN_PROXY_AVAILABLE and is not charged."
    },
    "proxy_type": {
      "type": "string",
      "enum": [
        "datacenter",
        "residential",
        "premium"
      ],
      "description": "Requested proxy network type. If omitted, the route mode determines the legacy default. This selects the datacenter, residential or premium tariff independently of transport mode. Premium requires explicit selection, a configured plan price and an available connection, and cannot be combined with proxy off. Provider selection and tariff resolution are internal and are not returned in public responses."
    },
    "headers": {
      "type": "object",
      "default": {},
      "description": "Transport-controlled and hop-by-hop headers are rejected; names and values cannot contain control characters.",
      "additionalProperties": {
        "type": "string",
        "maxLength": 16384
      }
    },
    "cookies": {
      "type": "object",
      "default": {},
      "description": "Cookie names and values are validated and cannot contain control characters.",
      "additionalProperties": {
        "type": "string",
        "maxLength": 16384
      }
    },
    "timeout_ms": {
      "type": "integer",
      "minimum": 5000,
      "maximum": 300000,
      "default": 45000
    },
    "javascript": {
      "type": "boolean",
      "default": true
    },
    "resource_policy": {
      "type": "string",
      "enum": [
        "compatible",
        "adaptive"
      ],
      "default": "adaptive",
      "description": "Browser resource loading policy. adaptive starts in full mode, promotes back to full on challenges, and switches to site-light only after the page is usable. site-light blocks media, images, manifests and a conservative known advertising/analytics denylist while preserving documents, scripts, XHR/fetch, WASM, service workers, styles and fonts. compatible always uses full mode; adaptive enables site-light only after the page is usable."
    },
    "wait_for_selector": {
      "type": [
        "string",
        "null"
      ],
      "minLength": 1,
      "maxLength": 500,
      "description": "CSS selector that must appear when supplied; if it does not appear before min(timeout_ms, 30000), the job fails."
    },
    "user_agent": {
      "type": [
        "string",
        "null"
      ],
      "minLength": 1,
      "maxLength": 1000
    },
    "result_text_selector": {
      "type": [
        "string",
        "null"
      ],
      "minLength": 1,
      "maxLength": 500
    },
    "wait_for_text": {
      "anyOf": [
        {
          "type": "null"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "selector"
          ],
          "properties": {
            "selector": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            },
            "min_length": {
              "type": "integer",
              "minimum": 0,
              "maximum": 10000,
              "default": 1
            },
            "stable_ms": {
              "type": "integer",
              "minimum": 0,
              "maximum": 60000,
              "default": 2500
            },
            "timeout_ms": {
              "type": "integer",
              "minimum": 5000,
              "maximum": 300000
            },
            "poll_interval_ms": {
              "type": "integer",
              "minimum": 100,
              "maximum": 10000,
              "default": 500
            },
            "end_text": {
              "type": "string",
              "minLength": 1,
              "maxLength": 10000,
              "description": "Optional literal completion marker. The text must still meet min_length; once the marker appears the wait completes without waiting for stable_ms."
            },
            "on_timeout": {
              "type": "string",
              "enum": [
                "return_last",
                "fail"
              ],
              "default": "return_last",
              "description": "return_last preserves the last non-empty text and records an unsatisfied result_meta.wait.text outcome; fail marks the request failed with WAIT_FOR_TEXT_TIMEOUT."
            }
          }
        }
      ]
    },
    "browser_actions": {
      "type": "array",
      "maxItems": 20,
      "default": [],
      "description": "Ordered, declarative browser-only actions. Any non-empty list promotes HTTP routes to their browser equivalent, enables JavaScript, uses a fresh isolated browser context, and bypasses the result cache. The full ordered list is persisted for a request retry and returned by clone-input. A click that changes the page URL, opens a popup, or starts a download is blocked. Only aggregate action diagnostics are included in result_meta.",
      "items": {
        "$ref": "#/components/schemas/BrowserAction"
      }
    },
    "debug_artifacts": {
      "type": "boolean",
      "default": false,
      "description": "Opt in to short-lived, encrypted, tenant-private diagnostics only if the request terminally fails. Enabling it promotes HTTP routes to browser execution, enables JavaScript, uses an isolated context, and bypasses cache. Diagnostics exclude page HTML, response bodies, headers, cookies, credentials, and raw browser traces; the screenshot endpoint may show target-page content despite masked known form controls."
    },
    "skip_cache": {
      "type": "boolean",
      "default": false
    },
    "cache_ttl_seconds": {
      "type": "integer",
      "minimum": 0,
      "maximum": 3600,
      "default": 300
    }
  }
}

```

#### `#/components/schemas/ExtractionRequest`

```json

{
  "oneOf": [
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "recipe_id"
      ],
      "properties": {
        "recipe_id": {
          "type": "string",
          "format": "uuid",
          "description": "Execute an existing owned active recipe."
        }
      }
    },
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "fields"
      ],
      "properties": {
        "fields": {
          "type": "array",
          "minItems": 1,
          "maxItems": 200,
          "items": {
            "$ref": "#/components/schemas/ExtractionField"
          },
          "description": "The combined count of top-level and nested fields must not exceed 200."
        },
        "instructions": {
          "type": "string",
          "minLength": 1,
          "maxLength": 12000
        },
        "recipe_name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160
        },
        "auto_repair_enabled": {
          "type": "boolean",
          "default": true
        }
      }
    }
  ]
}

```

#### `#/components/schemas/WebsiteTask`

```json

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "description"
  ],
  "properties": {
    "description": {
      "type": "string",
      "minLength": 1,
      "maxLength": 12000
    },
    "example_input": {
      "$ref": "#/components/schemas/WebsiteToolInput"
    }
  }
}

```

#### `#/components/schemas/WebsiteToolCall`

```json

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "recipe_id"
  ],
  "properties": {
    "recipe_id": {
      "type": "string",
      "format": "uuid"
    },
    "version_id": {
      "type": "string",
      "format": "uuid"
    },
    "input": {
      "$ref": "#/components/schemas/WebsiteToolInput"
    }
  }
}

```

#### `#/components/schemas/PublicJobCreated`

```json

{
  "type": "object",
  "required": [
    "id",
    "status",
    "cached",
    "protected",
    "pricing_version",
    "route_mode",
    "base_tokens",
    "protected_tokens",
    "captcha_tokens",
    "created_at"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "url": {
      "type": "string",
      "format": "uri",
      "description": "Target origin only; path and query are stored in the encrypted short-retention payload."
    },
    "status": {
      "$ref": "#/components/schemas/DataJobStatus"
    },
    "cached": {
      "type": "boolean"
    },
    "protected": {
      "type": "boolean",
      "description": "True after server-side anti-bot protection detection."
    },
    "pricing_version": {
      "type": "integer",
      "minimum": 1
    },
    "route_mode": {
      "$ref": "#/components/schemas/DataRouteMode"
    },
    "proxy_type": {
      "$ref": "#/components/schemas/ProxyNetworkType",
      "description": "Requested proxy network class. Present on new submissions; historical idempotent replays may omit this field."
    },
    "base_tokens": {
      "type": "integer",
      "minimum": 0
    },
    "protected_tokens": {
      "type": "integer",
      "minimum": 0,
      "description": "Historical compatibility field; built-in protection is included in the selected pricing-v2 request mode."
    },
    "captcha_tokens": {
      "type": "integer",
      "minimum": 0
    },
    "quote": {
      "$ref": "#/components/schemas/EconomicQuote",
      "description": "Provider-neutral admission quote. Null when the guarded pricing policy is disabled."
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

```

#### `#/components/schemas/DataRouteMode`

```json

{
  "type": "string",
  "enum": [
    "direct",
    "auto",
    "browser",
    "http",
    "residential",
    "residential_browser",
    "mixed"
  ]
}

```

#### `#/components/schemas/ProxyQuoteVersion`

```json

{
  "type": "string",
  "minLength": 64,
  "maxLength": 64,
  "description": "Opaque pricing quote version. Send it with admission to detect changed prices."
}

```

#### `#/components/schemas/OwnPool`

```json

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "node_ids"
  ],
  "description": "Narrows proxy own to these nodes; without it every usable node of yours is in the pool.",
  "properties": {
    "node_ids": {
      "type": "array",
      "minItems": 1,
      "maxItems": 50,
      "items": {
        "type": "string",
        "format": "uuid"
      }
    }
  }
}

```

#### `#/components/schemas/BrowserAction`

```json

{
  "description": "A bounded declarative browser action. Arbitrary JavaScript, navigation, form input, keyboard events, file transfer, coordinate clicks, and arbitrary delays are not supported. A non-empty action list always executes in order in a fresh isolated browser context and cannot use a cached result.",
  "oneOf": [
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "delta_y"
      ],
      "properties": {
        "type": {
          "type": "string",
          "const": "scroll"
        },
        "delta_y": {
          "type": "integer",
          "minimum": -10000,
          "maximum": 10000,
          "not": {
            "const": 0
          },
          "description": "Required non-zero vertical scroll delta in CSS pixels."
        },
        "steps": {
          "type": "integer",
          "minimum": 1,
          "maximum": 25,
          "default": 1,
          "description": "Number of bounded wheel steps used to apply delta_y."
        },
        "interval_ms": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1000,
          "default": 250,
          "description": "Delay between scroll steps."
        }
      }
    },
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "selector"
      ],
      "properties": {
        "type": {
          "type": "string",
          "const": "click"
        },
        "selector": {
          "type": "string",
          "minLength": 1,
          "maxLength": 500,
          "description": "CSS selector for the target element."
        },
        "timeout_ms": {
          "type": "integer",
          "minimum": 100,
          "maximum": 30000,
          "default": 10000,
          "description": "Per-action upper bound, additionally limited by the request deadline."
        }
      }
    },
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "selector"
      ],
      "properties": {
        "type": {
          "type": "string",
          "const": "wait_for_selector"
        },
        "selector": {
          "type": "string",
          "minLength": 1,
          "maxLength": 500,
          "description": "CSS selector to wait for."
        },
        "state": {
          "type": "string",
          "enum": [
            "attached",
            "visible"
          ],
          "default": "visible"
        },
        "timeout_ms": {
          "type": "integer",
          "minimum": 100,
          "maximum": 30000,
          "default": 10000,
          "description": "Per-action upper bound, additionally limited by the request deadline."
        }
      }
    }
  ],
  "discriminator": {
    "propertyName": "type"
  }
}

```

#### `#/components/schemas/ExtractionField`

```json

{
  "oneOf": [
    {
      "$ref": "#/components/schemas/ScalarExtractionField"
    },
    {
      "$ref": "#/components/schemas/ObjectCollectionField"
    }
  ]
}

```

#### `#/components/schemas/WebsiteToolInput`

```json

{
  "type": "object",
  "maxProperties": 32,
  "propertyNames": {
    "minLength": 1,
    "maxLength": 160,
    "not": {
      "enum": [
        "__proto__",
        "prototype",
        "constructor"
      ]
    }
  },
  "additionalProperties": {
    "oneOf": [
      {
        "type": "string",
        "maxLength": 4096
      },
      {
        "type": "number"
      },
      {
        "type": "boolean"
      }
    ]
  }
}

```

#### `#/components/schemas/DataJobStatus`

```json

{
  "type": "string",
  "enum": [
    "pending",
    "running",
    "solving_captcha",
    "completed",
    "failed",
    "cancelled"
  ]
}

```

#### `#/components/schemas/ProxyNetworkType`

```json

{
  "type": "string",
  "enum": [
    "datacenter",
    "residential",
    "premium"
  ]
}

```

#### `#/components/schemas/EconomicQuote`

```json

{
  "type": [
    "object",
    "null"
  ],
  "additionalProperties": false,
  "required": [
    "status",
    "pricing_version",
    "customer_cap_credits",
    "outcomes"
  ],
  "properties": {
    "status": {
      "type": "string",
      "const": "accepted"
    },
    "pricing_version": {
      "type": "integer",
      "minimum": 1
    },
    "customer_cap_credits": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 0,
      "description": "Customer consent limit, not attributed revenue."
    },
    "outcomes": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "#/components/schemas/EconomicQuoteOutcome"
      },
      "description": "Provider-neutral charge outcomes admitted by the economic guard."
    }
  }
}

```

#### `#/components/schemas/ScalarExtractionField`

```json

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "name",
    "type"
  ],
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160,
      "description": "Must be unique within its level and cannot be __proto__, prototype, or constructor."
    },
    "type": {
      "type": "string",
      "enum": [
        "string",
        "number",
        "integer",
        "boolean",
        "date",
        "url"
      ]
    },
    "required": {
      "type": "boolean",
      "default": true
    },
    "multiple": {
      "type": "boolean",
      "default": false
    },
    "description": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1000
    }
  }
}

```

#### `#/components/schemas/ObjectCollectionField`

```json

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "name",
    "type",
    "multiple",
    "fields"
  ],
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160,
      "description": "Must be unique within its level and cannot be __proto__, prototype, or constructor."
    },
    "type": {
      "type": "string",
      "const": "object"
    },
    "required": {
      "type": "boolean",
      "default": true
    },
    "multiple": {
      "type": "boolean",
      "const": true
    },
    "description": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1000
    },
    "fields": {
      "type": "array",
      "minItems": 1,
      "maxItems": 200,
      "items": {
        "$ref": "#/components/schemas/ScalarExtractionField"
      },
      "description": "Nested fields are scalar only; nested object collections are not supported. The combined count of top-level and nested fields must not exceed 200."
    }
  }
}

```

#### `#/components/schemas/EconomicQuoteOutcome`

```json

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "action",
    "charge_credits"
  ],
  "properties": {
    "action": {
      "type": "string",
      "description": "Opaque action identifier for a quoted outcome. Internal tariff categories are omitted from this reference and should not be used as integration constants."
    },
    "charge_credits": {
      "type": "integer",
      "minimum": 0
    }
  }
}

```

### Complete operation object

```json

{
  "operationId": "postDataRequests",
  "tags": [
    "Data API"
  ],
  "summary": "Create one asynchronous request",
  "x-required-scope": "scrape:write",
  "x-mcp-name": "data_create_request",
  "x-mcp-annotations": {
    "readOnlyHint": false,
    "destructiveHint": false,
    "idempotentHint": false,
    "openWorldHint": true
  },
  "parameters": [
    {
      "$ref": "#/components/parameters/IdempotencyKey"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/DataRequest"
        },
        "examples": {
          "legacyScrape": {
            "summary": "Create a standard scrape request",
            "value": {
              "url": "https://example.com",
              "mode": "auto",
              "proxy": "random",
              "proxy_type": "datacenter"
            }
          },
          "createWebsiteTool": {
            "summary": "Create a tool from a public site and task description",
            "value": {
              "url": "https://shop.example",
              "task": {
                "description": "Find office desks and return each name and price",
                "example_input": {
                  "query": "office desks"
                }
              }
            }
          },
          "callWebsiteTool": {
            "summary": "Call a saved tool with new input values",
            "value": {
              "url": "https://shop.example",
              "tool": {
                "recipe_id": "550e8400-e29b-41d4-a716-446655440000",
                "input": {
                  "query": "standing desks"
                }
              }
            }
          }
        }
      }
    }
  },
  "responses": {
    "202": {
      "description": "Accepted or idempotently replayed Error body uses the documented PublicError DTO.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/CreateJobResponse"
          },
          "example": {
            "id": "9a20bd58-ed33-4a5b-b63f-b52bb1a62248",
            "status": "pending"
          },
          "examples": {
            "accepted": {
              "summary": "New asynchronous request",
              "value": {
                "id": "9a20bd58-ed33-4a5b-b63f-b52bb1a62248",
                "url": "https://example.com",
                "status": "pending",
                "cached": false,
                "protected": false,
                "pricing_version": 2,
                "route_mode": "http",
                "base_tokens": 1,
                "protected_tokens": 0,
                "captcha_tokens": 0,
                "created_at": "2026-08-22T12:00:00.000Z",
                "charged_tokens": 1,
                "idempotent_replay": false
              }
            },
            "replay": {
              "summary": "Same key and payload replay",
              "value": {
                "id": "9a20bd58-ed33-4a5b-b63f-b52bb1a62248",
                "url": "https://example.com",
                "status": "pending",
                "cached": false,
                "protected": false,
                "pricing_version": 2,
                "route_mode": "http",
                "base_tokens": 1,
                "protected_tokens": 0,
                "captcha_tokens": 0,
                "created_at": "2026-08-22T12:00:00.000Z",
                "charged_tokens": 0,
                "idempotent_replay": true
              }
            }
          }
        }
      },
      "headers": {
        "X-Credits-Charged": {
          "$ref": "#/components/headers/X-Credits-Charged"
        },
        "X-Credits-Remaining": {
          "$ref": "#/components/headers/X-Credits-Remaining"
        },
        "X-Credit-Pricing-Version": {
          "$ref": "#/components/headers/X-Credit-Pricing-Version"
        },
        "X-Route-Mode": {
          "$ref": "#/components/headers/X-Route-Mode"
        }
      }
    },
    "400": {
      "description": "Invalid request or idempotency key Error body uses the documented PublicError DTO.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PublicError"
          },
          "example": {
            "error": "Request failed",
            "code": "VALIDATION_ERROR",
            "message": "Invalid request or idempotency key Error body uses the documented PublicError DTO.",
            "requestId": "req_01J2QG"
          }
        }
      },
      "x-docs-retryable": false
    },
    "409": {
      "description": "Idempotency conflict Error body uses the documented PublicError DTO.",
      "in-progress submission": null,
      "unavailable route": null,
      "or plan credit limit": null,
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PublicError"
          },
          "example": {
            "error": "Request failed",
            "code": "RESULT_NOT_READY",
            "message": "Idempotency conflict Error body uses the documented PublicError DTO.",
            "requestId": "req_01J2QG"
          }
        }
      },
      "x-docs-retryable": true
    },
    "503": {
      "description": "Data API Error body uses the documented PublicError DTO.",
      "extraction": null,
      "or launch pricing is unavailable": null,
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PublicError"
          },
          "example": {
            "error": "Request failed",
            "code": "PRICING_NOT_ACTIVE",
            "message": "Data API Error body uses the documented PublicError DTO.",
            "requestId": "req_01J2QG"
          }
        }
      },
      "x-docs-retryable": true
    }
  },
  "description": "Creates one asynchronous request and returns 202 with its id and status; the work runs in the background, so follow up with data_wait_request or data_get_request and read the output with data_get_result or data_read_result_content. The body takes a required url plus at most one mode: omit both task and tool for a standard scrape, set task to generate a reusable tool from a natural-language description of the site, or set tool to call a saved tool (recipe_id) with new input values. Submitting charges tokens; send an Idempotency-Key so an exact-body retry replays the original request for free instead of creating a duplicate. Use data_create_batch for many URLs.",
  "security": [
    {
      "ApiKey": []
    },
    {
      "ApiKeyBearer": []
    }
  ],
  "servers": [
    {
      "url": "https://api.runharvester.com",
      "description": "RunHarvester public API"
    }
  ]
}

```