{
  "openapi": "3.0.1",
  "info": {
    "title": "X (Twitter) Account Monitor — Posts & Engagement",
    "description": "Watch a list of X accounts: each one's newest posts with likes, reposts, replies and quotes, the engagement per 1,000 followers, and the account's own row (followers, posts per day, age). Only-new mode pays for what appeared since the last run. No login, no API key.",
    "version": "0.1",
    "x-build-id": "6P9q4A76RGgeqyHRn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/foxlabs~x-account-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-foxlabs-x-account-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/foxlabs~x-account-monitor/runs": {
      "post": {
        "operationId": "runs-sync-foxlabs-x-account-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/foxlabs~x-account-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-foxlabs-x-account-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": [
          "accounts"
        ],
        "properties": {
          "accounts": {
            "title": "X accounts to watch",
            "type": "array",
            "description": "One account per line: a handle (@nasa), a profile address (x.com/nasa) or the account's numeric id (11348282). A numeric id is the cheapest to read; a handle is looked up once and then remembered as its id.",
            "default": [
              "@NASA"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxPostsPerAccount": {
            "title": "Posts per account",
            "minimum": 1,
            "maximum": 110,
            "type": "integer",
            "description": "How many of each account's newest posts to deliver. X's embed backend hands out one page per account — between 23 and 105 posts, depending on the account — and there is no way to page further back, so a higher number simply takes everything that page holds.",
            "default": 25
          },
          "includeProfileRow": {
            "title": "Also deliver each account's own row",
            "type": "boolean",
            "description": "One extra row per account with its name, bio, location, website, followers, following, posts, listed count, verification, account age, posts per day and followers-to-following ratio.",
            "default": true
          },
          "onlyNewPosts": {
            "title": "Only posts new since the last run",
            "type": "boolean",
            "description": "Keeps a list of the posts already delivered, so a watchlist that runs every hour pays only for what appeared since last time. The list lives in a key-value store of your account and is not shared with anyone.",
            "default": false
          },
          "listName": {
            "title": "List name",
            "type": "string",
            "description": "Which list \"only new posts\" uses. Separate lists for separate watchlists; runs of the same list wait for each other.",
            "default": "default"
          },
          "skipReplies": {
            "title": "Leave out replies",
            "type": "boolean",
            "description": "Skips posts that start with a mention (a reply in someone else's thread), so only the account's own posts are delivered.",
            "default": false
          },
          "postedWithinDays": {
            "title": "Only posts from the last N days",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "0 means no time limit. A post older than this is not delivered and not charged.",
            "default": 0
          },
          "minEngagement": {
            "title": "Minimum engagement",
            "minimum": 0,
            "type": "integer",
            "description": "Likes + reposts + replies + quotes. A post under this is not delivered and not charged — useful for watching only what actually travelled.",
            "default": 0
          },
          "maxPosts": {
            "title": "Maximum posts in the whole run",
            "minimum": 0,
            "type": "integer",
            "description": "A cost cap across all accounts. 0 means only the per-account limit applies.",
            "default": 0
          },
          "concurrency": {
            "title": "Accounts read at the same time",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many accounts are read side by side. Higher is faster; lower is gentler on the source.",
            "default": 8
          },
          "rememberAccountIds": {
            "title": "Remember handles as numeric ids",
            "type": "boolean",
            "description": "After an account named by handle has been read once, its numeric id is kept in a key-value store of your account, and later runs read it the cheap way. Turn off to look every handle up again.",
            "default": true
          },
          "accountIdStore": {
            "title": "Store for the remembered ids",
            "type": "string",
            "description": "Name of the key-value store that holds the handle → id pairs.",
            "default": "x-account-ids"
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Left as it is, the Actor uses Apify Proxy datacenter addresses, which X's embed backend answers for everything read by numeric id. Accounts named by handle are looked up through residential addresses, because a handle lookup from a datacenter address is rate-limited.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}