# SponsorBlock extractor for YouTube transcript cleanup

**Use case:** 

Export all SponsorBlock segment categories for recurring video batches before removing ads and non-content spans from transcripts.

## Input

```json
{
  "videos": [
    "https://youtu.be/Hfovjw7Ts_U",
    "dQw4w9WgXcQ"
  ],
  "categories": [
    "sponsor",
    "selfpromo",
    "interaction",
    "intro",
    "outro",
    "music_offtopic",
    "preview",
    "filler",
    "poi_highlight"
  ],
  "includeNoSegments": true,
  "concurrency": 4,
  "maxRetries": 3
}
```

## Output

```json
{
  "recordType": {
    "label": "Record type",
    "format": "string"
  },
  "videoId": {
    "label": "Video ID",
    "format": "string"
  },
  "category": {
    "label": "Category",
    "format": "string"
  },
  "actionType": {
    "label": "Action",
    "format": "string"
  },
  "startSeconds": {
    "label": "Start (seconds)",
    "format": "number"
  },
  "endSeconds": {
    "label": "End (seconds)",
    "format": "number"
  },
  "durationSeconds": {
    "label": "Duration (seconds)",
    "format": "number"
  },
  "votes": {
    "label": "Votes",
    "format": "integer"
  },
  "locked": {
    "label": "Locked",
    "format": "boolean"
  },
  "description": {
    "label": "Description",
    "format": "string"
  },
  "videoDurationSeconds": {
    "label": "Video duration",
    "format": "number"
  },
  "uuid": {
    "label": "Segment UUID",
    "format": "string"
  },
  "sourceUrl": {
    "label": "YouTube video",
    "format": "string"
  },
  "sponsorBlockApiUrl": {
    "label": "SponsorBlock API",
    "format": "string"
  },
  "fetchedAt": {
    "label": "Fetched at",
    "format": "string"
  },
  "error": {
    "label": "Error",
    "format": "string"
  }
}
```

## About this Actor

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