# YouTube Transcript with Timestamps SponsorBlock Cleaner

**Use case:** 

Extract crowdsourced YouTube SponsorBlock timestamps to clean video transcripts for LLM & RAG pipelines. Returns videoId, startTime, endTime, category, actionType, and durationSeconds. Adapt by providing your target videoUrls list and selecting specific categories to filter.

## Input

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=9bZkp7q19f0"
  ],
  "categories": [
    "sponsor",
    "selfpromo",
    "intro",
    "outro",
    "filler"
  ],
  "actionTypes": [
    "skip"
  ],
  "source": "visible",
  "minVotes": 0,
  "includeHiddenSegments": false,
  "includeDescriptions": true,
  "includeSubmitterInfo": true,
  "includeYouTubeMetadata": true,
  "includeSummary": false,
  "maxSegmentsPerVideo": 0,
  "concurrency": 4
}
```

## Output

```json
{
  "recordType": {
    "label": "Type",
    "format": "text"
  },
  "videoId": {
    "label": "Video ID",
    "format": "text"
  },
  "category": {
    "label": "Category",
    "format": "text"
  },
  "actionType": {
    "label": "Action",
    "format": "text"
  },
  "startTime": {
    "label": "Start (s)",
    "format": "number"
  },
  "endTime": {
    "label": "End (s)",
    "format": "number"
  },
  "durationSeconds": {
    "label": "Duration (s)",
    "format": "number"
  },
  "votes": {
    "label": "Votes",
    "format": "number"
  },
  "videoTitle": {
    "label": "Video title",
    "format": "text"
  },
  "videoUrl": {
    "label": "Video URL",
    "format": "link"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The YouTube SponsorBlock Segments Scraper Actor is ready to run with the inputs already set for "YouTube Transcript with Timestamps SponsorBlock Cleaner". [Sign up or log in](https://console.apify.com/create-task-from-example/CPQ2E8r1nTkMzEYKh) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "YouTube Transcript with Timestamps SponsorBlock Cleaner" task

The YouTube SponsorBlock Segments Scraper Actor will start running based on the input automatically. You can also change all the input fields, like video urls or ids, segment categories, and more, to match your specific use case.

### 3. Receive the "YouTube Transcript with Timestamps SponsorBlock Cleaner" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as type, video id, category, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "YouTube Transcript with Timestamps SponsorBlock Cleaner" task via API](https://apify.com/dataspryva/youtube-sponsorblock-segments-scraper.md).

## FAQ

### How can I clean a YouTube transcript with timestamps for LLM or RAG use?

The YouTube transcript cleanup task returns community-reported segment start and end times so you can identify spans to remove before analysis.

### Can I get YouTube transcript timestamps for a specific video?

The YouTube transcript cleanup task is set to look up video 9bZkp7q19f0, using its YouTube watch URL.

### What information does the YouTube transcript timestamp data Include?

Each segment in the YouTube transcript cleanup task can Include its category, action, start and end times, duration, vote score, and video title and URL.

### How many YouTube videos can I Include in one run?

Add multiple video URLs or 11-character video IDs to the YouTube transcript cleanup task; the page sets no per-run video limit.

### Does YouTube transcript data Include video titles and channel details?

YouTube metadata is enabled for the YouTube transcript cleanup task, adding available title, channel, thumbnail, duration, view count, publish date, and live status.

### How much does it cost to get YouTube transcript timestamps?

The YouTube transcript cleanup task costs $0.99 per 1,000 results on Free, plus Apify compute usage and a start event charge.

### Can I download YouTube transcript timestamp results as CSV or JSON?

Results from the YouTube transcript cleanup task can be downloaded as JSON, CSV, Excel, XML, RSS, or an HTML table, or read through the Apify API.

### Can I run YouTube transcript timestamp collection on a schedule?

You can schedule the YouTube transcript cleanup task with Apify Schedules, run it through the Apify API, or connect it through Zapier, Make, or n8n.

## About this Actor

This example demonstrates how to use [YouTube SponsorBlock Segments Scraper](https://apify.com/dataspryva/youtube-sponsorblock-segments-scraper.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/dataspryva/youtube-sponsorblock-segments-scraper.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/dataspryva/youtube-sponsorblock-segments-scraper.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
