{
  "openapi": "3.1.0",
  "info": {
    "title": "Social Media Scraper API",
    "version": "2026-11-23.2",
    "description": "197 customer operations; four upstream account operations are internal only. Send authenticated requests with the documented inputs and published price version."
  },
  "servers": [
    {
      "url": "https://socialmediascraper.org"
    }
  ],
  "paths": {
    "/v1/tiktok/post": {
      "get": {
        "operationId": "tiktok_post",
        "summary": "TikTok Video Details API",
        "tags": [
          "tiktok"
        ],
        "description": "Resolve a TikTok video URL into its caption, author, media metadata and engagement fields.",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Public tiktok content or profile URL to retrieve. Paste the complete URL, including https://.",
            "example": "https://www.tiktok.com/@randomspamvideos25/video/7251387037834595630"
          },
          {
            "name": "region",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Country or region filter for the selected operation. Use the codes accepted below.",
            "example": "US"
          },
          {
            "name": "get_transcript",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Include transcript retrieval in this content request."
          },
          {
            "name": "trim",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Request the supplier’s trimmed response representation."
          },
          {
            "name": "download_media",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Request media download information with the content result."
          },
          {
            "name": "cache_max_age",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "1d",
                "3d",
                "7d",
                "14d",
                "30d"
              ]
            },
            "description": "Maximum accepted age of a cached result. The allowed values below express days.",
            "example": "7d"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          },
          {
            "name": "x-price-version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Pin the expected request-price version before billing."
          }
        ],
        "security": [
          {
            "ApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "JSON response containing request identity, normalized operation data and metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                },
                "example": {
                  "request_id": "example-request-id",
                  "data": {
                    "platform": "tiktok",
                    "resource": "post",
                    "id": "123456789",
                    "url": "https://example.com/public-content",
                    "title": null,
                    "caption": "Example caption",
                    "published_at": null,
                    "author": {
                      "id": "123456789",
                      "handle": null,
                      "display_name": null,
                      "verified": null
                    },
                    "media": {
                      "thumbnail_url": null,
                      "duration_ms": null,
                      "is_video": true
                    },
                    "metrics": {
                      "views": null,
                      "likes": null,
                      "comments": null,
                      "shares": null,
                      "saves": null
                    }
                  },
                  "meta": {
                    "platform": "tiktok",
                    "fetched_at": "2026-11-28T00:00:00.000Z",
                    "cached": false,
                    "schema_version": "2026-11-23.2",
                    "route_version": 1,
                    "billing": {
                      "capability": "tiktok.post",
                      "version": "2026-11-23.retail-1",
                      "currency": "USD",
                      "unit_scale": 1000000000,
                      "amount_units": 24440000,
                      "amount_usd": "0.024440000",
                      "billing_basis": "request"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Invalid API key"
          },
          "402": {
            "description": "Insufficient credits"
          },
          "429": {
            "description": "Customer request rate or concurrency limit. Follow Retry-After and retain the original request identity."
          },
          "503": {
            "description": "Service temporarily unavailable"
          }
        },
        "x-live-status": "verified",
        "x-response-kind": "post",
        "x-price": {
          "capability": "tiktok.post",
          "version": "2026-11-23.retail-1",
          "currency": "USD",
          "unit_scale": 1000000000,
          "amount_units": 24440000,
          "amount_usd": "0.024440000",
          "billing_basis": "request"
        },
        "x-pagination-fields": [],
        "x-required-any-of": [],
        "x-input-rules": [],
        "x-documentation-url": "https://socialmediascraper.org/apis/tiktok/post/",
        "x-markdown-url": "https://socialmediascraper.org/api-reference/tiktok.post.md"
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      }
    }
  }
}
