{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/vidcrawl-com/json-schema/vidcrawl-com-scrape-response-schema.json",
  "title": "ScrapeResponse",
  "x-generated": "2026-12-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/vidcrawl-com-openapi.json#/components/schemas/ScrapeResponse",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "scrape_id": {
      "type": "string"
    },
    "platform": {
      "type": "string",
      "enum": [
        "youtube",
        "tiktok",
        "instagram",
        "x",
        "unknown"
      ]
    },
    "video_id": {
      "type": "string"
    },
    "canonical_url": {
      "type": "string"
    },
    "metadata": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string"
        },
        "author": {
          "type": "string"
        },
        "channel_id": {
          "type": "string"
        },
        "duration_sec": {
          "type": "number"
        },
        "views": {
          "type": "number"
        },
        "likes": {
          "type": "number"
        },
        "published_at": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "description_links": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "thumbnail_url": {
          "type": "string"
        },
        "chapters": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "title": {
                "type": "string"
              },
              "start_sec": {
                "type": "number"
              },
              "timestamp": {
                "type": "string"
              }
            },
            "required": [
              "title",
              "start_sec",
              "timestamp"
            ]
          },
          "default": []
        }
      },
      "required": [
        "title",
        "author",
        "duration_sec"
      ]
    },
    "transcript": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string",
          "enum": [
            "native_manual",
            "native_auto",
            "ai_asr",
            "caption_text",
            "none"
          ]
        },
        "language": {
          "type": "string"
        },
        "full_text": {
          "type": "string"
        },
        "segments": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "start_sec": {
                "type": "number"
              },
              "end_sec": {
                "type": "number"
              },
              "duration_sec": {
                "type": "number"
              },
              "timestamp": {
                "type": "string"
              },
              "text": {
                "type": "string"
              }
            },
            "required": [
              "start_sec",
              "end_sec",
              "duration_sec",
              "timestamp",
              "text"
            ]
          }
        },
        "truncated": {
          "type": "boolean"
        },
        "covered_sec": {
          "type": "number"
        }
      },
      "required": [
        "source",
        "language",
        "full_text",
        "segments"
      ]
    },
    "storyboard": {
      "type": "object",
      "properties": {
        "strategy": {
          "type": "string",
          "enum": [
            "youtube_storyboard",
            "ffmpeg_contact_sheet",
            "thumbnail",
            "none"
          ]
        },
        "interval_sec": {
          "type": "number"
        },
        "total_tiles": {
          "type": "number"
        },
        "sheets": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "sheet_index": {
                "type": "number"
              },
              "url": {
                "type": "string"
              },
              "local_path": {
                "type": "string"
              },
              "width": {
                "type": "number"
              },
              "height": {
                "type": "number"
              },
              "cols": {
                "type": "number"
              },
              "rows": {
                "type": "number"
              },
              "tile_width": {
                "type": "number"
              },
              "tile_height": {
                "type": "number"
              },
              "tiles": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "index": {
                      "type": "number"
                    },
                    "timestamp_sec": {
                      "type": "number"
                    },
                    "timestamp": {
                      "type": "string"
                    },
                    "row": {
                      "type": "number"
                    },
                    "col": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "index",
                    "timestamp_sec",
                    "timestamp",
                    "row",
                    "col"
                  ]
                }
              }
            },
            "required": [
              "sheet_index",
              "url",
              "width",
              "height",
              "cols",
              "rows",
              "tile_width",
              "tile_height",
              "tiles"
            ]
          }
        }
      },
      "required": [
        "strategy",
        "interval_sec",
        "total_tiles",
        "sheets"
      ]
    },
    "markdown": {
      "type": "string"
    },
    "metrics": {
      "type": "object",
      "properties": {
        "latency_ms": {
          "type": "number"
        },
        "network_bytes": {
          "type": "number"
        },
        "proxy_bytes": {
          "type": "number"
        },
        "credits_used": {
          "type": "number"
        },
        "estimated_cost_usd": {
          "type": "number"
        }
      },
      "required": [
        "latency_ms",
        "network_bytes",
        "credits_used",
        "estimated_cost_usd"
      ]
    }
  },
  "required": [
    "ok",
    "platform",
    "video_id",
    "canonical_url",
    "metadata",
    "transcript",
    "storyboard",
    "markdown",
    "metrics"
  ]
}