---
title: "YouTube API: turn YouTube into structured data | Scrape.ly"
description: "Scrape public YouTube videos, channels, playlists, hashtags, and search results: titles, views, likes, durations, upload dates, descriptions, and channel details."
url: https://scrape.ly/api/youtube-api
markdown: https://scrape.ly/api/youtube-api.md
---

G2

4.7/5

[Excellent](https://www.trustpilot.com/review/scrape.ly)

[Trustpilot](https://www.trustpilot.com/review/scrape.ly)

# Turn YouTube into structured data

Scrape public YouTube videos, channels, playlists, hashtags, and search results: titles, views, likes, durations, upload dates, descriptions, and channel details.

[Try YouTube API](https://scrape.ly/store/echofield/youtube-scraper.md)

01 Integration

## Integrate YouTube API your way

Connect to Scrape.ly using Python, JavaScript, HTTP, cURL, OpenAPI, or MCP and start extracting YouTube data in minutes.

from scrapely_client import ScrapelyClient

client = ScrapelyClient ( 'YOUR_TOKEN' , api_url = 'https\://api.scrape.ly' )

run = client. actor ( 'echofield/youtube-scraper' ) . call (

run_input = {

'searchQueries' : \[ 'web scraping tutorials' ] ,

'maxResults' : 10 ,

'dateFilter' : 'month' ,

}

)

for item in client. dataset ( run.default_dataset_id ) . iterate_items () :

print ( item )

02 Input & Output

## Send a search or channel, get structured video data

Pass search queries, video URLs, channel URLs, and filters into Scrape.ly. Get structured outputs with video titles and URLs, views, likes, and comments, durations and upload dates, descriptions, and channel details, and more.

Input

1 2 3 4 5 6 7

```
{
 "searchQueries":[
  "web scraping tutorials"
 ],
 "maxResults":10,
 "dateFilter":"month"
}
```

Output

1 2 3 4 5 6 7 8 9 10 11

```
{
 "title":"Web Scraping with Python in 2026: Full Course",
 "id":"aB3dEf9GhIj",
 "url":"https://www.youtube.com/watch?v=aB3dEf9GhIj",
 "viewCount":184203,
 "likes":6120,
 "duration":"01:12:48",
 "date":"2026-09-30",
 "channelName":"Code with Example",
 "commentsCount":412
}
```

03 How it works

## Start extracting YouTube data in four simple steps

Scrape.ly keeps the setup simple so you can move from signup to live YouTube data without wasting time on scraping infrastructure.

[Get started for free](https://my.scrape.ly/register)

Step 1

### Create your Scrape.ly account

Create your account and get access to ready-made APIs, scrapers, and automation tools.

Step 2

### Get your Scrape.ly API token

Copy your API token from the Scrape.ly dashboard and use it to authenticate your requests.

Step 3

### Connect YouTube API

Choose Python, JavaScript, HTTP, or MCP and connect Scrape.ly to your app or workflow.

Step 4

### Fetch YouTube data

Send your search queries, video URLs, channel URLs, and filters, then receive clean structured data ready for analysis.

04 Why Scrape.ly

## Everything you need to extract data reliably

Scrape.ly gives you ready-made APIs, proxy support, monitoring, exports, integrations, and scalable infrastructure in one platform.

### Never Get Blocked

Use built-in proxy support to reduce blocks, rate limits, and failed requests.

### Export Any Format

Get results in JSON, CSV, Excel, XML, HTML table, RSS, or other workflow-friendly formats.

### Monitor Every Run

Track scraper status, performance, failures, retries, and outputs from one dashboard.

### Built-In Integrations

Connect with webhooks, APIs, automation tools, cloud apps, and internal systems.

### Scalable Infrastructure

Run small tests or high-volume extraction jobs without rebuilding your scraping stack.

### Developer-Friendly

Use clean APIs, SDKs, docs, examples, and structured outputs built for real workflows.

05 AI-Ready Data

## Feed YouTube data into your tools instantly

Connect Scrape.ly with your apps, dashboards, sheets, agents, and automation workflows to turn YouTube data into action.

[Browse integrations](https://scrape.ly/integrations.md) [API Reference](https://scrape.ly/docs/api-overview.md)

![AI-ready data workflow illustration](https://scrape.ly/assets/pages/api/ai-ready-data/ai-ready.svg)

06 Explore APIs

## More YouTube APIs on Scrape.ly

Browse ready-made YouTube scrapers and APIs available inside Scrape.ly and choose the one that fits your workflow.

![YouTube Scraper logo](https://scrape.ly/cdn-cgi/image/width=132,fit=scale-down,format=auto/https://api.scrape.ly/v2/actors/d2ae8e042a1745948/picture.webp?v=4243b10a920758d7f1e80db9eaeff9d3)

### [YouTube Scraper](https://scrape.ly/store/echofield/youtube-scraper.md)

scrape.ly/store/echofield/youtube-scraper

---

[Echofield](https://scrape.ly/users/echofield.md "Developed by Echofield")

Videos Social media

---

1.1K monthly users

[Try for free](https://my.scrape.ly/store/echofield~youtube-scraper?intent=signup)

![YouTube Comments Scraper logo](https://scrape.ly/cdn-cgi/image/width=132,fit=scale-down,format=auto/https://api.scrape.ly/v2/actors/34a8e23aded2410b9/picture.webp?v=0c38bb4ece51cf4c8e85f4f547e789f1)

### [YouTube Comments Scraper](https://scrape.ly/store/echofield/youtube-comments-scraper.md)

scrape.ly/store/echofield/youtube-comments-scraper

---

[Echofield](https://scrape.ly/users/echofield.md "Developed by Echofield")

Social media Videos

---

516 monthly users

[Try for free](https://my.scrape.ly/store/echofield~youtube-comments-scraper?intent=signup)

![YouTube Shorts Scraper logo](https://scrape.ly/cdn-cgi/image/width=132,fit=scale-down,format=auto/https://api.scrape.ly/v2/actors/928f8d8a846f42b6b/picture.webp?v=1747f02020adff4103a489152b38b3be)

### [YouTube Shorts Scraper](https://scrape.ly/store/echofield/youtube-shorts-scraper.md)

scrape.ly/store/echofield/youtube-shorts-scraper

---

[Echofield](https://scrape.ly/users/echofield.md "Developed by Echofield")

Videos Social media

---

387 monthly users

[Try for free](https://my.scrape.ly/store/echofield~youtube-shorts-scraper?intent=signup)

### Check other related APIs

[View all](https://scrape.ly/api.md)

[Pinterest API](https://scrape.ly/api/pinterest-api.md)

[Instagram API](https://scrape.ly/api/instagram-api.md)

[TikTok API](https://scrape.ly/api/tiktok-api.md)

[Facebook API](https://scrape.ly/api/facebook-api.md)

[Facebook Marketplace API](https://scrape.ly/api/facebook-marketplace-api.md)

[Facebook Ads Library API](https://scrape.ly/api/facebook-ads-library-api.md)

07 FAQ

## Common questions about YouTube API

Quick answers about using Scrape.ly's YouTube API, available data, setup, and legal usage.

Got more questions? [Reach out to us](mailto:hello@scrape.ly?subject=YouTube%20API%20question\&body=I%20have%20a%20question%20about%20the%20YouTube%20API.)

### How is this different from an official YouTube API?

---

Official APIs, where they exist, usually need approval, keys, or paid tiers and limit which public data you can pull. Scrape.ly's YouTube API collects the public data shown on YouTube and returns it as structured JSON, with no approval process.

### Can I try the YouTube API for free?

### What data can I get from the YouTube API?

### Is it legal to scrape YouTube data?

### How do I get started with the YouTube API?

G2

4.7/5

[Excellent](https://www.trustpilot.com/review/scrape.ly)

[Trustpilot](https://www.trustpilot.com/review/scrape.ly)

## The internet is full of data. Start owning yours.

Scrape.ly gives you the infrastructure, the tooling, and the team to extract, process, and operationalize web data at any scale. Setup takes minutes.

[Get Started Free](https://my.scrape.ly/register) [Chat with Support](mailto:hello@scrape.ly?subject=Question%20about%20Scrape.ly\&body=Hi%2C%20I%20have%20a%20question%20about%20Scrape.ly.)

No credit card. No setup calls.
