YouTube (Data API v3)

Lightweight, dependency-free, in-memory fake of the YouTube Data API v3 for testing code that reads channels/videos, searches, and manages playlists.

Default port: 4803

Quick start

import { YoutubeServer } from "./services/youtube/src/server.js";

const server = new YoutubeServer(4803);
await server.start();
// ... run your app/tests ...
await server.stop();

Point your client (or raw fetch) at http://127.0.0.1:4803. Auth is via a ?key= query parameter (API key) or Authorization: Bearer <token> (OAuth):

const channels = await fetch(
  "http://127.0.0.1:4803/youtube/v3/channels?part=snippet,statistics&mine=true&key=parlel"
).then((r) => r.json());
// channels.items[0].snippet.title

Implemented operations

Routes are under /youtube/v3/.... Auth via ?key= query OR Authorization: Bearer <token>. Responses use the { kind, etag, items: [], pageInfo: { totalResults, resultsPerPage } } shape. State is in-memory and ephemeral.

Service & inspection operations (parlel extensions)

Access via MCP / preview URL

When run inside a Daytona sandbox, this HTTP service is auto-exposed at the sandbox's preview URL. Send requests to the preview URL with the x-daytona-preview-token header to reach the service from outside the sandbox. The MCP layer surfaces the same endpoints described above.

Surface coverage

This emulator faithfully replicates the API surface most application code and agents exercise. Anything below the supported lines is either an intentional design choice for a fast, zero-cost local emulator (✓ By design) or a candidate for a future release (⟳ Roadmap) — never a silent inaccuracy.

Legend: ✅ fully supported · ◐ accepted (stored, not strictly enforced) · ✓ by design · ⟳ on the roadmap.

FeatureStatus
Channels list (mine=true)✅ Supported
Videos list (by id)✅ Supported
Search✅ Supported (returns seeded videos)
Playlists create✅ Supported
PlaylistItems list✅ Supported
?key= and Bearer auth✅ Supported
Key/token validity / quota enforcement✓ By design — Never throttles — local tests run at full speed, zero cost
Video upload (videos.insert)⟳ Roadmap
Real search ranking / pagination tokens◐ Single page; seeded results
Comments / captions / live streaming⟳ Roadmap
<!-- parlel:testenv:start -->

Configuration — test.env

Copy these into your test.env (used by the bridge sidecar flow). Tokens are Parlel's seeded test credentials — any non-empty value is accepted by the emulator, so you rarely need to change them. Swap in real credentials only when pointing at the live service in prod.env.

YOUTUBE_API_KEY=parlel
YOUTUBE_ACCESS_TOKEN=parlel
YOUTUBE_BASE_URL=http://parlel-bridge:4803
<!-- parlel:testenv:end -->