{
  "openapi": "3.0.1",
  "info": {
    "title": "HTTP Request Runner: Single or Bulk API Calls",
    "description": "Send one HTTP request or a batch of 1,000 to any public API: GET, POST, PUT, PATCH, DELETE with headers, query params and JSON body. Clay-style single-request input, lookupKey, callback URL, retries and a server mode. $0.80 per 1,000 responses.",
    "version": "0.1",
    "x-build-id": "EfhhCkEa3v4lKDv4h"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automation-lab~flexible-http-request-runner/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automation-lab-flexible-http-request-runner",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/automation-lab~flexible-http-request-runner/runs": {
      "post": {
        "operationId": "runs-sync-automation-lab-flexible-http-request-runner",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/automation-lab~flexible-http-request-runner/run-sync": {
      "post": {
        "operationId": "run-sync-automation-lab-flexible-http-request-runner",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "url": {
            "title": "URL",
            "type": "string",
            "description": "One public HTTP or HTTPS endpoint to call. For a single request (Clay, n8n, Make, Zapier, AI agents) this is all you need. Leave empty to use URL list or Batch of requests."
          },
          "method": {
            "title": "Method",
            "enum": [
              "GET",
              "HEAD",
              "POST",
              "PUT",
              "PATCH",
              "DELETE",
              "OPTIONS"
            ],
            "type": "string",
            "description": "Method for URL and URL list, and the default for batch requests without their own. Empty: GET, or POST when a body is set."
          },
          "headers": {
            "title": "Headers",
            "type": "object",
            "description": "Request headers as key/value pairs, sent with every request, e.g. {\"Authorization\": \"Bearer ...\"}. A batch request's own header of the same name wins. Secret values are redacted in the output."
          },
          "params": {
            "title": "Query parameters",
            "type": "object",
            "description": "Query-string parameters added to every request. Arrays produce repeated parameters. A batch request's own value of the same name wins."
          },
          "data": {
            "title": "Body",
            "type": "object",
            "description": "JSON body of the URL request, sent with content-type application/json. Not used for GET or HEAD."
          },
          "lookupKey": {
            "title": "Lookup key",
            "type": "string",
            "description": "Any identifier echoed back on the URL request's result row, so you can join the response to your source row."
          },
          "urls": {
            "title": "URL list",
            "type": "array",
            "description": "Many URLs called with the method, headers and query parameters above. Each URL becomes one result row.",
            "items": {
              "type": "string"
            }
          },
          "requests": {
            "title": "HTTP requests",
            "maxItems": 1000,
            "type": "array",
            "description": "Full request objects for a batch: { url, method, headers, query (or params), body (or data), id, label, lookupKey }. Only url is required. Run-level headers and params below apply to every entry; an entry's own value of the same name wins. Up to 1,000 requests per run across url, urls and requests.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "id": {
                  "title": "Request ID",
                  "type": "string",
                  "description": "Unique request identity used in the output."
                },
                "label": {
                  "title": "Label",
                  "type": "string",
                  "description": "Optional human-readable request label."
                },
                "url": {
                  "title": "URL",
                  "type": "string",
                  "editor": "textfield",
                  "description": "Absolute public HTTP or HTTPS URL. Private, local, reserved, and link-local destinations are blocked."
                },
                "method": {
                  "title": "Method",
                  "type": "string",
                  "description": "HTTP request method.",
                  "enum": [
                    "GET",
                    "HEAD",
                    "POST",
                    "PUT",
                    "PATCH",
                    "DELETE",
                    "OPTIONS"
                  ],
                  "default": "GET"
                },
                "headers": {
                  "title": "Headers",
                  "type": "object",
                  "description": "Optional request headers. Sensitive values are redacted from output."
                },
                "query": {
                  "title": "Query parameters",
                  "type": "object",
                  "description": "Query parameters appended to the URL. Arrays produce repeated parameters."
                },
                "body": {
                  "title": "Request body",
                  "type": "object",
                  "editor": "json",
                  "description": "Optional JSON object body for POST, PUT, PATCH, DELETE, or OPTIONS. API callers may also supply a text or other JSON value."
                },
                "lookupKey": {
                  "title": "Lookup key",
                  "type": "string",
                  "description": "Any identifier echoed back on the result row, to join it to your source row."
                },
                "params": {
                  "title": "Query parameters (alias)",
                  "type": "object",
                  "description": "Same as query, for Clay-style inputs."
                },
                "data": {
                  "title": "Request body (alias)",
                  "type": "object",
                  "description": "Same as body, for Clay-style inputs."
                }
              }
            }
          },
          "callbackUrl": {
            "title": "Callback URL",
            "type": "string",
            "description": "Optional public webhook. Each saved result row is POSTed here as JSON as soon as it is ready (the pattern Clay and n8n use). A failed callback is logged and does not stop the run."
          },
          "timeoutSecs": {
            "title": "Timeout per attempt (seconds)",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "Maximum time for one request attempt.",
            "default": 30
          },
          "maxConcurrency": {
            "title": "Maximum concurrency",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Maximum requests executed at the same time.",
            "default": 5
          },
          "maxRetries": {
            "title": "Maximum retries",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Retries per request after network errors or configured transient status codes.",
            "default": 2
          },
          "retryOnStatusCodes": {
            "title": "Retry status codes",
            "type": "array",
            "description": "HTTP status codes that trigger bounded exponential backoff.",
            "items": {
              "type": "integer",
              "minimum": 400,
              "maximum": 599
            },
            "default": [
              408,
              425,
              429,
              500,
              502,
              503,
              504
            ]
          },
          "followRedirects": {
            "title": "Follow redirects",
            "type": "boolean",
            "description": "Follow HTTP redirects while revalidating every destination as public.",
            "default": true
          },
          "maxRedirects": {
            "title": "Maximum redirects",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum redirects followed for each request.",
            "default": 5
          },
          "maxResponseBytes": {
            "title": "Maximum stored response bytes",
            "minimum": 1000,
            "maximum": 5000000,
            "type": "integer",
            "description": "Maximum response-body bytes retained per request. Larger bodies are safely truncated and marked.",
            "default": 1000000
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}