Unif API Docs

Batch-fetch TikTok videos by ID

Return canonicalized metadata — author, captions, sound, and engagement counts — for up to 20 TikTok videos in one request, by numeric video ID. Useful for hydrating a set of videos without one call each.

Pricing — $ · min $0.001

Billed per record at 1 credit ($0.001) each, with a 1-credit ($0.001) minimum per call.

POST
/tiktok/videos/batch

Authorization

bearerAuth
AuthorizationBearer <token>

UnifAPI API key. Provider credentials are managed by UnifAPI.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/tiktok/videos/batch" \  -H "Content-Type: application/json" \  -d '{    "ids": [      "string"    ]  }'
{  "request_id": "string",  "data": {    "items": [      {        "id": "string",        "title": "string",        "video_description": "string",        "create_time": 0,        "duration": 0,        "cover_image_url": "string",        "share_url": "string",        "embed_link": "string",        "width": 0,        "height": 0,        "like_count": 0,        "comment_count": 0,        "share_count": 0,        "view_count": 0,        "author": {          "id": "string",          "username": "string",          "display_name": "string",          "avatar_url": "string"        },        "region": "string",        "hashtags": [          "string"        ],        "music": {          "id": "string",          "title": "string",          "author": "string",          "is_original": true        },        "is_image_post": true,        "play_url": "string"      }    ]  },  "billing": {    "credits_charged": 0,    "records_charged": 0,    "balance_remaining": 0,    "truncated_due_to_balance": true  }}
{  "error": {    "type": "validation_error",    "message": "string",    "request_id": "string",    "issues": [      null    ],    "billing": {      "credits_required": 0,      "credits_charged": 0,      "records_charged": 0,      "balance_remaining": 0,      "truncated_due_to_balance": true    }  }}
{  "error": {    "type": "validation_error",    "message": "string",    "request_id": "string",    "issues": [      null    ],    "billing": {      "credits_required": 0,      "credits_charged": 0,      "records_charged": 0,      "balance_remaining": 0,      "truncated_due_to_balance": true    }  }}
{  "error": {    "type": "validation_error",    "message": "string",    "request_id": "string",    "issues": [      null    ],    "billing": {      "credits_required": 0,      "credits_charged": 0,      "records_charged": 0,      "balance_remaining": 0,      "truncated_due_to_balance": true    }  }}
{  "error": {    "type": "validation_error",    "message": "string",    "request_id": "string",    "issues": [      null    ],    "billing": {      "credits_required": 0,      "credits_charged": 0,      "records_charged": 0,      "balance_remaining": 0,      "truncated_due_to_balance": true    }  }}
{  "error": {    "type": "validation_error",    "message": "string",    "request_id": "string",    "issues": [      null    ],    "billing": {      "credits_required": 0,      "credits_charged": 0,      "records_charged": 0,      "balance_remaining": 0,      "truncated_due_to_balance": true    }  }}
{  "error": {    "type": "validation_error",    "message": "string",    "request_id": "string",    "issues": [      null    ],    "billing": {      "credits_required": 0,      "credits_charged": 0,      "records_charged": 0,      "balance_remaining": 0,      "truncated_due_to_balance": true    }  }}
{  "error": {    "type": "validation_error",    "message": "string",    "request_id": "string",    "issues": [      null    ],    "billing": {      "credits_required": 0,      "credits_charged": 0,      "records_charged": 0,      "balance_remaining": 0,      "truncated_due_to_balance": true    }  }}
{  "error": {    "type": "validation_error",    "message": "string",    "request_id": "string",    "issues": [      null    ],    "billing": {      "credits_required": 0,      "credits_charged": 0,      "records_charged": 0,      "balance_remaining": 0,      "truncated_due_to_balance": true    }  }}