YouTube Content ID API Code Samples

  • This page lists code samples for the YouTube Data API (v3) in .NET, PHP, and Python.

  • PHP samples cover uploading and monetizing videos, managing asset labels, and uploading references, including versions for service account authorization.

  • Python samples provide examples for creating, managing, and using asset labels, as well as creating assets and claiming videos.

  • Both .NET and Python provide code samples for retrieving a content owner's managed channels using the channels.list method.

The lists below identify the code samples available for the YouTube Data API (v3):

.NET

  1. Retrieve a content owner's managed channels (channels.list)

PHP

  1. Upload and monetize a video (service account authorization)
  2. Upload and monetize a video
  3. Create, manage, and use asset labels
  4. Upload a reference (service account authorization)
  5. Upload a reference
  6. Retrieve a content owner's managed channels (service account authorization)

Python

  1. Create, manage, and use asset labels (assetLabels.insert)
  2. Create an asset; upload and claim a video (assets.insert)
  3. Retrieve a content owner's managed channels (channels.list)