npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@crawlora-org/youtube

v0.3.0

Published

Crawlora YouTube API client with 15 endpoints for search, channels, videos, playlists, comments, captions, and transcripts

Readme

@crawlora-org/youtube — YouTube API client for JavaScript and TypeScript

JavaScript and TypeScript client for Crawlora's hosted YouTube API. It exposes 15 API endpoints for search, channels, videos, playlists, comments, captions, and transcripts through Crawlora. It does not run a browser or scrape YouTube locally. A Crawlora account and CRAWLORA_API_KEY are required, and API use is billed under your Crawlora account. Crawlora is independent from and not endorsed by YouTube or its owners.

Install

npm install @crawlora-org/youtube

Get an API key

Create an account at crawlora.net, then open the Crawlora console for API-key setup. Set your key in the shell before running the client:

export CRAWLORA_API_KEY="your-crawlora-api-key"

Use

Save this example as example.mjs, then run node example.mjs after installing the package and setting your API key.

import process from "node:process";
import { YouTubeClient } from "@crawlora-org/youtube";

const apiKey = process.env.CRAWLORA_API_KEY;
if (!apiKey) throw new Error("Set CRAWLORA_API_KEY before running this example.");
const client = new YouTubeClient({ apiKey });
const result1 = await client.search({ q: "science explainers", type: "video" });
console.log(result1);
const result2 = await client.video({ id: "dQw4w9WgXcQ" });
console.log(result2);
const result3 = await client.transcript({ id: "dQw4w9WgXcQ", format: "text" });
console.log(result3);

The client also exports Client as an alias for YouTubeClient. Operation methods are available directly in camelCase and through the youtube group. See the full method and parameter list in the online reference.

Methods return promises and can be awaited. See the runnable example for a complete usage example.

Supported YouTube API endpoints

This package exposes each route below as a direct method and through the youtube group. See the endpoint and parameter reference for complete input details.

| Method | Endpoint | API operation | Description | | --- | --- | --- | --- | | GET | /youtube/captions/{id} | youtube-captions | Retrieve auto-generated or human captions | | GET | /youtube/channel/{id}/playlists | youtube-channel-playlists | Retrieve the playlists tab for a YouTube channel | | GET | /youtube/channel/{id}/search | youtube-channel-search | Search within a YouTube channel | | GET | /youtube/channel/{id}/shorts | youtube-channel-shorts | Retrieve the shorts tab for a YouTube channel | | GET | /youtube/channel/{id}/videos | youtube-channel-videos | Retrieve the videos tab for a YouTube channel | | GET | /youtube/comments/{id} | youtube-comments | Retrieve top-level video comments | | GET | /youtube/comments/{id}/replies | youtube-comment-replies | Retrieve replies to one YouTube comment | | GET | /youtube/playlist/{id} | youtube-playlist | Retrieve playlist metadata and items | | GET | /youtube/profile/{id} | youtube-profile | Retrieve channel profile | | GET | /youtube/search | youtube-search | Search YouTube | | GET | /youtube/suggest | youtube-suggest | Suggest YouTube search queries | | GET | /youtube/tag/{tag} | youtube-tag | Retrieve YouTube videos by tag | | GET | /youtube/transcript/{id} | youtube-transcript | Retrieve transcript for a YouTube video | | GET | /youtube/transcript/{id}/languages | youtube-transcript-languages | List transcript languages for a YouTube video | | GET | /youtube/video/{id} | youtube-video | Retrieve video metadata & captions |

Configuration

Pass your key through apiKey or set CRAWLORA_API_KEY and read it from the environment. Keep credentials out of source control and logs. Requests are made to Crawlora's hosted API. Response data and availability depend on Crawlora's current API behavior.