Scority

YouTube Transcript API Authentication

Authenticate Scority API requests with the x-api-key header from trusted server-side code.

Header

Use x-api-key

Every request to the production Transcript API must include an API key in the x-api-key header.

  • Keep API keys in server-side environment variables.
  • Do not expose API keys in frontend JavaScript, browser apps, public repositories or mobile app bundles.
  • Use one key per customer, environment or integration when you need usage separation.
  • Contact Scority support for key rotation, revocation or quota changes.

curl

curl "https://api.scority.ai/v1/youtube/transcript?video_id=dQw4w9WgXcQ" \
  -H "x-api-key: YOUR_API_KEY"

Server-side JavaScript

const response = await fetch(
  "https://api.scority.ai/v1/youtube/transcript?video_id=dQw4w9WgXcQ",
  {
    headers: {
      "x-api-key": process.env.SCORITY_API_KEY
    }
  }
)

const transcript = await response.json()

Python

import os
import requests

response = requests.get(
    "https://api.scority.ai/v1/youtube/transcript",
    params={"video_id": "dQw4w9WgXcQ"},
    headers={"x-api-key": os.environ["SCORITY_API_KEY"]},
    timeout=30,
)

transcript = response.json()
401

Common unauthorized causes

  • The x-api-key header is missing.
  • The key was copied incorrectly.
  • The key has been revoked.
  • The request is calling the web app instead of https://api.scority.ai.
Guides

Related authentication references

If you are comparing Google YouTube API keys with Scority API keys, read the guide that separates official Google credentials from Scority x-api-key authentication.

Guide

YouTube API Key Guide

Learn when you need a Google Cloud key and how Scority API keys work for transcript extraction.

Open →
OpenAPI

OpenAPI security scheme

Inspect the x-api-key header definition in the machine-readable API contract.

Open →
OAuth

Without OAuth

Learn when Google OAuth is required and when Scority x-api-key auth is enough.

Open →
Raw API keys are shown only when created. Scority stores API key hashes, not raw keys. If a key is lost or exposed, rotate it through the operator flow instead of trying to recover it.