{
  "openapi": "3.0.1",
  "info": {
    "title": "Article Extractor: Text, Markdown, Author, Date from Any URL",
    "description": "Extract clean article text and Markdown from news and blog URLs, with title, author, publish date, language, tags and word count. Works on lists or a dataset column, respects robots.txt, no API key. Non-articles, errors and blocked pages are free rows.",
    "version": "0.0",
    "x-build-id": "tq04pf33q8c09fB4B"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/charlesmarkette~article-extractor-text-markdown-author-date/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-charlesmarkette-article-extractor-text-markdown-author-date",
        "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/charlesmarkette~article-extractor-text-markdown-author-date/runs": {
      "post": {
        "operationId": "runs-sync-charlesmarkette-article-extractor-text-markdown-author-date",
        "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/charlesmarkette~article-extractor-text-markdown-author-date/run-sync": {
      "post": {
        "operationId": "run-sync-charlesmarkette-article-extractor-text-markdown-author-date",
        "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": {
          "startUrls": {
            "title": "Article URLs",
            "type": "array",
            "description": "One per line. Links to news articles, blog posts, documentation pages or any other web page with a main text. Each URL becomes one output row.",
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Dataset to enrich",
            "type": "string",
            "description": "Optional. A dataset from another run that has article links (a sitemap or RSS run, a scraper's results…). Each item's URL is extracted and the article columns are added next to the item's fields. Use {{resource.defaultDatasetId}} in an integration."
          },
          "urlField": {
            "title": "URL field",
            "type": "string",
            "description": "The item field that holds the article URL. Dotted paths work (link.href). Default: url."
          },
          "keepItemFields": {
            "title": "Keep the item's original fields",
            "type": "boolean",
            "description": "On: each output row is the original item plus the article columns (article columns win if a name clashes). Off: only the article columns.",
            "default": true
          },
          "outputFormats": {
            "title": "Output formats",
            "type": "array",
            "description": "Which versions of the main text to return. Text: plain text, one paragraph per line. Markdown: headings, lists, bold and italics, code blocks and tables (plus links and images when those options are on); the best input for LLMs and RAG. HTML: the cleaned main content as simple HTML.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "markdown",
                "html"
              ],
              "enumTitles": [
                "Plain text",
                "Markdown",
                "Clean HTML"
              ]
            },
            "default": [
              "text",
              "markdown"
            ]
          },
          "includeComments": {
            "title": "Include reader comments",
            "type": "boolean",
            "description": "Adds a comments field with the text of reader comments when the page shows them in its HTML. Comments loaded later by JavaScript (Disqus and similar) aren't seen.",
            "default": false
          },
          "includeLinks": {
            "title": "Include links",
            "type": "boolean",
            "description": "Adds a links list (url and text) of the links inside the article text, and keeps them as [text](url) in the Markdown.",
            "default": false
          },
          "includeImages": {
            "title": "Include images",
            "type": "boolean",
            "description": "Adds an images list (url and alt text) of the images inside the article, and keeps them as ![alt](url) in the Markdown. The lead image is always in the image field.",
            "default": false
          },
          "language": {
            "title": "Only these languages",
            "type": "string",
            "description": "Optional. Comma-separated language codes, e.g. en, de. Pages that declare another language (in their HTML lang attribute, og:locale, JSON-LD or Content-Language header) get a free 'language-skipped' row without text. Pages that declare no language are kept."
          },
          "minWords": {
            "title": "Minimum words for an article",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "Pages whose main text has fewer words are reported as 'not-article' without text and aren't charged (home pages, category pages, product grids, login walls). Chinese and Japanese characters count as one word each.",
            "default": 50
          },
          "maxTextLength": {
            "title": "Max text length (characters)",
            "minimum": 100,
            "type": "integer",
            "description": "Optional. Cuts each text field (text, markdown, html, comments) to this many characters and sets truncated to true. wordCount is always for the full text. Without a value, fields are capped at 1,000,000 characters."
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "On (recommended): each site's robots.txt is read first, and pages it disallows for bots get a free 'robots-blocked' row instead of being fetched. If robots.txt can't be read because the site is down or overloaded (HTTP 429 or 5xx), the site is treated as off-limits, as the robots.txt standard (RFC 9309) says. Turn off only for sites you are allowed to fetch.",
            "default": true
          },
          "concurrency": {
            "title": "Parallel pages",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many pages to fetch at the same time (1–20).",
            "default": 5
          },
          "perHostConcurrency": {
            "title": "Parallel pages per site",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "At most this many requests to the same host at a time (1–10), to stay polite to each site.",
            "default": 2
          },
          "timeoutSecs": {
            "title": "Timeout per request (seconds)",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "How long one request may take (5–300). A page, with its redirects, retries and robots.txt check, gets at most twice this long.",
            "default": 45
          },
          "dedupe": {
            "title": "Process each URL once",
            "type": "boolean",
            "description": "Skip repeats of a URL already processed in this run (URLs that differ only by #fragment count as the same). Skipped repeats get no row and are free.",
            "default": true
          },
          "maxResults": {
            "title": "Max output rows",
            "minimum": 1,
            "type": "integer",
            "description": "Optional cap on output rows (each row is one URL, extracted or not)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}