Libraries that install
Ready-made tools for programmers, so you do not have to build every request by hand. Pick the one for the language you use. Every install command here was tested on 9 October 2026, and anything we could not test is labelled.
Package name correction: the TypeScript package on npm is ytapis-core. An npm package called ytapis does not exist, so npm install ytapis fails.
The npm ytapis-cli and ytapis-mcp packages (version 2.0.0) depend on an old ytapis-core@1, which breaks them. The fix is in the CLI and MCP section.
| Language | Install | Registry status (9 Oct 2026) | Tested here |
|---|---|---|---|
| TypeScript / JS | npm install ytapis-core | Published · v2.0.0 | Yes · search, video, stats |
| Python | pip install ytapis | Published · v2.0.0 | Yes · search, get_video |
| CLI | ytapis-cli (npm) | Published · v2.0.0 | Needs override |
| MCP server | ytapis-mcp (npm) | Published · v2.0.0 | Needs override |
| Dart / Flutter | dart pub add ytapis | Published on pub.dev | Not run here |
| Go | go get github.com/pgboyahpgr-commits/ytapis/go | Source folder in repo | Not run here |
| C# / .NET | dotnet add package Ytapis | Not found on NuGet | — |
| Kotlin / JVM | Maven coordinates from the repo | Not found on Maven Central | — |
| Rust | cargo add ytapis | Not found on crates.io | — |
| PHP | composer require geethudinoyt/ytapis | Not found on Packagist | — |
| C++ / Lua | Copy from the repo | Source in repo | Not run here |
“Not found” means the package name did not resolve at check time. If you have published under a different name, update this table, or tell us and we will fix the page.
ytapis-core
Verified on Node.js 20. Exports search, video, comments, transcript, channel and Shorts helpers, plus createClient for a shared cache and withRetry for backoff.
1 · Install
npm install ytapis-core2 · Use
import { search, getVideo, getVideoStats } from 'ytapis-core';
const { results } = await search('cats', { limit: 5 });
console.log(results[0].title, results[0].viewCount);
const video = await getVideo('dQw4w9WgXcQ');
console.log(video.title, video.isVerified);
const stats = await getVideoStats('dQw4w9WgXcQ');
console.log(stats.views, stats.likes);Run it with node search.mjs from a folder where you ran the install. Tested on 9 October 2026: search returned results, getVideo returned the right title, and stats came back as numbers.
More exports
Verified in the installed package:
Trending and transcript calls returned empty lists when we tested them. Handle the empty case (see Errors & limits).
ytapis
Returns typed objects, so you use video.view_count instead of parsing JSON. Also exports search_continue and search_dicts for raw dictionaries.
1 · Install
pip install ytapis2 · Use
from ytapis import search, get_video
for v in search("cats", limit=5):
print(v.title, "|", v.view_count, "|", v.duration)
video = get_video("dQw4w9WgXcQ")
print(video.title, video.is_verified)Tested on 9 October 2026 with Python 3.13. search returned a list of VideoResult objects, and get_video returned the expected title.
Signatures (verified)
search(query: str, limit: int = 15, gl=None, hl=None) -> list[VideoResult]
get_video(video_id: str) -> VideoResult
search_continue(continuation: str, limit: int = 15, ...) -> SearchResponse
search_dicts(query: str, limit: int = 15) -> list[dict]Some Python helpers from the README (get_comments, get_transcript) are not exported at the top level in 2.0.0, so this page leaves them out.
Working install for the CLI and MCP
Version 2.0.0 of both npm packages depends on ytapis-core@^1, which is missing functions such as getVideo. Pinning core to 2.0.0 with an npm overrides entry fixes both. We verified the result.
1 · Create a tools folder
{
"name": "ytapis-tools",
"private": true,
"overrides": {
"ytapis-core": "2.0.0"
}
}2 · Install both packages
npm install ytapis-cli@2.0.0 ytapis-mcp@2.0.03 · Try the CLI
npx ytapis search cats --limit 5npx ytapis video dQw4w9WgXcQVerified: search printed real results and video printed title, views and duration.
4 · Connect the MCP server
Add this to your MCP client config, such as Claude Desktop’s claude_desktop_config.json. Replace the path with the absolute path to your ytapis-tools folder.
{
"mcpServers": {
"ytapis": {
"command": "node",
"args": ["/absolute/path/to/ytapis-tools/node_modules/ytapis-mcp/dist/index.js"]
}
}
}Verified: the server starts with no import errors. We did not test it inside a live Claude Desktop session, so check the tool list after restarting the client.
ytapis on pub.dev
The package is published. The sample below comes from the README and was not run in our sandbox, so test it in your own project first.
dart pub add ytapisimport 'package:ytapis/ytapis.dart';
Future<void> main() async {
final results = await search('flutter tutorial', limit: 5);
final video = await getVideo('dQw4w9WgXcQ');
print(video.title);
}Go
The repository has a go/ folder with the client. We did not run the module in our sandbox, so use the README’s example as a starting point.
go get github.com/pgboyahpgr-commits/ytapis/goimport ytapi "github.com/pgboyahpgr-commits/ytapis/go"
results, _ := ytapi.Search("cats", "", "", 5)
for _, v := range results {
fmt.Println(v.Title)
}No SDK? No problem.
Every library wraps the HTTP endpoints. If your language has an HTTP client, you can use ytapis directly.
Python with requests
import requests
res = requests.get(
"https://ytapis.djalokyt27.workers.dev/",
params={"q": "coding", "limit": 5},
timeout=20,
)
res.raise_for_status()
for video in res.json():
print(video["title"])Any language, with curl
curl -s 'https://ytapis.djalokyt27.workers.dev/?q=coding&limit=5' | head -c 400Tip: always URL-encode query text. Use encodeURIComponent in JavaScript or the params argument in Python.