{
  "openapi": "3.0.1",
  "info": {
    "title": "Social Blade Scraper — YouTube, TikTok, Instagram, Twitch Stats",
    "description": "Scrape Social Blade statistics, daily history and growth projections for YouTube, TikTok, Instagram and Twitch. No login required, proxy rotation built in.",
    "version": "0.1",
    "x-build-id": "wKxbB71G9RMk7NbxC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rl1987~social-blade-lookup/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rl1987-social-blade-lookup",
        "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/rl1987~social-blade-lookup/runs": {
      "post": {
        "operationId": "runs-sync-rl1987-social-blade-lookup",
        "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/rl1987~social-blade-lookup/run-sync": {
      "post": {
        "operationId": "run-sync-rl1987-social-blade-lookup",
        "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": [
          "platform",
          "queries"
        ],
        "properties": {
          "platform": {
            "title": "Platform",
            "enum": [
              "youtube",
              "tiktok",
              "instagram",
              "twitch"
            ],
            "type": "string",
            "description": "The social platform to look up. Note: Social Blade removed Twitter/X data.",
            "default": "youtube"
          },
          "queries": {
            "title": "Handles, IDs or profile URLs",
            "type": "array",
            "description": "One entry per account to scrape. For `profile` and `search` result types, accepts a handle/username (`mrbeast`), a platform ID (`UCX6OQ3DkcsbYNE6H8uQQuVA`), a platform profile URL (`https://youtube.com/@PewDiePie`, `https://tiktok.com/@khaby.lame`), or a Social Blade URL (`https://socialblade.com/youtube/handle/ninja`); when a URL identifies the platform it overrides the `platform` field, so you can mix platforms in one run. ⚠️ The `user`, `history` and `growth` result types require a resolved platform ID (not a handle/URL) — to get history/growth from a handle, use `profile` instead, or run `search` first to find the `id`.",
            "items": {
              "type": "string"
            }
          },
          "resultType": {
            "title": "Result type",
            "enum": [
              "profile",
              "search",
              "user",
              "history",
              "growth"
            ],
            "type": "string",
            "description": "What to fetch for each query:\n- **profile** — resolve the handle, then fetch profile + daily history + growth in one batched call (recommended; accepts handle/ID/URL).\n- **search** — return matching accounts for the term (accepts a search term).\n- **user** — profile/summary stats only. Requires a platform ID.\n- **history** — daily historical data points only. Requires a platform ID.\n- **growth** — multi-window growth deltas only. Requires a platform ID.\n\n⚠️ `user`, `history` and `growth` need a resolved platform ID (e.g. `UCX6OQ3DkcsbYNE6H8uQQuVA`), not a handle. For history/growth from a handle, use `profile`.",
            "default": "profile"
          },
          "includeHistory": {
            "title": "Include history (profile mode)",
            "type": "boolean",
            "description": "In `profile` result type, include the daily history section. Turn off to make a smaller, faster request when you only need the profile summary. Ignored for other result types.",
            "default": true
          },
          "includeGrowth": {
            "title": "Include growth (profile mode)",
            "type": "boolean",
            "description": "In `profile` result type, include the multi-window growth section. Turn off to make a smaller, faster request. Ignored for other result types.",
            "default": true
          },
          "historyLimit": {
            "title": "History limit (days)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Number of daily data points to fetch for `history` and `profile` result types.",
            "default": 30
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of queries processed in parallel. Lower this if you hit Cloudflare challenges.",
            "default": 5
          },
          "maxRetries": {
            "title": "Max retries per request",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many times to retry a request (rotating proxy IP) when Cloudflare returns a challenge page instead of JSON.",
            "default": 6
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. Residential Apify Proxy is the default and strongly recommended — Social Blade is behind Cloudflare, and datacenter IPs get hard-blocked under load while residential IPs reliably succeed.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}