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

youtubeapi-edge

v0.0.13

Published

A YouTube API client for Edge environments

Readme

YouTubeAPI-Edge npm

YouTubeAPI-Edge is a lightweight library for interacting with the YouTube API, designed to run seamlessly in modern JavaScript environments, including edge platforms like Cloudflare Workers.

Note: This library is a work in progress. Currently, only list methods for GET requests are supported. Expect potential bugs and missing features.


Features

  • Edge-compatible: Designed to run in environments that support the Web standard fetch API, such as Cloudflare Workers.
  • Standardized HTTP client: Uses the Web standard fetch API instead of Node.js-specific HTTP libraries like http or axios, ensuring broad compatibility.
  • Familiar and intuitive interface: Mirrors the interface of the official Google API Node.js Client for ease of use.

Installation

Install the library using your preferred package manager:

npm install youtubeapi-edge
# OR
yarn add youtubeapi-edge
# OR
pnpm add youtubeapi-edge

Usage

To use the library, initialize it with your Google API key and specify the API version (default is v3).

import { youtubeapiEdge } from "youtubeapi-edge";

const youtube = youtubeapiEdge({
  auth: process.env["GOOGLE_API_KEY"]!, // Replace with your API key
  version: "v3",
});

const result = await youtube.channels.list({
  id: channelId, // Replace with the target channel ID
  part: ["snippet"],
});

API Documentation

This library is designed to align with the interface of the official Google API Node.js Client. Below are some of the supported endpoints and examples of how to use them.

channels

Fetch details about YouTube channels.

Documentation

const result = await youtube.channels.list({
  id: channelId, // Replace with the target channel ID
  part: ["snippet"],
});

videos

Fetch details about specific YouTube videos.

Documentation

const result = await youtube.videos.list({
  id: videoId, // Replace with the target video ID
  part: ["snippet", "statistics"],
});

search

Search for YouTube videos, channels, or playlists.

Documentation

const result = await youtube.search.list({
  part: ["snippet"],
  q: "query", // Replace with your search query
});

playlists

Fetch details about playlists from a specific channel.

Documentation

const result = await youtube.playlists.list({
  channelId: channelId, // Replace with the target channel ID
  part: ["snippet"],
});

commentThreads

Fetch top-level comments and replies for a specific video.

Documentation

const result = await youtube.commentThreads.list({
  videoId: videoId, // Replace with the target video ID
  part: ["snippet", "replies"],
});

comments

Fetch replies to a specific comment.

Documentation

const result = await youtube.comments.list({
  parentId: commentParentId, // Replace with the parent comment ID
  part: ["snippet"],
});

videoCategories

Retrieve YouTube video category data.

Documentation

const result = await youtube.videoCategories.list({
  part: ["snippet"],
});