Skip to content

About

Python, JavaScript and cURL examples for extracting Twitch VOD and clip metadata through Apify.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Twitch video metadata scraper with Python, JavaScript and cURL

Run Twitch VOD & Clip Metadata Extractor from Apify's web interface without writing code, or integrate it with Python, JavaScript or cURL to get structured Twitch video metadata.

This repository contains working request examples, sample input, sample output and CSV data so you can understand the result format before running a live request.

Open Twitch VOD & Clip Metadata Extractor on Apify

What this repository helps you do

  • Enrich a known list of Twitch VOD URLs, clip URLs or numeric VOD IDs with metadata.
  • Build a catalogue with titles, creators, dates, durations, views and availability.
  • Resolve clip slugs and VOD identifiers in a repeatable API workflow.
  • Export or process metadata rows as JSON, CSV, Excel or JSONL in your own workflow.

Example result

The repository includes a sanitized example in data/sample-output.json and a tabular version in data/sample-output.csv.

{
  "status": "success",
  "recordType": "clip",
  "inputUrl": "https://clips.twitch.tv/FaintLightGullWholeWheat",
  "sourceUrl": "https://clips.twitch.tv/FaintLightGullWholeWheat",
  "id": "396245304",
  "displayId": "FaintLightGullWholeWheat",
  "title": "EA Play 2016 Live from the Novo Theatre",
  "durationSeconds": 32,
  "createdAt": "2016-06-12T21:36:33Z",
  "viewCount": 30294,
  "channelName": "EA",
  "creatorName": "stereotype_",
  "categories": [],
  "chapters": [],
  "thumbnailUrl": null,
  "availability": "available",
  "retrievedAt": "2026-09-23T18:26:30Z",
  "errorCode": null,
  "errorMessage": null
}

Run without code

You can run the hosted Actor directly from the Apify web interface.

  1. Open Twitch VOD & Clip Metadata Extractor on Apify.
  2. In the Input tab, enter public Twitch VOD URLs, clip URLs or numeric VOD IDs in inputList.
  3. Review maxItems and deduplicate, then click Start.
  4. Open the Dataset tab to inspect the metadata rows.
  5. Export the Dataset as JSON, CSV, Excel or JSONL when you need a file for a spreadsheet or another tool.

Use docs/no-code-guide.md for the field-by-field walkthrough and data/sample-input.json for a first test input.

Try it with Apify's free plan

Apify's Free plan includes $5 in monthly prepaid usage that can be spent in the Apify Store or on your own Actors. No credit card is required to start. This can cover a small first test of Twitch VOD & Clip Metadata Extractor while you have credit available; it is not unlimited free usage.

Unused credits expire at the end of the billing cycle and do not roll over. Check the current Apify pricing before running a larger batch.

Quick start for developers

Python

1. Install the client

pip install -r examples/python/requirements.txt

2. Set your Apify token

export APIFY_API_TOKEN="your-token"

On Windows PowerShell:

$env:APIFY_API_TOKEN = "your-token"

3. Run the example

python examples/python/twitch_video_metadata.py

The example reads data/sample-input.json, starts the hosted Actor and prints the returned Dataset items.

Input example

{
  "inputList": [
    "https://clips.twitch.tv/FaintLightGullWholeWheat"
  ],
  "maxItems": 1,
  "deduplicate": true
}

See the complete field guide in docs/input-reference.md.

Request examples

cURL

See examples/curl-request.md for the synchronous API request.

Python

See examples/python/twitch_video_metadata.py, examples/python/batch_twitch_video_metadata.py and examples/python/export_twitch_metadata_csv.py.

JavaScript

See examples/javascript/request.mjs.

All examples use the hosted Apify Actor. They do not expose a proxy, bypass access controls or require the Actor source code locally.

Output fields

The most useful fields are:

Field Meaning
status success or error for the processed input.
recordType vod or clip when Twitch identifies the target.
title The public VOD or clip title, when available.
channelName Broadcaster display name, when available.
durationSeconds Duration in seconds, when available.
viewCount Public view count, when available.
availability available, unavailable or restricted.
sourceUrl Canonical Twitch URL returned for the target.
errorCode Sanitized error code for an unsuccessful input.

See docs/output-reference.md for the complete output contract.

Common use cases

Read docs/use-cases.md for complete examples covering:

  • Creating a metadata catalogue for selected Twitch clips and VODs.
  • Normalizing mixed VOD IDs and URLs before downstream enrichment.
  • Exporting a clean Dataset for analytics, moderation or editorial workflows.

How to extract Twitch VOD metadata with Python

Use examples/python/twitch_video_metadata.py with an Apify API token. It reads the checked-in input example, starts the hosted Actor and prints the Dataset items.

Twitch clip metadata JSON example

data/sample-output.json shows a complete sanitized clip row, including the source URL, title, duration, creator and availability fields.

FAQ

See docs/faq.md for questions derived from the actual Actor behavior.

Limits and pricing

The Actor accepts 1–100 input strings. maxItems defaults to 25 and can be set from 0 to 100; 0 processes all supplied inputs after normalization. Duplicate canonical targets are removed by default.

The hosted Actor uses Apify pay-per-event pricing. One successfully delivered metadata row is one twitch-metadata-result event. The current FREE tier is $0.001 per successful result, equivalent to $1.00 per 1,000 results; the configured higher tiers have lower event prices. Failed or unavailable inputs are not charged for this custom result event.

Twitch VOD and clip availability can change. A missing field is returned as null or an empty array when the source does not expose it. The Actor returns metadata only and does not download video or audio.

Twitch VOD & Clip Metadata Extractor is billed according to the public pricing shown on Apify.

Hosted version

Use the hosted version when you need repeatable execution, batching, scheduling, API access or output storage without managing the extraction infrastructure yourself:

Open Twitch VOD & Clip Metadata Extractor on Apify

Responsible use

Use the returned data lawfully and respect Twitch's terms, access rules and privacy obligations that apply to your use case. Never commit API tokens or other credentials to this repository.

Support

For a problem with the examples, open a GitHub issue with the command, sanitized input and error message. For an execution problem, include the Apify run ID but never include your token.

License

This repository is released under the MIT License.

About

Python, JavaScript and cURL examples for extracting Twitch VOD and clip metadata through Apify.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors