{
  "openapi": "3.0.1",
  "info": {
    "title": "HTTP Request Sender: Batch API Calls, Pagination & Retries",
    "description": "Send hundreds of HTTP requests (GET, POST, PUT, PATCH, DELETE) to any API in one run: headers, JSON/form bodies, {{placeholders}} from a list, retries, pagination, proxy, JSON array splitting. $2.50 per 1,000 responses; network errors free.",
    "version": "0.1",
    "x-build-id": "dsycdaru4ehNllMuZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/larkmoor~http-request-sender/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-larkmoor-http-request-sender",
        "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/larkmoor~http-request-sender/runs": {
      "post": {
        "operationId": "runs-sync-larkmoor-http-request-sender",
        "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/larkmoor~http-request-sender/run-sync": {
      "post": {
        "operationId": "run-sync-larkmoor-http-request-sender",
        "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": {
          "requests": {
            "title": "Requests",
            "type": "array",
            "description": "A list of requests. Each item is a URL string or an object: {\"url\", \"method\", \"headers\", \"queryParams\", \"body\", \"bodyType\", \"label\"}. Missing fields use the shared settings below."
          },
          "urls": {
            "title": "URLs (simple mode)",
            "type": "array",
            "description": "Plain URLs. Each one is sent with the shared method, headers, query params and body.",
            "items": {
              "type": "string"
            }
          },
          "urlTemplate": {
            "title": "URL template",
            "type": "string",
            "description": "A URL with {{placeholders}}, e.g. https://api.example.com/users/{{id}}. One request is sent per row in 'Template rows'. Placeholders also work in headers, query params and the body."
          },
          "templateRows": {
            "title": "Template rows",
            "type": "array",
            "description": "Rows that fill the URL template, e.g. [{\"id\": 1}, {\"id\": 2}]. Plain values are available as {{value}}. Dot paths like {{user.id}} work. A 'label' field is copied to the output."
          },
          "method": {
            "title": "Shared method",
            "enum": [
              "GET",
              "POST",
              "PUT",
              "PATCH",
              "DELETE",
              "HEAD",
              "OPTIONS"
            ],
            "type": "string",
            "description": "Used when a request does not set its own method.",
            "default": "GET"
          },
          "headers": {
            "title": "Shared headers",
            "type": "object",
            "description": "Headers added to every request, e.g. {\"Authorization\": \"Bearer ...\", \"Accept\": \"application/json\"}. A request's own headers win."
          },
          "queryParams": {
            "title": "Shared query params",
            "type": "object",
            "description": "Query string parameters added to every URL."
          },
          "body": {
            "title": "Shared body",
            "type": "object",
            "description": "Body for POST/PUT/PATCH requests that do not set their own. JSON by default."
          },
          "bodyType": {
            "title": "Body type",
            "enum": [
              "json",
              "form",
              "raw"
            ],
            "type": "string",
            "description": "How bodies are sent.",
            "default": "json"
          },
          "responseFormat": {
            "title": "Response format",
            "enum": [
              "auto",
              "json",
              "text",
              "base64"
            ],
            "type": "string",
            "description": "How the response body is stored.",
            "default": "auto"
          },
          "splitItemsPath": {
            "title": "Split JSON array into rows",
            "type": "string",
            "description": "Dot path to an array in the JSON response (e.g. data.items, results, or . for a top-level array). Each array item becomes its own dataset row with the request details. You are still charged once per HTTP response, not per item."
          },
          "includeResponseHeaders": {
            "title": "Include response headers",
            "type": "boolean",
            "description": "Add all response headers to each row.",
            "default": false
          },
          "maxBodyChars": {
            "title": "Max body size (characters)",
            "minimum": 100,
            "maximum": 5000000,
            "type": "integer",
            "description": "Longer text bodies are cut and marked bodyTruncated.",
            "default": 200000
          },
          "onlySuccessful": {
            "title": "Only output successful responses (2xx)",
            "type": "boolean",
            "description": "Non-2xx responses are left out of the dataset (they still count as a sent request).",
            "default": false
          },
          "pageParam": {
            "title": "Page parameter",
            "type": "string",
            "description": "Query parameter that holds the page number, e.g. page or _page. Leave empty for no page-number pagination."
          },
          "startPage": {
            "title": "Start page",
            "type": "integer",
            "description": "First page number (use 0 for zero-based APIs).",
            "default": 1
          },
          "pageStep": {
            "title": "Page step",
            "type": "integer",
            "description": "Add this to the page parameter each time (e.g. 100 for offset-style APIs).",
            "default": 1
          },
          "nextUrlPath": {
            "title": "Next-page URL path",
            "type": "string",
            "description": "Dot path to the next page link in the JSON response, e.g. next or links.next or paging.next.url. Followed until it is empty."
          },
          "maxPagesPerRequest": {
            "title": "Max pages per request",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many pages to follow for each request. Stops early on an empty page or a non-2xx response.",
            "default": 1
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many requests run at the same time.",
            "default": 5
          },
          "delayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Minimum gap between two requests across the whole run. Use it to respect an API's rate limit.",
            "default": 0
          },
          "timeoutSecs": {
            "title": "Timeout per request (seconds)",
            "minimum": 3,
            "maximum": 300,
            "type": "integer",
            "description": "How long to wait for one response before retrying or giving up.",
            "default": 30
          },
          "maxRetries": {
            "title": "Retries",
            "minimum": 0,
            "maximum": 6,
            "type": "integer",
            "description": "Retries on network errors and on the status codes below. Retry-After headers are respected.",
            "default": 2
          },
          "retryOnStatus": {
            "title": "Retry on status codes",
            "type": "array",
            "description": "Responses with these status codes are retried.",
            "default": [
              408,
              425,
              429,
              500,
              502,
              503,
              504
            ]
          },
          "followRedirects": {
            "title": "Follow redirects",
            "type": "boolean",
            "description": "Follow 3xx redirects to the final URL (shown as finalUrl).",
            "default": true
          },
          "maxRequests": {
            "title": "Max requests",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Hard cap on requests sent in this run (pages included).",
            "default": 1000
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional Apify Proxy (pick a country to call geo-specific APIs). Off by default.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}