YouTube Music Spell Check API

When YouTube Music corrects a misspelled query, or suggests another spelling, the correction is in search_information.


The API endpoint is https://serpapi.com/search?engine=youtube_music

Head to the playground for a live and interactive demo.

API examples

Results for q: beyonse

YouTube Music shows the results for beyonce instead. search_information has the original query in query_displayed, and the corrected query in spelling_fix and showing_results_for.

Results for q: beyonse

JSON Example

{
  ...
  "search_information": {
    "results_state": "Some results for exact spelling but showing fixed spelling",
    "query_displayed": "beyonse",
    "spelling_fix": "beyonce",
    "showing_results_for": "beyonce"
  },
  "top_result": {
    "type": "artist",
    "title": "Beyoncé",
    "link": "https://music.youtube.com/channel/UCoPQ_TWm8JZ5nJv4a5BzSWA",
    "channel": {
      "name": "Beyoncé",
      "channel_id": "UCoPQ_TWm8JZ5nJv4a5BzSWA",
      "link": "https://music.youtube.com/channel/UCoPQ_TWm8JZ5nJv4a5BzSWA",
      "serpapi_youtube_channel_link": "https://serpapi.com/search.json?channel_id=UCoPQ_TWm8JZ5nJv4a5BzSWA&engine=youtube_channel",
      "audience": "347M monthly audience",
      "extracted_audience": 347000000
    },
    "thumbnail": "https://lh3.googleusercontent.com/GAR8Y4xuTIBIrOr0GPSPdhPc-aRvUCOXwiC0O75cKSP7uRoHFvb20K2ZwpaZwxp2IcSoXGBiAgjit-BC=w120-h120-p-l90-rj",
    ...
  },
  ...
}

Results for q: metalica

The results are for metalica, and the spelling that YouTube Music suggests is in spelling_fix.

Results for q: metalica

JSON Example

{
  ...
  "search_information": {
    "results_state": "Showing results for exact spelling despite spelling suggestion",
    "spelling_fix": "metallica"
  },
  "top_result": {
    "type": "artist",
    "title": "Metallica",
    "link": "https://music.youtube.com/channel/UCGexNm_Kw4rdQjLxmpb2EKw",
    "channel": {
      "name": "Metallica",
      "channel_id": "UCGexNm_Kw4rdQjLxmpb2EKw",
      "link": "https://music.youtube.com/channel/UCGexNm_Kw4rdQjLxmpb2EKw",
      "serpapi_youtube_channel_link": "https://serpapi.com/search.json?channel_id=UCGexNm_Kw4rdQjLxmpb2EKw&engine=youtube_channel",
      "audience": "74.2M monthly audience",
      "extracted_audience": 74200000
    },
    "thumbnail": "https://yt3.googleusercontent.com/VqJfYEB0WmZ8sQ4VIP-hlrZYqsOs12NN-VtCFcTFOi9XRqbiZ4Zhb0JZ2d3-fzIctoMR7raDHFeyNoYa=w120-h120-p-l90-rj",
    ...
  },
  ...
}

JSON structure overview

{
  ...
  "search_information": {
    "results_state": "String - State of the results",
    // Supported values:
    // - `Results for exact spelling`
    // - `Some results for exact spelling but showing fixed spelling`
    // - `Showing results for exact spelling despite spelling suggestion`

    "query_displayed": "String - Original query, when YouTube Music shows results for the fixed spelling",
    "spelling_fix": "String - Spelling fix from 'Did you mean' or directly fixed search",
    "showing_results_for": "String - Directly fixed search",
  },
  ...
}