{
  "openapi": "3.0.1",
  "info": {
    "title": "Google News Scraper",
    "description": "Scrape Google News by keyword, topic or location, past the 100-article cap: the Actor searches day by day and removes duplicates. Real publisher URLs decoded, optional full article text, new-only monitoring with webhook. Plain HTTP, no proxy.",
    "version": "0.1",
    "x-build-id": "4jLBenPbi6eM5FlhG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alexmorain~google-news-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alexmorain-google-news-scraper",
        "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/alexmorain~google-news-scraper/runs": {
      "post": {
        "operationId": "runs-sync-alexmorain-google-news-scraper",
        "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/alexmorain~google-news-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-alexmorain-google-news-scraper",
        "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": {
          "queries": {
            "title": "Search queries",
            "type": "array",
            "description": "What you would type in the Google News search bar, one per line. Google's operators work: <code>\"exact phrase\"</code>, <code>OR</code>, <code>-exclude</code>, <code>site:lemonde.fr</code>, <code>intitle:</code>.<br><br>Each query runs in each edition below. An article found by two queries is returned and charged once, under the first query.",
            "items": {
              "type": "string"
            }
          },
          "timeRange": {
            "title": "Time range",
            "type": "string",
            "description": "How far back to look, counted from now: <code>1h</code>, <code>12h</code>, <code>1d</code>, <code>7d</code>, <code>2w</code>, <code>3m</code>, <code>1y</code>.<br><br>Up to 47 hours, Google's own <code>when:</code> filter is used (one search, at most 100 articles). From 2 days on, the Actor searches each day separately to go past the 100-article cap. Leave empty and set dates below for a fixed period, or leave both empty for Google's default ranking (at most 100 articles, any age)."
          },
          "dateFrom": {
            "title": "From date",
            "type": "string",
            "description": "First day to include, <code>YYYY-MM-DD</code>, in UTC. The Actor searches every day from here to <b>To date</b> (today if empty). Takes precedence over Time range."
          },
          "dateTo": {
            "title": "To date",
            "type": "string",
            "description": "Last day to include, <code>YYYY-MM-DD</code>, in UTC. Alone, it reads the 30 days up to that date."
          },
          "maxArticles": {
            "title": "Max articles per query",
            "minimum": 0,
            "type": "integer",
            "description": "Stop each query, topic or location after this many articles, <b>per edition</b>. The newest articles come first. Set <code>0</code> for no cap: every article of the period.",
            "default": 100
          },
          "editions": {
            "title": "Editions (country:language)",
            "type": "array",
            "description": "Google News edition codes, <code>COUNTRY:language</code>. Examples: <code>US:en</code>, <code>GB:en</code>, <code>IN:en</code>, <code>AU:en</code>, <code>CA:fr</code>, <code>FR:fr</code>, <code>DE:de</code>, <code>ES:es</code>, <code>IT:it</code>, <code>NL:nl</code>, <code>BR:pt-419</code>, <code>MX:es-419</code>, <code>JP:ja</code>, <code>IN:hi</code>. Empty means <code>US:en</code>.<br><br>Google silently serves US news for a code it does not know. The Actor checks every code and skips an unknown one with a warning instead of returning the wrong country.",
            "default": [
              "US:en"
            ],
            "items": {
              "type": "string"
            }
          },
          "topics": {
            "title": "Topics",
            "type": "array",
            "description": "Google News sections for each edition: top stories, world, business, technology and so on. A section lists only its latest articles, up to about 70 stories, and dates only filter what it lists.",
            "items": {
              "type": "string",
              "enum": [
                "TOP_STORIES",
                "WORLD",
                "NATION",
                "BUSINESS",
                "TECHNOLOGY",
                "ENTERTAINMENT",
                "SPORTS",
                "SCIENCE",
                "HEALTH"
              ],
              "enumTitles": [
                "Top stories",
                "World",
                "Nation",
                "Business",
                "Technology",
                "Entertainment",
                "Sports",
                "Science",
                "Health"
              ]
            }
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Local news for a city, region or country, as Google News names it: <code>Paris</code>, <code>Texas</code>, <code>Munich</code>.",
            "items": {
              "type": "string"
            }
          },
          "googleNewsUrls": {
            "title": "Google News URLs",
            "type": "array",
            "description": "Pages copied from your browser on news.google.com: a search, a topic (<code>/topics/…</code>), a section or a location. The edition in the URL is kept. Full-coverage story pages and publisher pages are not available as feeds.",
            "items": {
              "type": "string"
            }
          },
          "fetchArticleText": {
            "title": "Fetch article text",
            "type": "boolean",
            "description": "Open each article on the publisher's site and add its full text, author, main image and summary. Charged as <b>Article with text</b> instead of Article, only when the text comes out: paywalled and bot-protected sites (a quarter of English articles in our tests, fewer in other languages) return the article without text, at the plain article price. Slower: one more page per article.",
            "default": false
          },
          "expandStoryClusters": {
            "title": "Include all articles of each story",
            "type": "boolean",
            "description": "Topics, top stories and locations group several outlets' articles under one story, and only the first is a feed item. On the US top stories, that hides 4 articles out of 5. On, every article of each story becomes its own row, with <code>storyId</code> and <code>storyRank</code> linking it to the story (these rows have no own date, see <code>storyPublishedAt</code>). Search results are not grouped.",
            "default": true
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "all",
              "new-only"
            ],
            "type": "string",
            "description": "<b>All articles</b> returns every article found, on every run.<br><br><b>New articles only</b> keeps a persistent registry of what previous runs returned and charged, and returns only articles never returned before, matched on Google's ID and on the publisher URL. Schedule it hourly or daily with a short time range for brand and media monitoring: a quiet run costs the start fee only.",
            "default": "all"
          },
          "registryKey": {
            "title": "Registry key (New articles only)",
            "type": "string",
            "description": "By default the registry is tied to the exact queries, topics, locations and editions, so changing any of them starts a fresh one. Set your own key to keep one registry while you edit the list."
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "If set, the Actor POSTs a small JSON summary to this URL at the end of the run, <b>only when at least one article was returned</b>: <code>actor</code>, <code>runId</code>, <code>datasetId</code>, <code>mode</code>, <code>items</code>, <code>feeds</code>. With New articles only and a schedule, that is a push notification when your brand is in the news.<br><br>Use the final URL: a redirect is not followed, except a 307 or 308, which gets the same POST once. An unreachable webhook is logged as a warning and never fails the run. Stored encrypted, since a webhook URL often carries its own access token."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Leave as is. Google News answers the Actor without a proxy (no refusal in 2,800 test requests), so none is used and none is paid. If Google ever refuses, the Actor switches to Apify datacenter proxies by itself. A proxy chosen here is used for Google and for publisher pages.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}