YouTube Scraper
Pricing
from $0.35 / 1,000 videos
YouTube Scraper
Scrape YouTube videos from search results, channels (videos, Shorts, streams) or video URLs with full details: exact views, likes, comment count, publish date, subscribers, description and hashtags. No API key.
Pricing
from $0.35 / 1,000 videos
Rating
0.0
(0)
Developer
Solar G
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
2
Monthly active users
12 days ago
Last modified
Categories
Security
Limited permissionsShare
Scrapes YouTube videos from search results, channels and individual video URLs, with details for every video: exact views and likes, comment count, publish date, duration, channel and subscribers, collaborators, description and hashtags. Tags, category and the exact publish time are included when YouTube serves its player data, which it often withholds from cloud servers (see the field notes). No YouTube API key or quota is needed.
For a quick one-off check without an Apify account, a free web version with a small daily limit is available at purfled.com/youtube-video-stats.
Input
Use any combination of the three sources:
| Field | Description |
|---|---|
searchQueries | Keywords to search. |
channels | @handle, channel URL or channel ID. A tab in the URL (/@name/shorts, /@name/streams) is respected. |
videoUrls | Video, Shorts or live URLs, or 11-character video IDs. Several URLs on one line separated by spaces are split. |
maxResults | Limit per search query and per channel tab. Default 50. Video URLs are always processed in full. |
includeDetails | Full details for every video. Default true. Turn it off for a faster, cheaper listing. |
channelTabs | videos, shorts, streams. Default ["videos"]. |
sortBy | Search order: relevance or views. |
uploadDate | Search filter: any, hour, today, week, month, year. |
duration | Search filter: any, short (under 4 min), medium (4-20 min), long (over 20 min). |
country / language | Region and language for search and channel listings. Default US / en. Video details are always read in English, so numbers and dates parse the same way in every language. |
{"searchQueries": ["home espresso machine review"],"channels": ["@veritasium"],"videoUrls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],"maxResults": 100,"uploadDate": "month"}
Output
Every record has the same keys; a value is null when YouTube does not show it. Example from a real run (description shortened):
{"videoId": "dQw4w9WgXcQ","url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ","title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)","channel": "Rick Astley","channelId": "UCuAXFkgsw1L7xaCfnd5JJOw","channelUrl": "https://www.youtube.com/@RickAstleyYT","channelHandle": "@RickAstleyYT","channelSubscribers": 4550000,"channelVerified": true,"collaborators": [],"views": 1829827344,"concurrentViewers": null,"likes": 19493596,"commentCount": 2460393,"commentCountIsExact": true,"duration": "3:33","durationSec": 213,"publishDate": "2009-10-24","publishedAt": "2009-10-25T06:57:33.000Z","isShort": false,"isLive": false,"isAgeRestricted": false,"isMembersOnly": false,"commentsTurnedOff": false,"tags": ["rick astley", "Never Gonna Give You Up", "nggyu", "..."],"category": "Music","thumbnail": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg","description": "The official video for “Never Gonna Give You Up” by Rick Astley. ...","hashtags": ["#RickAstley", "#NeverGonnaGiveYouUp", "#OfficialMusicVideo"],"source": "url","sourceValue": "dQw4w9WgXcQ","input": "dQw4w9WgXcQ","position": null,"publishedTimeText": null,"publishedAtApprox": null,"dateText": "Oct 24, 2009"}
Field notes:
viewsandlikesare exact.likesisnullwhen the creator hides it.channelSubscribersis rounded by YouTube (for example 4.55M).commentCountis exact whencommentCountIsExactistrue. If the exact count cannot be read, the rounded figure YouTube shows (for example 5.7K) is returned withcommentCountIsExact: false.- Videos published by several channels have every channel in
collaborators; thechannelfields hold the first one. publishDateis the date YouTube displays, which is in US Pacific time.publishedAtis the exact timestamp in UTC, so it can fall on the next day (as in the example above).- Live streams have
isLive: trueandconcurrentViewersinstead ofviews. - Age-restricted videos have
isAgeRestricted: true. YouTube does not show their comments to logged-out visitors, socommentCountisnull. - YouTube often withholds player data from data-centre IP addresses, including Apify's servers, so on many runs most records lack it. On those records
tags,category,publishedAtandisMembersOnlyarenull(unknown), anddurationis taken from the search or channel listing or estimated from the replay heatmap (it can then differ by one second).durationSecisnullfor a video requested by URL that has no heatmap yet, such as a new Short.tags: []means the video has no tags;tags: nullmeans they could not be read. source/sourceValuesay where a video was found (search,channelorurl).positionis the rank in search results.- A video found by more than one source is returned once.
Errors:
- An input that is not a YouTube URL, ID, channel or valid search gives an item with
inputanderror(for example "Not a YouTube video URL or ID"). Video URLs that are private or removed give "Video not found, private or removed". Error items are not charged. - A search or channel tab with no videos gives an error item explaining that.
- If details fail for a video found by search or on a channel, the listing data is kept and
detailsErrorexplains why. That record is charged as a listing only.
API usage
curl -X POST "https://api.apify.com/v2/acts/solarg~youtube-scraper/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \-H "Content-Type: application/json" \-d '{"searchQueries": ["home espresso machine review"], "maxResults": 50}'
from apify_client import ApifyClientclient = ApifyClient("YOUR_API_TOKEN")run = client.actor("solarg/youtube-scraper").call(run_input={"channels": ["@veritasium"], "maxResults": 100})items = client.dataset(run["defaultDatasetId"]).list_items().items
Pricing
- $0.50 per 1,000 videos (listing)
- $0.50 per 1,000 videos for full details (charged only when
includeDetailsis on and the details were retrieved)
That is $1.00 per 1,000 fully detailed videos. Error items are free. Apify paid plans get lower prices: 10% off on Bronze, 20% on Silver and 30% on Gold and above. Platform usage is included in the price.
Limitations
- Only public data that YouTube shows to logged-out visitors is collected. Private, members-only and removed videos cannot be read.
- Dislike counts are not public and are not returned.
Report problems in the Issues tab.