{
  "openapi": "3.0.1",
  "info": {
    "title": "🔎 X (Twitter) Brand Mention & Keyword Monitor",
    "description": "Monitor X (Twitter) brand mentions, handles, hashtags, phrases, and keywords from a signed-in session. Export strict visible matches or only new deduplicated events through a persistent checkpoint. Requires ct0 and auth_token cookies; no paid X API.",
    "version": "0.1",
    "x-build-id": "hga5uTNlaQk0eha30"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kazkn~x-mentions-delta-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kazkn-x-mentions-delta-monitor",
        "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/kazkn~x-mentions-delta-monitor/runs": {
      "post": {
        "operationId": "runs-sync-kazkn-x-mentions-delta-monitor",
        "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/kazkn~x-mentions-delta-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-kazkn-x-mentions-delta-monitor",
        "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": [
          "preset",
          "queries",
          "monitorId",
          "maxResults"
        ],
        "properties": {
          "preset": {
            "title": "🎯 Monitoring result",
            "enum": [
              "snapshot",
              "delta"
            ],
            "type": "string",
            "description": "Recent snapshot returns up to your result limit without draining the full backlog. New mentions only emits records not seen by earlier successful runs.",
            "default": "delta"
          },
          "queries": {
            "title": "🔎 Brands or searches",
            "minItems": 1,
            "maxItems": 25,
            "uniqueItems": true,
            "type": "array",
            "description": "Add 1–25 X handles, brand names, hashtags, phrases, or advanced X search queries. Use one simple search per row for the clearest strict-match evidence. Example: @YourBrand.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "default": [
              "@YourBrand"
            ]
          },
          "matchMode": {
            "title": "✅ Match precision",
            "enum": [
              "strict",
              "x_search"
            ],
            "type": "string",
            "description": "Strict visible match keeps only posts where every positive search term is visible in the post, quoted post, repost, or queried author. X search semantics preserves advanced X matching and labels results whose matching context is not visible.",
            "default": "strict"
          },
          "xSessionCookies": {
            "title": "🔐 X session cookies",
            "type": "string",
            "description": "Required for live runs. Paste exactly one line: ct0=PASTE_CT0_VALUE; auth_token=PASTE_AUTH_TOKEN_VALUE. Copy only the Value cells from your signed-in browser's x.com cookie table—no JSON, Cookie: prefix, quotes, attributes, password, API key, or line breaks. Use a dedicated secondary account because sessions can expire or be restricted."
          },
          "monitorId": {
            "title": "🗂 Monitor name",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9 _-]{0,63}$",
            "minLength": 1,
            "maxLength": 64,
            "type": "string",
            "description": "Runs with the same monitor name share one persistent checkpoint. Use a different name for an independent feed.",
            "default": "default"
          },
          "maxResults": {
            "title": "📦 Maximum mentions",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum normalized mention records across all searches in this run.",
            "default": 100
          },
          "lookbackValue": {
            "title": "🕒 First-run lookback",
            "minimum": 1,
            "maximum": 168,
            "type": "integer",
            "description": "How far back the first run or recent snapshot searches. Use up to 168 hours or 7 days.",
            "default": 7
          },
          "lookbackUnit": {
            "title": "⏱ Lookback unit",
            "enum": [
              "hours",
              "days"
            ],
            "type": "string",
            "description": "Choose hours for short monitoring windows or days for easier multi-day searches.",
            "default": "days"
          },
          "lookbackHours": {
            "title": "Legacy lookback in hours",
            "minimum": 1,
            "maximum": 168,
            "type": "integer",
            "description": "Hidden compatibility field for saved inputs created before lookback units were available."
          },
          "sourceMode": {
            "title": "Private source mode",
            "type": "string",
            "description": "Internal private-build canary switch. Live is mandatory for user runs.",
            "default": "live"
          },
          "fixtureScenario": {
            "title": "Private fixture scenario",
            "type": "string",
            "description": "Internal deterministic scenario for zero-spend private canaries.",
            "default": "baseline"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}