{
  "openapi": "3.0.1",
  "info": {
    "title": "Twitter X Reply Scraper — Conversation Engagement Analytics",
    "description": "🐦 Twitter X Reply Scraper collects tweet replies at scale—usernames, timestamps, text, likes—from public threads. 🔎 Ideal for social listening, brand monitoring, competitor analysis & research. 📊 Export CSV/JSON and integrate via API for sentiment, reporting & dashboards. 🚀",
    "version": "0.1",
    "x-build-id": "S3bgDEKeyIeykadZg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapier~twitter-x-reply-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapier-twitter-x-reply-scraper",
        "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/scrapier~twitter-x-reply-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapier-twitter-x-reply-scraper",
        "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/scrapier~twitter-x-reply-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapier-twitter-x-reply-scraper",
        "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": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "🔗 Start URLs — where to look on X",
            "type": "array",
            "description": "📋 Add one or more X search page links (the same URLs you get when you search on x.com). Each link defines what topic or keywords you want to follow. Add as many as you need to track several conversations in one run. Example: https://x.com/search?q=%23journorequest+min_replies%3A10&src=typed_query&f=live",
            "items": {
              "type": "string"
            }
          },
          "maxSearchResults": {
            "title": "📊 Maximum posts to collect",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "🎯 How many posts to collect from each search link. Higher numbers give a broader snapshot; lower numbers finish faster. Example: 10 → up to 10 posts per link. Default is 10.",
            "default": 10
          },
          "maxReplies": {
            "title": "💬 Maximum replies per post",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "🧵 For each post, how many replies to capture. The engagement report and top-replies ranking are computed over exactly these captured replies. Example: maxReplies=25 → the report summarises up to 25 replies per post. Default is 5.",
            "default": 5
          },
          "engagementAnalytics": {
            "title": "📈 Build per-post engagement report",
            "type": "boolean",
            "description": "📊 When on, each post gets an engagementReport object summarising its captured replies: replies captured, reply-rate vs the post's reported reply count, unique repliers, verified-replier share, and sum / average / median / top reply likes. Pure local statistics — no extra requests, no AI. Default is true.",
            "default": true
          },
          "topRepliesLimit": {
            "title": "🏆 Top replies to highlight (by likes)",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "🏆 Add a topReplies list to each post containing its most-liked captured replies, ranked by like count (highest first). Example: 3 → the three most-liked replies. Set to 0 to skip highlights. Default is 3.",
            "default": 3
          },
          "authToken": {
            "title": "🔐 Session — auth token",
            "type": "string",
            "description": "🔑 Your X account session token (or set the AUTH_TOKEN environment variable in Apify). This lets the actor read replies using your logged-in session. Keep it private."
          },
          "ct0": {
            "title": "🛡️ Session — security (ct0)",
            "type": "string",
            "description": "🔒 The companion security value (csrf) for your X session (or use the CT0 env var). It works together with your auth token. Keep it private."
          },
          "proxyConfiguration": {
            "title": "🌐 Connection & privacy (proxy)",
            "type": "object",
            "description": "🌍 Optional Apify Proxy settings for smoother cloud runs. Off by default; enable to route traffic through Apify's network."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}