{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends + Wikipedia, Bluesky & YouTube Trending Topics",
    "description": "Google Trends trending searches confirmed on Wikipedia, Bluesky and YouTube: search volume, view spikes, post and video counts, Polymarket odds. 60 countries, no login. From $0.003 per confirmed topic.",
    "version": "0.1",
    "x-build-id": "PF466dWESjVik2QhA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/stephen-56~cross-platform-trends/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-stephen-56-cross-platform-trends",
        "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/stephen-56~cross-platform-trends/runs": {
      "post": {
        "operationId": "runs-sync-stephen-56-cross-platform-trends",
        "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/stephen-56~cross-platform-trends/run-sync": {
      "post": {
        "operationId": "run-sync-stephen-56-cross-platform-trends",
        "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": [
          "countries"
        ],
        "properties": {
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Two-letter country codes, e.g. US, GB, DE, BR, or ALL for ~60 countries. Used for Google trends, the matching Wikipedia language edition and the YouTube chart. ALL with Minimum platforms 1 is a full scan of hundreds of trends: set Max topics to cap the cost.",
            "default": [
              "US"
            ],
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Which platforms to check. Pick any mix, e.g. only Bluesky + Wikipedia. All are free; YouTube also needs your API key below. Polymarket doesn't count as a platform: it adds the betting odds and dollars bet to topics that have a big prediction market.",
            "items": {
              "type": "string",
              "enum": [
                "google",
                "wikipedia",
                "bluesky",
                "youtube",
                "polymarket"
              ],
              "enumTitles": [
                "Google Trends",
                "Wikipedia",
                "Bluesky",
                "YouTube (needs key)",
                "Polymarket betting odds (context only)"
              ]
            },
            "default": [
              "google",
              "wikipedia",
              "bluesky",
              "youtube",
              "polymarket"
            ]
          },
          "requiredSources": {
            "title": "Must be trending on",
            "type": "array",
            "description": "Only save topics trending on all of these, e.g. Google, to get Google trends confirmed elsewhere. Leave empty for no requirement.",
            "items": {
              "type": "string",
              "enum": [
                "google",
                "wikipedia",
                "bluesky",
                "youtube",
                "polymarket"
              ],
              "enumTitles": [
                "Google Trends",
                "Wikipedia",
                "Bluesky",
                "YouTube",
                "Polymarket (has a betting market)"
              ]
            },
            "default": []
          },
          "youtubeApiKey": {
            "title": "YouTube API key",
            "type": "string",
            "description": "Your own free YouTube Data API v3 key (Google Cloud Console > APIs & Services > enable YouTube Data API v3 > Credentials > Create API key). Stored encrypted. Without a valid key, YouTube is skipped and fewer topics qualify."
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Only save topics mentioning at least one of these, e.g. a brand, team or person ('Nike', 'Taylor Swift'). The topic, headline, Wikipedia article and matched video titles are searched. Leave empty for all topics.",
            "items": {
              "type": "string"
            }
          },
          "includeNonGoogleTrends": {
            "title": "Add trends Google doesn't show",
            "type": "boolean",
            "description": "Also save topics trending on Bluesky or spiking on Wikipedia that aren't in your countries' Google lists (country 'GLOBAL'). These are also checked against the Google lists of all major English-speaking countries. Always on when Google isn't a source.",
            "default": true
          },
          "minPlatforms": {
            "title": "Minimum platforms",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "Only save topics trending on at least this many platforms. 2 (the default) keeps confirmed, cross-platform trends only ($0.003 each). Set to 1 to also get single-platform trends: about 7x more rows for one country and far more on a full scan, each billed at the lower single-platform price ($0.001). Lowered automatically if you pick fewer sources.",
            "default": 2
          },
          "onlyNew": {
            "title": "Only new topics",
            "type": "boolean",
            "description": "Save, and pay for, only topics not seen in earlier runs. Recommended for scheduled alerts, so you don't pay again for the same topics every run.",
            "default": false
          },
          "maxItems": {
            "title": "Max topics",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many topics (most platforms first). This also caps the cost: with the default 50, a run costs at most $0.15. For a full scan, raise it (e.g. 2000).",
            "default": 50
          },
          "historyName": {
            "title": "History name",
            "type": "string",
            "description": "Name of the storage that remembers topics between runs. Use a different name for each schedule that should track separately.",
            "default": "cross-platform-trends-history"
          },
          "forgetAfterDays": {
            "title": "Forget topics after (days)",
            "minimum": 1,
            "type": "integer",
            "description": "Topics not seen for this many days are forgotten, so if they come back they count as new.",
            "default": 7
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}