{
  "openapi": "3.0.1",
  "info": {
    "title": "Google News AI Scraper",
    "description": "Search Google News by keyword, optionally extract full article text and AI-generated summaries via OpenRouter, and never re-scrape the same article twice across runs via built-in cross-run deduplication.",
    "version": "1.0",
    "x-build-id": "Ti8FQdgds2kjMBLsm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/confidential_gnat~google-news-ai-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-confidential_gnat-google-news-ai-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/confidential_gnat~google-news-ai-scraper/runs": {
      "post": {
        "operationId": "runs-sync-confidential_gnat-google-news-ai-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/confidential_gnat~google-news-ai-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-confidential_gnat-google-news-ai-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",
        "required": [
          "queries"
        ],
        "properties": {
          "projectName": {
            "title": "Project name",
            "type": "string",
            "description": "Articles already scraped under this project name in a previous run are skipped. Leave empty to disable cross-run caching."
          },
          "queries": {
            "title": "Search queries",
            "type": "array",
            "description": "Keywords or phrases to search on Google News. Each query is scraped separately.",
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerQuery": {
            "title": "Max results per query",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of articles to return for each search query, after deduplication.",
            "default": 1
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "2-letter BCP-47 language code for Google News results (e.g. 'en', 'de', 'fr', 'es').",
            "default": "en"
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code for regional news (e.g. 'US', 'GB', 'DE', 'IN').",
            "default": "US"
          },
          "dateRange": {
            "title": "Date range",
            "enum": [
              "1h",
              "1d",
              "7d",
              "1m",
              "1y",
              "any"
            ],
            "type": "string",
            "description": "Filter articles by recency. Ignored if Date from / Date to is set.",
            "default": "any"
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "Only return articles published on or after this date (YYYY-MM-DD). Overrides Date range."
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "Only return articles published on or before this date (YYYY-MM-DD). Overrides Date range."
          },
          "siteFilter": {
            "title": "Site filter",
            "type": "string",
            "description": "Restrict results to a specific domain (e.g. 'reuters.com', 'bbc.com')."
          },
          "excludeWords": {
            "title": "Exclude words",
            "type": "array",
            "description": "Words that must not appear in results.",
            "items": {
              "type": "string"
            }
          },
          "includeImages": {
            "title": "Include images",
            "type": "boolean",
            "description": "Extract the article's main image (og:image). Note: this makes the Actor visit each article page with a browser, even if Extract full text is off.",
            "default": false
          },
          "extractFullText": {
            "title": "Extract full text",
            "type": "boolean",
            "description": "Visit each article with a browser and extract the full, cleaned article text (not just the search-result snippet). Automatically turned on when AI enrichment is enabled, since enrichment quality depends on having the full text.",
            "default": false
          },
          "aiEnabled": {
            "title": "Enable AI enrichment",
            "type": "boolean",
            "description": "Run each article through an OpenRouter model to generate the AI outputs selected below.",
            "default": false
          },
          "aiApiKey": {
            "title": "OpenRouter API key",
            "type": "string",
            "description": "Your OpenRouter API key (https://openrouter.ai/keys). Optional: if left empty while AI enrichment is enabled, this Actor's own key is used instead and a small per-article platform fee is charged. Never logged or stored in output."
          },
          "aiModel": {
            "title": "AI model",
            "enum": [
              "openai/gpt-4o-mini",
              "anthropic/claude-3.5-haiku",
              "google/gemini-2.0-flash-001",
              "meta-llama/llama-3.1-8b-instruct",
              "mistralai/mistral-small"
            ],
            "type": "string",
            "description": "OpenRouter model used for AI enrichment.",
            "default": "openai/gpt-4o-mini"
          },
          "aiFeatures": {
            "title": "AI features",
            "type": "array",
            "description": "What the AI should generate for each article.",
            "items": {
              "type": "string",
              "enum": [
                "summarize",
                "paraphrase",
                "keywords",
                "sentiment",
                "custom"
              ],
              "enumTitles": [
                "Summary",
                "Paraphrase",
                "Keywords",
                "Sentiment",
                "Custom instruction"
              ]
            },
            "default": [
              "summarize"
            ]
          },
          "aiCustomInstructions": {
            "title": "Custom AI instructions",
            "type": "string",
            "description": "Extra instructions for the AI, used when 'Custom instruction' is selected above (e.g. 'Extract any stock tickers mentioned')."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Google News and most publisher sites don't require a proxy. Enable one only if you see blocked requests.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}