# GET /v1/videos/by-id/`video_id`

Fetch video information and statistics by the internal `video_id` (UUID).

## 📋 Overview

| Property      | Value                                             |
|--------------|---------------------------------------------------|
| **Method**   | `GET`                                             |
| **Endpoint** | `https://api.influtics.com/v1/videos/by-id/`<code>&#123;video_id&#125;</code> |
| **Auth Required** | ✅ Yes                                      |

## 🔐 Headers

```
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
```

## 📝 Path Parameter

| Parameter     | Type   | Required | Description                |
|---------------|--------|----------|----------------------------|
| `video_id`    | string | ✅ Yes   | The internal video UUID    |

### Example Request

```bash
curl -X GET https://api.influtics.com/v1/videos/by-id/77168374-dd2c-496a-b1ae-3d4944f48ccb \
  -H "Authorization: Bearer your_api_key_here"
```

## ✅ Response

```json
{
    "success": true,
    "data": {
        "data": {
            "video_id": "77168374-dd2c-496a-b1ae-3d4944f48ccb",
            "external_video_id": "7489443966908189959",
            "stats": {
                "likes": {
                    "2025-06-30 08:26:03.730104+00": 56500,
                    "2025-06-31 08:26:03.730104+00": 56501
                },
                "views": {
                    "2025-06-30 08:26:03.730104+00": 1900000,
                    "2025-06-31 08:26:03.730104+00": 2000000
                },
                "reposts": {
                    "2025-06-30 08:26:03.730104+00": 6472,
                    "2025-06-31 08:26:03.730104+00": 6892
                },
                "comments": {
                    "2025-06-30 08:26:03.730104+00": 483,
                    "2025-06-31 08:26:03.730104+00": 526
                }
            },
            "views": 2000000,
            "likes": 56501,
            "comments": 526,
            "reposts": 6892,
            "platform": "tiktok",
            "created_at": "2025-06-30T08:25:29.97727+00:00",
            "title": "Untitled",
            "thumbnail_url": "https://p16-sign-sg.tiktokcdn.com/tos-alisg-p-0037/o4RDXBKwA1AIxAZnveUiiza7EC9fyAWvUgB2Er~tplv-tiktokx-origin.image?dr=10395&x-expires=1751443200&x-signature=ybmzuHGMEQlzlFoGAkOCX8dNvfk%3D&t=4d5b0474&ps=13740610&shp=81f88b70&shcp=43f4a2f9&idc=no1a",
            "cpm": 0,
            "er": 3.339736842105263,
            "stats_last_updated": "2025-06-30T08:26:03.730104+00:00"
        }
    },
    "meta": {
        "request_id": "9f1b7e7e-1c36-49a9-8521-7b9180d8a1a8",
        "processing_time_ms": 437
    }
}
```

### Not Found (404)
```json
{
  "success": false,
  "error": "Video not found"
}
```

## 📊 Response Fields

| Field               | Type     | Description                                 |
|---------------------|----------|---------------------------------------------|
| `video_id`          | string   | Internal video UUID                         |
| `external_video_id` | string   | Platform-specific video ID                  |
| `stats`             | object   | Map of metric to `{timestamp: value}` objects |
| `platform`          | string   | Platform name (e.g., tiktok, youtube)       |
| `created_at`        | string   | When the video was created (ISO 8601)       |
| `title`             | string   | Video title/caption                         |
| `thumbnail_url`     | string   | Video thumbnail URL                         |
| `cpm`               | number   | Cost per mille (if available)               |
| `payouts`           | number?  | Estimated creator payout. Capped at `budget`. See [Payouts](./payouts) |
| `er`                | number   | Engagement rate (if available)              |
| `stats_last_updated`| string   | When stats were last updated (ISO 8601)     |
| `views`             | int?     | Last views                                  |
| `likes`             | int?     | Last likes                                  |
| `comments`          | int?     | Last comments                               |
| `reposts`           | int?     | Last reposts                                |
| `deleted_at`        | string?  | When the video was detected as deleted (ISO 8601). `null` while healthy. Read-only. |
| `deleted_reason`    | object?  | Why the video was detected as deleted — `{ code, message, raw }`, or `null` if no reason was recorded. Read-only. Only TikTok and VK currently report a reason. |
| `meta.request_id`   | string   | Unique request identifier                   |
| `meta.processing_time_ms` | number | Time taken to process the request (ms)  |

> **Deletion fields are read-only and independent of `video_status`.** `code` is inferred from the platform status code and `message` is authoritative; `null` reason does not mean the video is healthy — branch on `deleted_at`. Both clear to `null` when the video becomes fetchable again. Full contract: [Deletion state](./by-external-id#deletion-state). 
