{
  "openapi": "3.0.1",
  "info": {
    "title": "Google News Scraper",
    "description": "Search Google News by keyword and extract article titles, sources, publication dates, URLs, and thumbnails. Filter by time range, language, and country.",
    "version": "1.0",
    "x-build-id": "c2NkB3bQWLHd8Pb9p"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/solidcode~google-news-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-solidcode-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/solidcode~google-news-scraper/runs": {
      "post": {
        "operationId": "runs-sync-solidcode-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/solidcode~google-news-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-solidcode-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": {
          "keywords": {
            "title": "Search keywords",
            "type": "array",
            "description": "One or more topics or terms to search on Google News. Each keyword is searched independently and results are combined in the output. You can also use 'OR' inside a single entry (e.g. \"apple OR tesla\") to merge two queries into one.",
            "default": [
              "Technology"
            ],
            "items": {
              "type": "string"
            }
          },
          "exactPhrase": {
            "title": "Match exact phrase",
            "type": "boolean",
            "description": "Wrap each keyword in quotes so Google matches the phrase exactly (e.g. \"artificial intelligence\" — articles must contain those words next to each other in that order, not just both words anywhere).",
            "default": false
          },
          "inTitleOnly": {
            "title": "Title-only match",
            "type": "boolean",
            "description": "Only match keywords that appear in the article title (uses Google's intitle: operator). Reduces noise from articles that mention the term in passing.",
            "default": false
          },
          "excludeTerms": {
            "title": "Exclude terms",
            "type": "array",
            "description": "Words to exclude from results (e.g. [\"opinion\", \"sponsored\"]). Applied as -term to every keyword.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "title": "Include only these publishers",
            "type": "array",
            "description": "Restrict results to specific publishers (e.g. [\"BBC\", \"Reuters\"]). Use the publisher name as it appears on Google News. Multiple sources are combined with OR.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludeSources": {
            "title": "Exclude these publishers",
            "type": "array",
            "description": "Skip articles from specific publishers (e.g. [\"CNN\", \"Fox News\"]).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs (advanced)",
            "type": "array",
            "description": "Any news.google.com URL — search URL, topic page (e.g. /topics/CAAqI...), publisher feed (/publications/...), or Full Coverage story page (/stories/...). Each URL is fetched and all article cards on the page are extracted. Bypasses keyword and operator settings (it's a direct pass-through).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "timeFilter": {
            "title": "Time range",
            "enum": [
              "any",
              "hour",
              "24h",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Limit results to articles published within this time window. Ignored when a custom date range is provided below.",
            "default": "any"
          },
          "dateFrom": {
            "title": "Start date (custom range)",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
            "type": "string",
            "description": "Earliest publication date to include, in YYYY-MM-DD format (e.g. 2024-01-01). When both start and end dates are set, the scraper sweeps the full range and can return far more than 100 results per keyword by splitting the range into smaller windows."
          },
          "dateTo": {
            "title": "End date (custom range)",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
            "type": "string",
            "description": "Latest publication date to include, in YYYY-MM-DD format (e.g. 2024-12-31). Both bounds are inclusive. When set with a start date, it overrides the time range filter above."
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "es",
              "fr",
              "de",
              "it",
              "pt",
              "nl",
              "pl",
              "ru",
              "tr",
              "ja",
              "ko",
              "zh-CN",
              "zh-TW",
              "ar",
              "hi",
              "id",
              "th",
              "vi"
            ],
            "type": "string",
            "description": "Interface language for news results.",
            "default": "en"
          },
          "country": {
            "title": "Country / region",
            "enum": [
              "any",
              "US",
              "GB",
              "CA",
              "AU",
              "IE",
              "IN",
              "NZ",
              "ZA",
              "FR",
              "DE",
              "ES",
              "IT",
              "NL",
              "BE",
              "PT",
              "PL",
              "AT",
              "CH",
              "SE",
              "NO",
              "DK",
              "FI",
              "BR",
              "MX",
              "AR",
              "CL",
              "CO",
              "JP",
              "KR",
              "CN",
              "TW",
              "HK",
              "SG",
              "ID",
              "TH",
              "VN",
              "PH",
              "MY",
              "RU",
              "TR",
              "SA",
              "AE",
              "EG",
              "IL",
              "NG",
              "KE"
            ],
            "type": "string",
            "description": "Country bias for results. Pick 'Any' for no regional preference.",
            "default": "US"
          },
          "includeAuthor": {
            "title": "Include author byline",
            "type": "boolean",
            "description": "Extract the article author / byline when shown on the card (~30% of articles include one — Google strips it from the rest).",
            "default": true
          },
          "resolvePublisherUrls": {
            "title": "Resolve direct publisher URLs",
            "type": "boolean",
            "description": "Recover the real publisher URL (e.g. nytimes.com/...) for each Google News /read/... link. Costs two extra HTTP requests per article (Google encrypts the publisher URL — decoding requires fetching a per-article signature first). Leave off unless you need direct publisher links.",
            "default": false
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "relevance",
              "date"
            ],
            "type": "string",
            "description": "Order of records in the output. 'Relevance' keeps Google's native ordering; 'Date (newest first)' re-sorts by publication date after fetching.",
            "default": "relevance"
          },
          "deduplicateAcrossKeywords": {
            "title": "Deduplicate across keywords",
            "type": "boolean",
            "description": "When you search multiple keywords or start URLs, drop articles that appear in more than one set of results (kept once, attributed to whichever keyword saw it first). By default each keyword's results are independent.",
            "default": false
          },
          "maxResults": {
            "title": "Max results per keyword",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of articles to return for each keyword or start URL. Use 0 for as many as Google returns. Without a date range, Google caps responses at ~100 articles per keyword; with a date range, the scraper can return thousands.",
            "default": 50
          },
          "maxRequestsPerKeyword": {
            "title": "Max requests per keyword (date-range mode)",
            "minimum": 1,
            "type": "integer",
            "description": "Safety limit on how many date-window queries the scraper will fire for a single keyword. Raise for wide ranges on high-volume keywords; lower to cap compute. Only applies when a custom date range is set.",
            "default": 300
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}