{
  "openapi": "3.0.1",
  "info": {
    "title": "Google News Scraper: Search, Topics, Any Country",
    "description": "Google News articles for any search, topic or section, any language and country: headline, original article URL, publisher, date, related coverage, plus description and image on request. Built to beat data_xplorer's Google News Scraper: same original URLs at half its price. From $2 per 1,000.",
    "version": "0.1",
    "x-build-id": "E1fZbQR4dafwP9tI1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tidyharvest~google-news-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tidyharvest-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/tidyharvest~google-news-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tidyharvest-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/tidyharvest~google-news-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tidyharvest-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": "One search per line, exactly as you would type it into Google News. Operators work: \"exact phrase\", OR, -exclude, site:reuters.com, intitle:earnings. Each query returns up to ~100 articles (more with a date range below).",
            "default": [
              "artificial intelligence"
            ],
            "items": {
              "type": "string"
            }
          },
          "topics": {
            "title": "Topic sections",
            "type": "array",
            "description": "Optional: also pull Google News topic sections (or Top stories) for the chosen language and country.",
            "items": {
              "type": "string",
              "enum": [
                "TOP_STORIES",
                "WORLD",
                "NATION",
                "BUSINESS",
                "TECHNOLOGY",
                "ENTERTAINMENT",
                "SCIENCE",
                "SPORTS",
                "HEALTH"
              ],
              "enumTitles": [
                "Top stories",
                "World",
                "Nation (your country)",
                "Business",
                "Technology",
                "Entertainment",
                "Science",
                "Sports",
                "Health"
              ]
            }
          },
          "topicUrls": {
            "title": "Custom topic or section links",
            "type": "array",
            "description": "Optional: any Google News topic or section page link copied from your browser (e.g. a sub-topic like Artificial intelligence, a city, a team or a company page).",
            "items": {
              "type": "string"
            }
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Google News interface language code, e.g. en-US, en-GB, de, fr, es-419, ja, pt-BR.",
            "default": "en-US"
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Two-letter country edition, e.g. US, GB, IN, DE, FR, JP, BR.",
            "default": "US"
          },
          "timeframe": {
            "title": "Published within",
            "enum": [
              "any",
              "1h",
              "6h",
              "12h",
              "1d",
              "2d",
              "7d",
              "14d",
              "30d",
              "1y"
            ],
            "type": "string",
            "description": "Only articles from the last hour/day/week etc. Applies to search queries. Ignored when a date range is set.",
            "default": "any"
          },
          "dateFrom": {
            "title": "From date",
            "type": "string",
            "description": "Optional start date (YYYY-MM-DD). With a date range each query is split into day-sized windows, so you can collect far more than 100 articles per query (one feed request per window, up to 60 windows)."
          },
          "dateTo": {
            "title": "To date",
            "type": "string",
            "description": "Optional end date (YYYY-MM-DD, inclusive). Defaults to today when only a start date is set."
          },
          "maxItemsPerQuery": {
            "title": "Max articles per query",
            "minimum": 0,
            "maximum": 6000,
            "type": "integer",
            "description": "Cap per query or topic. 0 = no per-query cap.",
            "default": 100
          },
          "maxItems": {
            "title": "Max articles in total",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Hard cap on results for the whole run (also caps your cost). Duplicates across queries are removed before counting.",
            "default": 50
          },
          "decodeUrls": {
            "title": "Original article URLs",
            "type": "boolean",
            "description": "Return each article's real publisher URL in `url` and `publisherUrl` instead of a Google News redirect link. On by default; turn off for the fastest runs.",
            "default": true
          },
          "extractDetails": {
            "title": "Article description and image",
            "type": "boolean",
            "description": "Also read each article's own page for its description (summary) and main image (`description`, `imageUrl`). Slower; some publishers refuse automated visits, and those rows keep null.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}