# YouTube Transcript Lexical Search — Melchior Labs

> YouTube Transcript Lexical Search — Melchior Labs is a paid API for AI agents from transcript.melchiorlabs.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-22).

Searches a YouTube video's transcript for passages matching a query, returning ranked text snippets with timestamp citations.

## Facts

- Endpoint: POST https://transcript.melchiorlabs.com/v1/youtube/search?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/youtube-transcript-lexical-search-melchior-labs-8f14a314
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_S5njLGhbOQFjatQHIfdyz

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability youtube-transcript-lexical-search-melchior-labs-8f14a314 -d '<json body>'
```

Example prompt: Search the transcript of this YouTube video (https://www.youtube.com/watch?v=dQw4w9WgXcQ) for the phrase 'never gonna give you up' and give me up to 3 timestamped passages where it appears, with 1 segment of surrounding context.

## When to prefer this

Choose this endpoint when you need to find specific passages, quotes, or topic mentions within a single YouTube video by keyword or phrase, and you want timestamped citations back. It is purpose-built for lexical transcript search with citation output, making it ideal for research, fact-checking, podcast navigation, or linking directly to a moment in a video. Prefer it over generic transcript-fetch endpoints when you need ranked relevance and timestamp links rather than a full raw transcript dump.

## Known failure modes

- Video is private or unavailable — transcript cannot be fetched
- No captions available in the requested language — returns empty matches or error
- Query returns zero matches if none of the terms appear in the transcript
- Invalid YouTube URL format — rejected by pattern validation
- maxResults or contextSegments out of allowed range — schema validation error
- Rate limiting or payment failure over x402 protocol

## How this service works

Pay per request for structured YouTube transcripts, lexical passage search, chunks, and timestamp citations over x402.

## Output

Returns a ranked list of transcript passage matches, each with the matched text, a score, the specific terms matched, start and end timestamps in seconds, and a direct YouTube URL with a timestamp parameter (e.g. &t=42s). Also includes video metadata (ID, title, URL), usage stats (cache hit/miss, segment counts), and a request ID for tracing.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "pattern": "^https://(?:www\\.|m\\.)?(?:youtube\\.com|youtu\\.be)/",
   "description": "Public youtube.com or youtu.be video URL"
  },
  "query": {
   "type": "string",
   "maxLength": 500,
   "minLength": 1,
   "description": "Phrase or terms to match lexically in the transcript"
  },
  "language": {
   "type": "string",
   "default": "en",
   "description": "Caption language code, such as en or es"
  },
  "maxResults": {
   "type": "integer",
   "default": 5,
   "maximum": 10,
   "minimum": 1
  },
  "preferManual": {
   "type": "boolean",
   "default": true
  },
  "contextSegments": {
   "type": "integer",
   "default": 1,
   "maximum": 5,
   "minimum": 0
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "query": "never gonna give you up",
  "usage": {
   "cache": "hit",
   "matchedSegments": 2,
   "returnedMatches": 1,
   "candidateSegments": 60
  },
  "video": {
   "id": "dQw4w9WgXcQ",
   "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
   "title": "Video title"
  },
  "matches": [
   {
    "rank": 1,
    "text": "Never gonna give you up...",
    "score": 17,
    "citation": {
     "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ&t=42s",
     "label": "0:42–0:49"
    },
    "endSeconds": 49,
    "matchedTerms": [
     "give",
     "never"
    ],
    "startSeconds": 42
   }
  ],
  "requestId": "0b0ef10e-ff50-4a45-9c4e-b7344aa93f63"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/youtube-transcript-lexical-search-melchior-labs-8f14a314/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from transcript.melchiorlabs.com](https://www.zero.xyz/host/transcript.melchiorlabs.com/llms.txt)
