{
  "openapi": "3.0.1",
  "info": {
    "title": "Cross-Platform Trends",
    "description": "See what's trending on Google right now and whether the same topic is also spiking on Wikipedia, Bluesky and YouTube, with real view and post counts.",
    "version": "0.1",
    "x-build-id": "umYcEd0a77jgmBl68"
  },
  "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 (a full scan: with Minimum platforms set to 1 that's hundreds of trends per run). Used for Google trends, the matching Wikipedia language edition and the YouTube chart.",
            "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, from Google Cloud Console. Adds matching videos from each country's 'most popular' chart. Uses 1 unit of the 10,000 free daily units per country per run. Without a key, YouTube is skipped."
          },
          "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. Set to 1 to get every trend from every platform (many more rows, each charged). Lowered automatically if you pick fewer sources.",
            "default": 2
          },
          "onlyNew": {
            "title": "Only new topics",
            "type": "boolean",
            "description": "Save only topics not seen in earlier runs. Good for scheduled alerts.",
            "default": false
          },
          "maxItems": {
            "title": "Max topics",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many topics (highest platform count first). Leave empty for all."
          },
          "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}