{
  "openapi": "3.0.1",
  "info": {
    "title": "X Brand Pulse: Themes, Spikes, Share of Voice",
    "description": "Turns X (Twitter) posts about your brand into a weekly pulse: themes, sentiment trend, spikes, share of voice vs competitors, top questions, 5 actions.",
    "version": "0.2",
    "x-build-id": "ClA7gbpOPXOcSdM0e"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/seasons-ai~tweets-to-brand-pulse/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-seasons-ai-tweets-to-brand-pulse",
        "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/seasons-ai~tweets-to-brand-pulse/runs": {
      "post": {
        "operationId": "runs-sync-seasons-ai-tweets-to-brand-pulse",
        "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/seasons-ai~tweets-to-brand-pulse/run-sync": {
      "post": {
        "operationId": "run-sync-seasons-ai-tweets-to-brand-pulse",
        "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": {
          "datasetId": {
            "title": "Posts dataset",
            "type": "string",
            "description": "Pick the dataset of your Tweet Scraper run (apidojo/tweet-scraper), e.g. a search for your brand, product or topic. Other post datasets work too if each item has the post text (`text` or `fullText`); a date (`createdAt`) and like/repost/reply/view counts make the series and spikes work. When set, `postsUrl` and `items` are ignored. The Actor only reads this dataset."
          },
          "postsUrl": {
            "title": "Posts file URL (JSON or CSV)",
            "type": "string",
            "description": "Instead of a dataset: a public link to a JSON array, JSON Lines or CSV file with one post per row (columns such as text, created at, like count, repost count, reply count, view count, lang, url). Up to 50 MB."
          },
          "items": {
            "title": "Posts as JSON",
            "type": "array",
            "description": "Instead of a dataset or file: paste posts as a JSON array, e.g. [{\"text\": \"...\", \"createdAt\": \"2026-10-28T08:05:00Z\", \"likeCount\": 4, \"url\": \"https://x.com/i/status/123\"}]. Used only when no dataset or file URL is given."
          },
          "brandNames": {
            "title": "Your brand",
            "type": "array",
            "description": "Your brand or product name first, then aliases and official handles, e.g. Notion, Notion AI, @NotionHQ. Used for relevance, share of voice, and to keep these names and handles in the output (other @handles are removed).",
            "items": {
              "type": "string"
            }
          },
          "competitors": {
            "title": "Competitors",
            "type": "array",
            "description": "One competitor per line. Put aliases and handles on the same line separated by |, e.g. Obsidian | @obsdmd. Up to 10.",
            "items": {
              "type": "string"
            }
          },
          "topicContext": {
            "title": "About the search (optional)",
            "type": "string",
            "description": "One sentence that tells the analysis what the posts should be about, e.g. \"Note-taking and productivity apps\". Helps drop coincidental matches (\"notion\" meaning idea). Required when no brand is given. Up to 300 characters."
          },
          "maxPosts": {
            "title": "Max posts to analyse",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap on posts labelled (and charged) in this run, 1 to 5,000. Every post still counts in the volume series for free. Posts are picked day by day, most engaged first.",
            "default": 1000
          },
          "digestDays": {
            "title": "Digest period (days)",
            "minimum": 1,
            "maximum": 31,
            "type": "integer",
            "description": "The digest compares the last N days (ending at the newest post) with the N days before.",
            "default": 7
          },
          "bucket": {
            "title": "Time buckets",
            "enum": [
              "auto",
              "day",
              "hour"
            ],
            "type": "string",
            "description": "Bucket size for the series and spike detection (UTC). Auto = daily, or hourly when the posts cover less than 3 days.",
            "default": "auto"
          },
          "includeRetweets": {
            "title": "Include reposts (retweets)",
            "type": "boolean",
            "description": "Off = plain reposts are skipped (they repeat the original text). Quote posts and replies are always kept.",
            "default": false
          },
          "themeTaxonomy": {
            "title": "Theme names to reuse (optional)",
            "type": "array",
            "description": "Theme names from an earlier run (the `taxonomy` field in summary.json), e.g. Pricing, Sync & Offline, AI Features. Posts are grouped into these names first, so weekly runs compare one to one.",
            "items": {
              "type": "string"
            }
          },
          "allowNewThemes": {
            "title": "Allow new themes",
            "type": "boolean",
            "description": "With theme names given above: allow new themes for topics that fit none of them. Off = leftovers go to Other.",
            "default": true
          },
          "_previewAsFree": {
            "title": "Preview as a free-plan user (owner test)",
            "type": "boolean",
            "description": "Owner-only test switch: return the free-plan preview instead of running. Ignored for every other account."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}