Youtube · Arazzo Workflow

YouTube Search Channel and Subscribe

Version 1.0.0

Search for a channel, confirm it exists, then subscribe the authenticated user to it.

1 workflow 3 source APIs 1 provider
View Spec View on GitHub GoogleMediaSocialStreamingVideoVideosArazzoWorkflows

Provider

youtube

Workflows

search-channel-subscribe
Find a channel by query and subscribe to it.
Searches for channels matching a query, resolves the first result to a full channel resource, and creates a subscription to that channel for the authenticated user.
3 steps inputs: apiKey, query outputs: channelId, channelTitle, subscriptionId
1
searchChannel
Search YouTube restricted to channel resources and capture the first channel id.
2
getChannel
Read the channel resource to confirm it exists before subscribing.
3
subscribe
Subscribe the authenticated user to the confirmed channel.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: YouTube Search Channel and Subscribe
  summary: Search for a channel, confirm it exists, then subscribe the authenticated user to it.
  description: >-
    A discover-then-act flow. It searches YouTube restricted to channel
    resources, confirms the top result by reading the channel resource, and then
    subscribes the authenticated user to that channel. Every step spells out its
    request inline so the flow can be read and executed without opening the
    underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: channelsApi
  url: ../openapi/youtube-channels-api-openapi.yml
  type: openapi
- name: searchApi
  url: ../openapi/youtube-search-api-openapi.yml
  type: openapi
- name: subscriptionsApi
  url: ../openapi/youtube-subscriptions-api-openapi.yml
  type: openapi
workflows:
- workflowId: search-channel-subscribe
  summary: Find a channel by query and subscribe to it.
  description: >-
    Searches for channels matching a query, resolves the first result to a full
    channel resource, and creates a subscription to that channel for the
    authenticated user.
  inputs:
    type: object
    required:
    - apiKey
    - query
    properties:
      apiKey:
        type: string
        description: The Google API key used to authorize each YouTube Data API request.
      query:
        type: string
        description: The query term used to find a channel.
  steps:
  - stepId: searchChannel
    description: Search YouTube restricted to channel resources and capture the first channel id.
    operationId: youtube.search.list
    parameters:
    - name: part
      in: query
      value: snippet
    - name: q
      in: query
      value: $inputs.query
    - name: type
      in: query
      value: channel
    - name: maxResults
      in: query
      value: 5
    - name: key
      in: query
      value: $inputs.apiKey
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      channelId: $response.body#/items/0/id/channelId
  - stepId: getChannel
    description: Read the channel resource to confirm it exists before subscribing.
    operationId: youtube.channels.list
    parameters:
    - name: part
      in: query
      value: snippet,statistics
    - name: id
      in: query
      value: $steps.searchChannel.outputs.channelId
    - name: key
      in: query
      value: $inputs.apiKey
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      channelTitle: $response.body#/items/0/snippet/title
  - stepId: subscribe
    description: Subscribe the authenticated user to the confirmed channel.
    operationId: youtube.subscriptions.insert
    parameters:
    - name: part
      in: query
      value: snippet
    - name: key
      in: query
      value: $inputs.apiKey
    requestBody:
      contentType: application/json
      payload:
        snippet:
          resourceId:
            kind: youtube#channel
            channelId: $steps.searchChannel.outputs.channelId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      subscriptionId: $response.body#/id
  outputs:
    channelId: $steps.searchChannel.outputs.channelId
    channelTitle: $steps.getChannel.outputs.channelTitle
    subscriptionId: $steps.subscribe.outputs.subscriptionId

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/youtube-search-channel-subscribe-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.