# YouTube SponsorBlock segment scraper example

**Use case:** 

Extract sponsor, intro, outro, and self-promo timestamps from a batch of public YouTube video URLs with this SponsorBlock scraper.

## Input

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=Hfovjw7Ts_U"
  ],
  "categories": [
    "sponsor",
    "selfpromo",
    "intro",
    "outro"
  ],
  "includeNoSegments": false,
  "concurrency": 4,
  "maxRetries": 2
}
```

## 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.