{
  "openapi": "3.0.1",
  "info": {
    "title": "Google News Scraper & Keyword News Alerts Monitor",
    "description": "Google News scraper for any keyword or topic. Get headlines, real publisher URLs, dates, snippets and images in any language or country, from the last hour to the last year. Monitor mode returns only new articles for scheduled news alerts.",
    "version": "1.0",
    "x-build-id": "131bDEhJizUdDGszw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mosaicked_sponge~google-news-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mosaicked_sponge-google-news-monitor",
        "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/mosaicked_sponge~google-news-monitor/runs": {
      "post": {
        "operationId": "runs-sync-mosaicked_sponge-google-news-monitor",
        "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/mosaicked_sponge~google-news-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-mosaicked_sponge-google-news-monitor",
        "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 (keywords)",
            "type": "array",
            "description": "One Google News search per line. Google operators work: \"exact phrase\", OR, -exclude, site:reuters.com, intitle:word. Up to 500 queries per run. Leave empty if you only want topics.",
            "items": {
              "type": "string"
            }
          },
          "topics": {
            "title": "Topics (optional)",
            "type": "array",
            "description": "Google News top stories for a section, in the chosen language and country. Can be combined with queries.",
            "items": {
              "type": "string",
              "enum": [
                "WORLD",
                "NATION",
                "BUSINESS",
                "TECHNOLOGY",
                "ENTERTAINMENT",
                "SPORTS",
                "SCIENCE",
                "HEALTH"
              ],
              "enumTitles": [
                "World",
                "Nation (your country)",
                "Business",
                "Technology",
                "Entertainment",
                "Sports",
                "Science",
                "Health"
              ]
            }
          },
          "timeWindow": {
            "title": "Time window",
            "enum": [
              "1h",
              "2h",
              "6h",
              "12h",
              "24h",
              "2d",
              "3d",
              "7d",
              "14d",
              "30d",
              "90d",
              "1y",
              "any"
            ],
            "type": "string",
            "description": "Only articles published within this period. Filtering is strict: anything older is dropped, even if Google returns it. Ignored when 'Published after/before' is set.",
            "default": "7d"
          },
          "maxArticlesPerQuery": {
            "title": "Max articles per query",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Google News gives up to about 100 articles per search. Above 100, the Actor walks the time window day by day to collect more (up to 5,000 per query).",
            "default": 100
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "newOnly",
              "all"
            ],
            "type": "string",
            "description": "'New articles only' (monitor) returns only articles not returned by an earlier run with the same queries, language and country; perfect for scheduled alerts. 'All articles' returns everything that matches every time. The form opens on 'All articles' so a test run always shows results. API calls that omit this field use 'New articles only'.",
            "default": "newOnly"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Google News edition language code, e.g. en, es, de, fr, it, pt-BR, ja, zh-CN, es-419.",
            "default": "en"
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "2-letter country code of the Google News edition, e.g. US, GB, IN, CA, AU, DE, FR, BR, MX.",
            "default": "US"
          },
          "resolvePublisherUrls": {
            "title": "Resolve real publisher URLs",
            "type": "boolean",
            "description": "Turn news.google.com redirect links into the real article URL (e.g. https://www.reuters.com/...). If a link cannot be resolved, the Google News link is kept and urlResolved is false.",
            "default": true
          },
          "fetchArticleDetails": {
            "title": "Add snippet, image and author from the article page",
            "type": "boolean",
            "description": "Reads the top of each article page (meta tags only) to add a description snippet, the preview image and the author. Needs 'Resolve real publisher URLs'. Turn off for maximum speed.",
            "default": true
          },
          "dedupeAcrossQueries": {
            "title": "Merge duplicates across queries",
            "type": "boolean",
            "description": "If the same article matches several queries, return it once and list every matching query in matchedQueries.",
            "default": true
          },
          "excludeSources": {
            "title": "Exclude sources",
            "type": "array",
            "description": "Publisher names or domains to skip, e.g. 'Yahoo Finance' or 'msn.com'. Excluded articles are not charged.",
            "items": {
              "type": "string"
            }
          },
          "maxArticles": {
            "title": "Max articles in total (0 = no limit)",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on rows for the whole run, newest first.",
            "default": 0
          },
          "publishedAfter": {
            "title": "Published after (optional)",
            "type": "string",
            "description": "Custom range start: YYYY-MM-DD, an ISO datetime, or relative like '3 days' / '12 hours'. Overrides the time window."
          },
          "publishedBefore": {
            "title": "Published before (optional)",
            "type": "string",
            "description": "Custom range end: YYYY-MM-DD or an ISO datetime."
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Named key-value store that remembers which articles were already returned (for 'New articles only'). Leave as is unless you want separate memory.",
            "default": "google-news-monitor-state"
          },
          "monitorId": {
            "title": "Monitor ID (optional)",
            "type": "string",
            "description": "By default, memory is keyed by your queries + language + country, so editing the queries starts fresh. Set an ID to keep one memory even when you edit the queries."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}