{
  "openapi": "3.0.1",
  "info": {
    "title": "Web & PDF to Markdown API for AI Agents, Cited and Verified",
    "description": "Returns mainText, mainMarkdown, title, links, metadata, sourceSpans (citable paragraph offsets + SHA-256), contentSha256, fetch timestamp and an Ed25519-signed receipt per URL. Web pages, PDF, .docx. Batch or sync HTTP API. Failed URLs are free.",
    "version": "0.5",
    "x-build-id": "Or1Gw3Ainr46p4zcq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lmhsolutions~web-page-to-markdown-pdf-to-text/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lmhsolutions-web-page-to-markdown-pdf-to-text",
        "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/lmhsolutions~web-page-to-markdown-pdf-to-text/runs": {
      "post": {
        "operationId": "runs-sync-lmhsolutions-web-page-to-markdown-pdf-to-text",
        "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/lmhsolutions~web-page-to-markdown-pdf-to-text/run-sync": {
      "post": {
        "operationId": "run-sync-lmhsolutions-web-page-to-markdown-pdf-to-text",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "extract",
              "verify"
            ],
            "type": "string",
            "description": "extract: fetch each URL and return clean JSON (with a signed receipt when signedProvenance is on). verify: check receipts and/or a source-pack manifest from earlier runs.",
            "default": "extract"
          },
          "urls": {
            "title": "URLs",
            "type": "array",
            "description": "Public http(s) URLs of web pages, PDFs or Word .docx files. One dataset item per URL. Required in extract mode.",
            "items": {
              "type": "string"
            }
          },
          "markdown": {
            "title": "Include Markdown",
            "type": "boolean",
            "description": "Add mainMarkdown next to mainText.",
            "default": true
          },
          "links": {
            "title": "Include links",
            "type": "boolean",
            "description": "Return the links found in the page or document.",
            "default": true
          },
          "maxLinks": {
            "title": "Max links",
            "minimum": 0,
            "maximum": 300,
            "type": "integer",
            "description": "Cap on returned links per URL (server cap 300).",
            "default": 300
          },
          "includeDroppedText": {
            "title": "Include full text of dropped sections",
            "type": "boolean",
            "description": "By default each dropped section has a 160-character preview. Turn on to get its full text.",
            "default": false
          },
          "jsonLd": {
            "title": "Include JSON-LD",
            "type": "boolean",
            "description": "Return parsed schema.org JSON-LD blocks in metadata.",
            "default": true
          },
          "sourceSpans": {
            "title": "Include source spans (citations)",
            "type": "boolean",
            "description": "With signed provenance: paragraph-level spans (id, start/end offsets into the hashed text, SHA-256 per span) so an agent can cite and anyone can re-check a quote.",
            "default": true
          },
          "injection": {
            "title": "Prompt-injection handling",
            "enum": [
              "flag",
              "strip"
            ],
            "type": "string",
            "description": "flag: report suspected prompt injection in `security`. strip: also remove medium/high-risk spans from mainText and mainMarkdown.",
            "default": "flag"
          },
          "useApifyProxy": {
            "title": "Use Apify Proxy",
            "type": "boolean",
            "description": "Fetch through Apify Proxy (datacenter by default). Recorded in each receipt's fetchProvenance. Does not unlock login walls or solve bot challenges.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration (optional)",
            "type": "object",
            "description": "Optional Apify Proxy groups or country, used when Use Apify Proxy is on."
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "URLs processed in parallel.",
            "default": 5
          },
          "signedProvenance": {
            "title": "Signed provenance (add-on, $0.03 per extracted item)",
            "type": "boolean",
            "description": "On (default): each extracted item also gets a completeness report (coverage score, dropped sections), a prompt-injection scan and an Ed25519-signed receipt you can verify later. Charged $0.03 per successfully extracted page or document (FREE-plan price), on top of the base price. Off: you get clean text, Markdown, metadata and links only, without the completeness, security and receipt sections, and this add-on is not charged.",
            "default": true
          },
          "sourcePackManifest": {
            "title": "Source-pack manifest (add-on, $0.10 per run)",
            "type": "boolean",
            "description": "On: when at least one URL succeeds, add one extra signed manifest item (also saved as SOURCE_PACK_MANIFEST in the key-value store) listing every extracted item's URL, outputSha256, textSha256 and receipt id, signed with the same Ed25519 key. Verify it later with mode verify. Charged once per run ($0.10, FREE-plan price); not charged if every URL failed.",
            "default": false
          },
          "receipts": {
            "title": "Receipts to verify",
            "type": "array",
            "description": "Verify mode: receipt objects (the `receipt` field of earlier dataset items)."
          },
          "responses": {
            "title": "Full responses (optional)",
            "type": "array",
            "description": "Verify mode: the full dataset items, in the same order as receipts (or alone; the receipt is taken from each item). Also checks outputSha256 and textSha256."
          },
          "manifest": {
            "title": "Manifest to verify (optional)",
            "type": "object",
            "description": "Verify mode: a source-pack manifest (the `manifest` field of the manifest item, or the SOURCE_PACK_MANIFEST record). If receipts are also given, each must be listed in the manifest."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}