{
  "openapi": "3.0.1",
  "info": {
    "title": "Wikipedia Pageviews Trend Radar (GDELT News Bonus)",
    "description": "Is a topic rising or falling? Daily Wikipedia pageviews per topic with 7 and 30 day change, peak day and a rising or falling flag. Optional GDELT news volume as a best-effort bonus (the free GDELT service is often busy). Open data, no Google. Also lists the most read Wikipedia articles of a day.",
    "version": "1.0",
    "x-build-id": "FrPiWngKKjqC1bROg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/atesen-software~trend-radar-wikipedia-gdelt/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-atesen-software-trend-radar-wikipedia-gdelt",
        "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/atesen-software~trend-radar-wikipedia-gdelt/runs": {
      "post": {
        "operationId": "runs-sync-atesen-software-trend-radar-wikipedia-gdelt",
        "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/atesen-software~trend-radar-wikipedia-gdelt/run-sync": {
      "post": {
        "operationId": "run-sync-atesen-software-trend-radar-wikipedia-gdelt",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "series",
              "top"
            ],
            "type": "string",
            "description": "Topic series: one row per topic with daily Wikipedia page views and GDELT news volume, the 7 and 30 day change and a rising or falling flag. Top articles: the most read Wikipedia articles of one day for a language or a country.",
            "default": "series"
          },
          "topics": {
            "title": "Topics (Wikipedia articles)",
            "type": "array",
            "description": "One Wikipedia article per line, written as language code, colon, article title: en:ChatGPT, de:Künstliche Intelligenz, tr:Yapay zekâ. A line without a language code uses the default language. A Wikipedia article URL also works. To control the news search, add a bar and a GDELT query: en:Bitcoin|bitcoin OR \"BTC price\". Used in mode Topic series.",
            "items": {
              "type": "string"
            }
          },
          "defaultLanguage": {
            "title": "Default language",
            "type": "string",
            "description": "Wikipedia language code for topics written without one, for example en, de, tr, fr, es, pt, ja.",
            "default": "en"
          },
          "days": {
            "title": "Days",
            "minimum": 7,
            "maximum": 365,
            "type": "integer",
            "description": "How many days of daily data to return, ending yesterday (UTC). Between 7 and 365. Ignored when a start date is given. The 7 and 30 day changes also use the 60 days before this period; those days are read but not returned.",
            "default": 30
          },
          "startDate": {
            "title": "Start date (optional)",
            "type": "string",
            "description": "First day of the period, written 2026-10-01. Leave empty to use the number of days above."
          },
          "endDate": {
            "title": "End date (optional)",
            "type": "string",
            "description": "Last day of the period, written 2026-11-05. Leave empty for yesterday, or the newest day Wikimedia has published."
          },
          "sources": {
            "title": "Data sources",
            "type": "array",
            "description": "Wikipedia page views measure reader interest in the topic and are the core of this Actor. GDELT news volume is an optional bonus: GDELT is a free public service that is often busy (HTTP 429) or has gaps, and it covers about the last 3 months only. A row is charged only when every source you pick answered for that topic, so a busy GDELT makes rows partial and free; leave GDELT off for a guaranteed complete result.",
            "items": {
              "type": "string",
              "enum": [
                "wikipedia",
                "gdelt"
              ],
              "enumTitles": [
                "Wikipedia page views",
                "GDELT news volume"
              ]
            },
            "default": [
              "wikipedia"
            ]
          },
          "gdeltMaxTopics": {
            "title": "Topics that get news data",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "Only used when GDELT is one of the data sources. GDELT allows one request every 5 seconds, so news data is added for the first N topics of your list only (each one adds at least 5 seconds to the run, twice that with tone). The other topics get Wikipedia data only. 0 turns news data off.",
            "default": 10
          },
          "gdeltIncludeTone": {
            "title": "Add news tone",
            "type": "boolean",
            "description": "Also read the average tone of the news coverage per day (negative to positive, usually between -10 and +10). Needs a second GDELT request per topic.",
            "default": false
          },
          "gdeltRetries": {
            "title": "GDELT retries after a rate limit",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "Only used when GDELT is one of the data sources. GDELT often answers HTTP 429 (too many requests) when it is busy. After a 429 the Actor waits 30 seconds and tries that request again, up to this many times (default 2); if GDELT still refuses, it stops asking GDELT for the rest of the run and the affected rows are partial and free. With 0 it gives up at the first 429. Each retry adds 30 seconds to the run.",
            "default": 2
          },
          "compare": {
            "title": "Compare topics",
            "type": "boolean",
            "description": "Add a compare object to every row: rank by views, rank by 7 day change, rank by news volume and the share of all compared views. Rows are delivered at the end of the run instead of one by one.",
            "default": false
          },
          "includeDailySeries": {
            "title": "Include the daily series",
            "type": "boolean",
            "description": "Add the day-by-day list (series) to every row. Switch off for a light summary with totals, changes and flags only.",
            "default": true
          },
          "trendThresholdPct": {
            "title": "Rising / falling threshold (%)",
            "minimum": 5,
            "maximum": 200,
            "type": "integer",
            "description": "A topic is flagged rising when the last 7 days are at least this many percent above the 7 days before, falling when at least this much below, stable in between. Topics with very little traffic in the earlier week get insufficient-data instead of a flag.",
            "default": 20
          },
          "topLanguage": {
            "title": "Language edition",
            "type": "string",
            "description": "Mode Top articles: Wikipedia language code (en, de, tr, fr ...). With a country you can also type all to include every language edition.",
            "default": "en"
          },
          "topCountry": {
            "title": "Country (optional)",
            "type": "string",
            "description": "Two-letter country code such as US, DE or TR to list what readers in that country read. Wikimedia publishes country data a few days later than language data and rounds the views up, so choose a date a few days back."
          },
          "topDate": {
            "title": "Date (optional)",
            "type": "string",
            "description": "Day of the list, written 2026-11-05. Leave empty for yesterday (UTC)."
          },
          "topLimit": {
            "title": "Number of articles",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many articles to return, at most 1000. Every returned article is one result.",
            "default": 50
          },
          "topExcludeSpecialPages": {
            "title": "Skip the main page and special pages",
            "type": "boolean",
            "description": "Leave out the Main Page, search and other non-article pages (Special:, Wikipedia:, Portal:, Help:, File:, Category: ...). The main page of some language editions has a local name and may still appear.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}