{
  "openapi": "3.0.1",
  "info": {
    "title": "News Article Scraper – Headlines & Full Text",
    "description": "Scrape headlines and full articles from any news site, with no per-site setup and no CSS selectors. A news section returns one row per entry with title, link and date; a story URL returns the headline, byline, date and full text. A language model reads the page structure.",
    "version": "0.1",
    "x-build-id": "WCgLAkak8JYd7XDcK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/simple.actors~universal-article-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-simple.actors-universal-article-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/simple.actors~universal-article-extractor/runs": {
      "post": {
        "operationId": "runs-sync-simple.actors-universal-article-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/simple.actors~universal-article-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-simple.actors-universal-article-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",
        "required": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "Pages to read (listing pages, or story URLs)",
            "type": "array",
            "description": "The pages to read. In list mode these are pages that list things — a news section, a blog archive, a press-release index — and every entry found becomes one row. In article mode these are individual story pages, and each returns one row carrying the full text.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "type": {
            "title": "What the pages are: a list, or articles",
            "enum": [
              "list",
              "article"
            ],
            "type": "string",
            "description": "Choose 'list' for pages that list things — a news section, a blog archive — which return one row per entry. Choose 'article' for individual story pages, which return one row per article with its full text.",
            "default": "list"
          },
          "openaiApiKey": {
            "title": "OpenAI API key (or set OPENAI_API_KEY on the Actor)",
            "type": "string",
            "description": "Your OpenAI key, used to decide which links on the page are the list. Stored encrypted. You can also set it as an OPENAI_API_KEY environment variable on the Actor instead of passing it per run."
          },
          "model": {
            "title": "Model that reads the page",
            "type": "string",
            "description": "Which OpenAI model reads the page. The default was picked by running the whole test corpus on each candidate and is the cheapest one that reads every case correctly. Change it only if a site's markup is unusual enough that the default misreads it — cheaper models tested here returned navigation links as stories.",
            "default": "gpt-4o-mini"
          },
          "maxItems": {
            "title": "Maximum entries per page",
            "minimum": 1,
            "type": "integer",
            "description": "List mode only: stop after this many entries from each page. This trims the result — it does not follow 'next page' links, so it can only ever return what the page itself lists.",
            "default": 50
          },
          "onlyNewerThan": {
            "title": "Only entries newer than (date or instant)",
            "type": "string",
            "description": "List mode only. Leaves out entries published before this moment — a date (2026-08-01) or a full instant (2026-08-01T09:00:00Z). Use it to poll a section for what is new since you last looked. One caveat worth knowing: many news platforms print no date on the listing page at all, only on the story. Entries with no date cannot be judged against the cutoff, so they are kept rather than dropped — otherwise those sites would return nothing and look like they had published nothing. Read those entries in article mode to get their date."
          },
          "cacheHours": {
            "title": "Reuse wrapped links followed in the last N hours",
            "minimum": 0,
            "maximum": 720,
            "type": "integer",
            "description": "Article mode only, and only for links that stand in front of an article — a Google News URL, a Facebook link shim, a t.co address. Those cannot be recognised as repeats from the address alone, so one read within this many hours is reused instead of fetched again. A plain article URL is always read afresh, on the assumption your own code already knows which articles it has. Set to 0 to disable. Listing pages are never reused.",
            "default": 24
          },
          "renderJavaScript": {
            "title": "When to run the page's JavaScript",
            "enum": [
              "auto",
              "never",
              "always"
            ],
            "type": "string",
            "description": "Most sites send their listing in the HTML and are read without a browser, which is faster and cheaper. 'Auto' starts there and falls back to a browser when the served HTML turns out to be an empty shell or a bot challenge. Pin it to 'never' if you only read sites you know server-render, or 'always' to skip the wasted first attempt on a site you know does not.",
            "default": "auto"
          },
          "proxy": {
            "title": "Proxy (switch to residential if a page is refused)",
            "type": "object",
            "description": "Apify Proxy settings for fetching the pages. Datacenter is the default and is included in every plan. Switch to residential if a site answers with 403s or a challenge page.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}