{"id":14979817,"url":"https://github.com/yimura/scraper","last_synced_at":"2025-10-28T19:32:07.514Z","repository":{"id":47700558,"uuid":"307799553","full_name":"Yimura/Scraper","owner":"Yimura","description":"A Youtube Scraper with zero dependencies.","archived":false,"fork":false,"pushed_at":"2022-11-15T19:35:48.000Z","size":55,"stargazers_count":51,"open_issues_count":2,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-11T20:02:28.793Z","etag":null,"topics":["scrape-youtube","search-youtube","youtube-scraper","youtube-search"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@yimura/scraper","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Yimura.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-27T18:57:19.000Z","updated_at":"2024-08-31T04:27:04.000Z","dependencies_parsed_at":"2023-01-21T19:01:07.097Z","dependency_job_id":null,"html_url":"https://github.com/Yimura/Scraper","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yimura%2FScraper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yimura%2FScraper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yimura%2FScraper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yimura%2FScraper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yimura","download_url":"https://codeload.github.com/Yimura/Scraper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219858899,"owners_count":16556039,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["scrape-youtube","search-youtube","youtube-scraper","youtube-search"],"created_at":"2024-09-24T14:00:43.706Z","updated_at":"2025-10-28T19:32:02.206Z","avatar_url":"https://github.com/Yimura.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YouTube Scraper\n\n## Table of Contents\n\n * [Why use this package](#why-use-this-package)\n    - [Timings](#timings)\n * [Options](#options)\n    - [Example Options](#example-options)\n * [Example Code](#example-code)\n    * [Output](#output)\n * [Return Object Structure](#return-object-structure)\n\n## Why use this package?\n\nThis is a YouTube scraper with zero dependencies.\nEverything has been coded to have a minimal footprint creating a small package that's aimed at being as fast as possible.\n\n### Timings\n\nThese are the timings I would get on average over 20 tests, ofcourse the Fetch time depends on how good your connection is to YouTube and how loaded YouTube is at that point.\n\n| Type | Fetch Time | Processing Time |\n|---|---|---|\n| `video` | 585.632055 ms | 3.117175 ms |\n| `channel` | 494.026065 ms | `not tested` |\n| `playlist` | 569.424545 ms | `not tested` |\n\n[Check here](https://prnt.sc/1018ttl)\n\n## Options\n\n| Property | Default | Description |\n|---|---|---|\n| language | `en` | Set the language that you would like for results to be returned in. A list of supported language types can be found [here](http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry). |\n| searchType | `video` | Which type to search for on YouTube, supported types are `any`, `channel`, `live`, `movie`, `playlist` and `video` |\n```\n\"Sort by\" has not been implemented as of now.\nAll data is sorted in the default order that YouTube returns these in.\n```\n\n### Example Options\nYou can set the global language which YouTube should return results in or set the return language per search/request:\n```js\nimport youtube from '@yimura/scraper'\n\n// This will set the language to French from France globally\nconst yt = new youtube.default('fr-FR');\n\n// Sets the language communicated to YouTube to Dutch from Belgium for this search\nconst results = yt.search('Never gonna give you up', {\n    language: 'nl-BE',\n    searchType: 'video' // video is the default search type\n});\n```\n\n## Example Code\n\n**CommonJS:**\n```js\nconst Scraper = require('@yimura/scraper').default;\n\nconst youtube = new Scraper();\n\nyoutube.search('Never gonna give you up').then(results =\u003e {\n    console.log(results.videos[0]);\n});\n```\n\n**ESModule:**\n```js\nimport youtube from '@yimura/scraper'\n\nconst yt = new youtube.default();\nyt.search('Never gonna give you up').then(results =\u003e {\n    console.log(results.videos[0]);\n});\n```\n\n### Output\n\n```js\n{\n    channel: {\n        name: 'Official Rick Astley',\n        link: 'https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw',\n        verified: true\n    },\n    description: \"Rick Astley's official music video for “Never Gonna Give You Up” Listen to Rick Astley: https://RickAstley.lnk.to/_listenYD Subscribe ...\",\n    duration: 213,\n    duration_raw: \"3:33\",\n    id: 'dQw4w9WgXcQ',\n    link: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ',\n    thumbnail: 'https://i.ytimg.com/vi/dQw4w9WgXcQhqdefault.jpg',\n    shareLink: 'https://youtu.be/dQw4w9WgXcQ',\n    title: 'Rick Astley - Never Gonna Give You Up (Video)',\n    uploaded: '11 years ago',\n    views: 788551856\n}\n```\n\n## Return Object Structure\n```js\n{\n    channels: [\n        {\n            channelId: String,\n            description: String,\n            link: String,\n            thumbnails: [\n                {\n                    url: String,\n                    width: Number,\n                    height: Number\n                }\n            ],\n            subscribed: Boolean,\n            uploadedVideos: Number,\n            verified: Boolean\n        }\n    ],\n    playlists: [\n        {\n            preview: [\n                {\n                    duration: Number,\n                    duration_raw: String,\n                    views: Number,\n                    id: String,\n                    link: String,\n                    thumbnail: String,\n                    title: String,\n                    shareLink: String\n                }\n            ],\n            id: String,\n            link: String,\n            thumbnail: String,\n            title: String,\n            videoCount: Number\n        }\n    ],\n    streams: [\n        {\n            watching: Number,\n            channel: {\n                name: String,\n                link: String,\n                verified: Boolean\n            },\n            id: String,\n            link: String,\n            thumbnail: String,\n            title: String,\n            shareLink: String\n        }\n    ],\n    videos: [\n        {\n            description: String,\n            duration: Number,\n            duration_raw: String,\n            uploaded: String,\n            views: Number,\n            channel: {\n                name: String,\n                link: String,\n                verified: Boolean\n            },\n            id: String,\n            link: String,\n            thumbnail: String,\n            title: String,\n            shareLink: String\n        }\n    ]\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyimura%2Fscraper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyimura%2Fscraper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyimura%2Fscraper/lists"}