{
  "openapi": "3.0.1",
  "info": {
    "title": "Google News Feed: search, topics, locations, real article URLs",
    "description": "Google News results from the official RSS feeds for any search query, topic, location or language edition, with optional decoding of Google redirect links to the publisher's article URL and a new-articles-since-last-run mode for scheduled monitoring.",
    "version": "0.1",
    "x-build-id": "E18kJ2pWevHklBfAw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/longlever~google-news-feed/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-longlever-google-news-feed",
        "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/longlever~google-news-feed/runs": {
      "post": {
        "operationId": "runs-sync-longlever-google-news-feed",
        "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/longlever~google-news-feed/run-sync": {
      "post": {
        "operationId": "run-sync-longlever-google-news-feed",
        "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 per line. Google News search operators work, for example \"tesla recall\", \"site:reuters.com inflation\", \"intitle:openai\", \"\\\"exact phrase\\\"\". Each query is one feed of up to about 100 articles.",
            "items": {
              "type": "string"
            }
          },
          "topics": {
            "title": "Topics",
            "type": "array",
            "description": "Section names (WORLD, NATION, BUSINESS, TECHNOLOGY, ENTERTAINMENT, SPORTS, SCIENCE, HEALTH), a topic ID starting with CAAq, or a news.google.com/topics/... URL.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Local headlines for a city, region or country, for example \"Chicago\", \"Bavaria\", \"Kenya\".",
            "items": {
              "type": "string"
            }
          },
          "topStories": {
            "title": "Include top stories",
            "type": "boolean",
            "description": "Add the edition's Top stories front page as a feed.",
            "default": false
          },
          "editions": {
            "title": "Editions (country and language)",
            "type": "array",
            "description": "Google News editions as COUNTRY:language, for example US:en, GB:en, IN:en, DE:de, FR:fr, MX:es-419, BR:pt-419, JP:ja. Every query, topic and location runs once per edition.",
            "default": [
              "US:en"
            ],
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "snapshot",
              "new"
            ],
            "type": "string",
            "description": "Snapshot returns every article in the feeds. New articles returns only articles not seen in earlier runs of the same feed (schedule this mode).",
            "default": "snapshot"
          },
          "decodeUrls": {
            "title": "Decode publisher URLs",
            "type": "boolean",
            "description": "Turn each news.google.com redirect link into the publisher's real article URL. Off by default: runs then read only the RSS feeds and are much faster. Turn on when you need the publisher link.",
            "default": false
          },
          "postedWithinHours": {
            "title": "Published within hours",
            "minimum": 1,
            "type": "integer",
            "description": "Keep articles published within this many hours. Search queries also get a when: operator so Google returns recent results."
          },
          "dateFrom": {
            "title": "Search from date",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "YYYY-MM-DD. Search queries only: adds after: to the query."
          },
          "dateTo": {
            "title": "Search to date",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "YYYY-MM-DD, inclusive. Search queries only: adds before: to the query."
          },
          "splitByDay": {
            "title": "Split search date range by day",
            "type": "boolean",
            "description": "Google caps each feed at about 100 articles. With both dates set, run each query once per day in the range to get past the cap (up to 92 days).",
            "default": false
          },
          "excludePublishers": {
            "title": "Exclude publishers",
            "type": "array",
            "description": "Drop articles whose publisher name or domain contains any of these, for example \"msn.com\" or \"Yahoo\".",
            "items": {
              "type": "string"
            }
          },
          "maxArticlesPerFeed": {
            "title": "Max articles per feed (snapshot mode)",
            "minimum": 0,
            "type": "integer",
            "description": "0 means no limit. Feeds keep Google's order. Ignored in new-articles mode so no article is skipped.",
            "default": 0
          },
          "dedupe": {
            "title": "Remove duplicates across feeds",
            "type": "boolean",
            "description": "Return each article once even if several feeds contain it. The row keeps the first feed that found it.",
            "default": true
          },
          "stateKey": {
            "title": "State key (new-articles mode)",
            "type": "string",
            "description": "Optional name for the saved state. By default it is derived from your filters, so changing them starts a fresh baseline. Each feed keeps its own history either way."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. Use Apify Proxy if Google rate-limits your runs.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}