{
  "openapi": "3.0.1",
  "info": {
    "title": "Article Text Extractor: Clean Text & Markdown from Any URL",
    "description": "Extract the clean main text of any article or blog post as plain text and Markdown, with title, author, publish date, site, language, lead image, tags and word count. Ads, menus and footers removed. Paste URLs or discover articles from a homepage, RSS feed or sitemap. $1 per 1,000 articles.",
    "version": "0.1",
    "x-build-id": "oMpdq9jXpTQ3QrHGE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/larkmoor~article-text-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-larkmoor-article-text-extractor",
        "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~article-text-extractor/runs": {
      "post": {
        "operationId": "runs-sync-larkmoor-article-text-extractor",
        "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~article-text-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-larkmoor-article-text-extractor",
        "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": {
          "articleUrls": {
            "title": "Article URLs",
            "type": "array",
            "description": "Pages to extract, one per line: news articles, blog posts, docs pages, press releases. Each page gives one row.",
            "items": {
              "type": "string"
            }
          },
          "discoverFrom": {
            "title": "Discover articles from",
            "type": "array",
            "description": "Homepages, section pages, RSS/Atom feeds or sitemaps. The actor finds article links there (the site's own feed first, then article-looking links on the page) and extracts them.",
            "items": {
              "type": "string"
            }
          },
          "maxArticlesPerSite": {
            "title": "Max articles per discovery source",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many article links to take from each source in 'Discover articles from' (newest first where the source is a feed).",
            "default": 20
          },
          "maxArticles": {
            "title": "Max articles in total",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Hard cap on the pages extracted in this run.",
            "default": 1000
          },
          "includeText": {
            "title": "Plain text",
            "type": "boolean",
            "description": "Return the main text as plain text (paragraphs separated by new lines).",
            "default": true
          },
          "includeMarkdown": {
            "title": "Markdown",
            "type": "boolean",
            "description": "Return the main text as Markdown with headings, lists, bold/italic and tables kept — ready for LLMs and RAG.",
            "default": true
          },
          "includeHtml": {
            "title": "Clean HTML",
            "type": "boolean",
            "description": "Also return the main content as clean, minimal HTML.",
            "default": false
          },
          "keepLinks": {
            "title": "Keep links in Markdown/HTML",
            "type": "boolean",
            "description": "Keep the hyperlinks inside the article text.",
            "default": false
          },
          "includeTables": {
            "title": "Keep tables",
            "type": "boolean",
            "description": "Keep tables that are part of the article.",
            "default": true
          },
          "extractionMode": {
            "title": "Extraction mode",
            "enum": [
              "balanced",
              "precision"
            ],
            "type": "string",
            "description": "Balanced keeps more of the article (good default). Precision drops anything doubtful, for the cleanest text.",
            "default": "balanced"
          },
          "minWords": {
            "title": "Minimum words",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Pages with less main text than this are reported as 'not an article' and not charged. 0 keeps everything.",
            "default": 80
          },
          "maxCharacters": {
            "title": "Max characters per field",
            "minimum": 0,
            "type": "integer",
            "description": "Cut the text/Markdown fields to this many characters (0 = no limit). Handy for LLM token budgets.",
            "default": 0
          },
          "skipFailed": {
            "title": "Only output extracted articles",
            "type": "boolean",
            "description": "Leave out rows for pages that failed or had no article (they are never charged either way).",
            "default": false
          },
          "concurrency": {
            "title": "Pages at once",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many pages to fetch in parallel (1-10).",
            "default": 5
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Skip pages the site's robots.txt disallows.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}