{
  "openapi": "3.0.1",
  "info": {
    "title": "Social Blade Scraper — YouTube, TikTok, Instagram, Twitch Stats",
    "description": "Scrape Social Blade stats for YouTube, TikTok, Instagram and Twitch creators: subscribers or followers, views, uploads, engagement, SB grade and ranks, about a month of daily history, and 1-365 day growth deltas. One row per creator, no login or API key needed.",
    "version": "0.1",
    "x-build-id": "KGhRqjf1bUZsVM1ky"
  },
  "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"
          },
          "mode": {
            "title": "Mode (which data layers to fetch)",
            "enum": [
              "profile",
              "history",
              "growth",
              "profile-history",
              "profile-growth",
              "all",
              "search",
              "user"
            ],
            "type": "string",
            "description": "Which data layers to fetch. Each layer is charged separately, so pick just the layers you need — the current per-event prices are on the Actor store page and in the run's cost estimate. 'History only' and 'Growth only' accept a platform ID and also accept a handle or profile URL, which the Actor resolves for you at no extra charge. Empty queries and failed lookups are never charged. Leave it empty to keep the deprecated resultType/includeHistory/includeGrowth behaviour (which bundles all three layers) - that is what existing saved tasks do. Platform limits, verified 2026-10-06: Instagram only serves the profile layer — Social Blade's API answers 401 for Instagram history and growth, so those modes stop with a message and charge nothing. YouTube, TikTok and Twitch serve all three."
          },
          "queries": {
            "title": "Handles, IDs or profile URLs",
            "type": "array",
            "description": "One entry per account to scrape. Accepts a handle/username (`mrbeast`), a platform ID (`UCX6OQ3DkcsbYNE6H8uQQuVA`), a profile URL on youtube.com, tiktok.com, instagram.com or twitch.tv — subdomains included, so `m.youtube.com/@MrBeast` works — or a Social Blade account URL. The account is read from the start of the path, so `tiktok.com/@khaby.lame/video/7123…` resolves to the account. A URL that identifies the platform overrides the `platform` field, so you can mix platforms in one run. In `search` mode these are search terms instead. ⚠️ Refused with an explanatory row and no charge: share links (`youtu.be/…`, `vm.tiktok.com/…`), video/post/listing pages (`youtube.com/watch?v=…`, `instagram.com/p/…`, `twitch.tv/videos/…`) and any other host — nothing is guessed from an unrecognised URL. `user` mode needs a platform ID on YouTube and accepts a handle on TikTok/Instagram/Twitch; `history` and `growth` resolve a handle or URL for you at no extra charge. **The prefilled examples are written for the default `profile` mode** (they also work in `search`): of them only the YouTube one is an ID, so in `user` mode on YouTube replace it with a UC… channel 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. Accepts a handle on TikTok, Instagram and Twitch; on YouTube it needs a `UC…` channel 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⚠️ `history` and `growth` need a resolved platform ID (e.g. `UCX6OQ3DkcsbYNE6H8uQQuVA` for YouTube, a numeric id elsewhere), not a handle. For history/growth from a handle, use `profile`. DEPRECATED - use `mode` instead. Honoured only when `mode` is left empty, so existing saved tasks keep their current behaviour.",
            "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. DEPRECATED - use `mode` (e.g. 'profile-history' or 'all'). Honoured only when `mode` is left empty. Note this defaulted to true, which is why a plain profile run used to charge all three layers.",
            "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. DEPRECATED - use `mode` (e.g. 'profile-growth' or 'all'). Honoured only when `mode` is left empty.",
            "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. Social Blade serves only about 31 days to anonymous callers — measured 2026-10-21 on YouTube, TikTok and Twitch — so any larger value returns about 31 rows and the run reports it in the status message. Growth deltas are unaffected: those windows run up to 365 days.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}