{"id":31760881,"url":"https://github.com/christopher-ramirez/youtube-query","last_synced_at":"2025-10-09T21:41:54.075Z","repository":{"id":57404321,"uuid":"66916630","full_name":"christopher-ramirez/youtube-query","owner":"christopher-ramirez","description":"Node Package useful to query Youtube data","archived":false,"fork":false,"pushed_at":"2016-11-29T22:22:37.000Z","size":29,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-02T03:48:30.928Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/christopher-ramirez.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2016-08-30T07:18:46.000Z","updated_at":"2016-11-29T05:44:51.000Z","dependencies_parsed_at":"2022-09-08T14:12:38.615Z","dependency_job_id":null,"html_url":"https://github.com/christopher-ramirez/youtube-query","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/christopher-ramirez/youtube-query","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christopher-ramirez%2Fyoutube-query","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christopher-ramirez%2Fyoutube-query/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christopher-ramirez%2Fyoutube-query/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christopher-ramirez%2Fyoutube-query/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/christopher-ramirez","download_url":"https://codeload.github.com/christopher-ramirez/youtube-query/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christopher-ramirez%2Fyoutube-query/sbom","scorecard":{"id":281094,"data":{"date":"2025-08-11","repo":{"name":"github.com/christopher-ramirez/youtube-query","commit":"8de38bfa02cfe7a2552384cbf46102a75ed295ad"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-17T15:53:16.880Z","repository_id":57404321,"created_at":"2025-08-17T15:53:16.880Z","updated_at":"2025-08-17T15:53:16.880Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002053,"owners_count":26083286,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-10-09T21:41:10.867Z","updated_at":"2025-10-09T21:41:54.063Z","avatar_url":"https://github.com/christopher-ramirez.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Youtube Query\n\n`youtube-query` is a library to easily query public information on Youtube, like popular videos, public playlists, etc.\n\nThis library tries to greatly simplify the retrieval of public Youtube graph data, so it can be easily used in robots, utilities, webapps, etc.\n\nTo install, run:\n```\n    $ npm install youtube-query\n```\n\nTo use this library you'll need a Youtube (Data API)[https://developers.google.com/youtube/v3/] key.\n\n#Examples\n\n### Retrieve videos\n```javascript\n    const Youtube = require('youtube-query')\n    const client = new Youtube(youAPISecretKey)\n\n    // get the lastest popular videos\n    client.videos.fetch((err, videos) =\u003e {\n        ...\n    })\n\n    // We can also apply filters to retrieved videos.\n    // See https://developers.google.com/youtube/v3/docs/videos/list \n    const mxVideos = client.videos.filter({regionCode: 'MX'})\n    mxVideos.fetch((err, videos) =\u003e {\n        console.log(videos)\n    })\n\n    // we can also fetch the next page of videos\n    mxVideos.next((err, videos) =\u003e {\n        console.log('Next page fetched', videos)\n    })\n```\n\n### Searching\n```javascript\n    const Youtube = require('youtube-query')\n    const APIKey = 'secret-key'\n    const client = new Youtube(APIKey)\n\n    // Search Youtube\n    // (`fetch` and `next` can optionally accepts a page size as first argument)\n    client.search('funny videos').fetch(10, (err, videos) =\u003e {\n        // once resolved, fetch the next 20 funny videos\n        videos.next(20, (err, nextVideos) =\u003e {\n            // ...\n        })\n    })\n\n    // Only perform a playlist search\n    housePlaylists = client.search('house music').filter({type: 'playlist'})\n    housePlaylists.fetch((err, playlists) =\u003e {\n        ...\n    })\n```\n\n# API\n**Youtube** class has the `videos`, `search`, and `playlists` properties. These all properties are inherited from a base *Resource* class which is an extended array.\n\n## *Resource* class\nAll resources available through **Youtube** class are inherited from this class. So, in all of them the following methods and properties are available:\n\n#### maxResults: integer\nThe default number of resources to return in a request. Max posible value is 50.\n\n#### filter: fn(object)\nUpdates the resource list filters. This method does not replaces the current filters with new received one. Instead it extends the currently existing filters.\n\n#### filters: object\nDefined filters for the resource.\n\n#### fetch: fn([pageSize: integer, [fn(err, value)]])\nRetrieves the first resource page. It optionally accepts as first argument the page size to return. Otherwise it will use `maxResults` property value. The second argument is a callback which will received returned resources.\n\n#### next: fn([pageSize: integer, [fn(err, value)]])\nRetrieves subsequent resource pages. Pushing the newly returned resources at the end of the array.\n\n#### getTotalResults: fn()\nReturns the total count of resources in the backend for the current resource. This is different to `length` property. `length` represents the count of already fetched resources while `getTotalResults()` represents the total count of resources available for retrieval.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristopher-ramirez%2Fyoutube-query","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchristopher-ramirez%2Fyoutube-query","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristopher-ramirez%2Fyoutube-query/lists"}