{
  "openapi": "3.0.1",
  "info": {
    "title": "PDF Form Filler: Fill PDF Forms from JSON & Extract Fields",
    "description": "PDF form filler: fill AcroForm PDF fields from JSON in bulk (one template, many records), flatten the result, or list all PDF form fields with types, options and pages. Direct download links.",
    "version": "0.1",
    "x-build-id": "kSGYbXzoHxfPFOceT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/data-done-right~pdf-form-filler/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-data-done-right-pdf-form-filler",
        "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/data-done-right~pdf-form-filler/runs": {
      "post": {
        "operationId": "runs-sync-data-done-right-pdf-form-filler",
        "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/data-done-right~pdf-form-filler/run-sync": {
      "post": {
        "operationId": "run-sync-data-done-right-pdf-form-filler",
        "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",
        "required": [
          "pdfUrls"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "list_fields",
              "fill"
            ],
            "type": "string",
            "description": "list_fields = read every form field of the PDF (name, type, options, current value, page) so you know what to fill. fill = write your JSON values into the fields and return filled PDFs, one per record.",
            "default": "list_fields"
          },
          "pdfUrls": {
            "title": "PDF form URLs",
            "type": "array",
            "description": "Direct links to fillable PDF forms (AcroForm), one per line. Example: https://www.irs.gov/pub/irs-pdf/fw9.pdf. Dropbox and Google Drive share links are converted to direct downloads. In fill mode every template is filled once per record.",
            "items": {
              "type": "string"
            }
          },
          "records": {
            "title": "Records to fill (JSON)",
            "type": "array",
            "description": "Fill mode: a list of objects, one filled PDF each. Keys are field names from list_fields, values are text, numbers, true/false for checkboxes, an option for radio buttons and dropdowns, or a list for multi-select lists. Example: [{\"full_name\": \"Ada Lovelace\", \"agree\": true, \"plan\": \"pro\"}].",
            "default": []
          },
          "recordsDatasetId": {
            "title": "Records from a dataset (optional)",
            "type": "string",
            "description": "Fill mode: read records from an Apify dataset in addition to the list above. Each dataset item is one record. Up to 'Max output files' items are read."
          },
          "fileNamePattern": {
            "title": "Output file name pattern",
            "type": "string",
            "description": "Name of each filled PDF, without .pdf. Placeholders: {template} (source file name), {index} (001, 002, ...), {n} (1, 2, ...) and any record key such as {full_name}. Record keys starting with an underscore (for example _customer) are only used for naming, not as form fields. Example: invoice-{customer}-{index}.",
            "default": "{template}-filled-{index}"
          },
          "flatten": {
            "title": "Flatten (make fields non-editable)",
            "type": "boolean",
            "description": "Burn the values into the page and remove the form fields, so the PDF can no longer be edited and looks the same everywhere. Leave off to keep the form editable.",
            "default": false
          },
          "strict": {
            "title": "Strict (fail a record on any unknown field)",
            "type": "boolean",
            "description": "Off (default): unknown field names and invalid values are reported in 'warnings' and the PDF is still delivered. On: a record with any problem is not delivered and not charged.",
            "default": false
          },
          "password": {
            "title": "PDF password (known password only)",
            "type": "string",
            "description": "The correct password if the PDF is encrypted. Not needed for PDFs that only restrict editing. This tool never guesses or cracks passwords. It is never logged."
          },
          "maxFiles": {
            "title": "Max output files",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard cap on filled PDFs per run, which also caps your cost. Example: 100.",
            "default": 100
          },
          "maxFileSizeMb": {
            "title": "Max template size (MB)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Templates larger than this are skipped with a clear error. Maximum 100. Example: 30.",
            "default": 30
          },
          "maxConcurrency": {
            "title": "Parallel files",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many PDFs to process at the same time.",
            "default": 3
          },
          "outputStoreName": {
            "title": "Output store name (optional)",
            "type": "string",
            "description": "Save the filled PDFs in a named key-value store that you keep, instead of the default store of the run. Example: my-filled-forms."
          },
          "proxyConfiguration": {
            "title": "Proxy (optional)",
            "type": "object",
            "description": "Only needed if a file host blocks Apify IPs. Most PDF links work without it."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}