Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oxylabs/youtube-scraper
YouTube Scraper for effortless public YouTube data collection, including video and channel information.
https://github.com/oxylabs/youtube-scraper
scrape-youtube scrape-youtube-videos scraper youtube youtube-api youtube-channel youtube-comment-scraper youtube-crawler youtube-data-api-v3 youtube-scraper
Last synced: about 1 month ago
JSON representation
YouTube Scraper for effortless public YouTube data collection, including video and channel information.
- Host: GitHub
- URL: https://github.com/oxylabs/youtube-scraper
- Owner: oxylabs
- Created: 2023-10-11T14:29:08.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-25T09:00:42.000Z (8 months ago)
- Last Synced: 2024-09-29T03:21:38.369Z (about 1 month ago)
- Topics: scrape-youtube, scrape-youtube-videos, scraper, youtube, youtube-api, youtube-channel, youtube-comment-scraper, youtube-crawler, youtube-data-api-v3, youtube-scraper
- Language: Java
- Homepage: https://oxylabs.io/products/scraper-api/web/youtube
- Size: 22.5 KB
- Stars: 181
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
YouTube Scraper[![Oxylabs promo code](https://user-images.githubusercontent.com/129506779/250792357-8289e25e-9c36-4dc0-a5e2-2706db797bb5.png)](https://oxylabs.go2cloud.org/aff_c?offer_id=7&aff_id=877&url_id=112)
[![](https://dcbadge.vercel.app/api/server/eWsVUJrnG5)](https://discord.gg/GbxmdGhZjq)
With [YouTube
Scraper](https://oxylabs.io/products/scraper-api/web/youtube), you
can easily collect public YouTube data without blocks. Follow this guide
to see how to scrape YouTube using Oxylabs’ [Scraper
API](https://oxylabs.io/products/scraper-api).## How it works
Simply, send a web request to our API and you’ll retrieve the HTML of
any public YouTube page you wish to scrape.### Python code example
The below code requests and delivers the HTML content of [this
Oxylabs video](https://www.youtube.com/watch?v=SLSGtgKWzxg) on
YouTube:```python
import requests
from pprint import pprint# Structure payload.
payload = {
'source': 'universal',
'url': 'https://www.youtube.com/watch?v=SLSGtgKWzxg',
'render': 'html'
}# Get a response.
response = requests.request(
'POST',
'https://realtime.oxylabs.io/v1/queries',
auth=('USERNAME', 'PASSWORD'), # Your credentials go here
json=payload
)# Instead of response with job status and results URL, this will return the
# JSON response with results.
pprint(response.json())
```See Oxylabs
[documentation](https://developers.oxylabs.io/scraper-apis/web-scraper-api)
for more details.### Output sample
```json
{
"results": [
{
"content":"\n\n
...
\n\n",
"created_at": "2023-05-18 12:33:40",
"updated_at": "2023-05-18 12:33:55",
"page": 1,
"url": "https://www.youtube.com/watch?v=SLSGtgKWzxg",
"job_id": "7064941110115745793",
"status_code": 200
}
]
}
```Oxylabs’ YouTube Scraper API will ease your data gathering efforts and
you’ll be sure to gather YouTube data like channel information, video
details, titles, descriptions, playlists, and more. Reach out to us via
[live chat](https://oxylabs.io/) or
[email](mailto:[email protected]) in case you have any
questions.Also, check this tutorial on [pypi](https://pypi.org/project/youtube-video-scraper-api/)