APPLE MUSIC API

Search

Retrieve search from Apple Music with a single API request.

GET/api/data/v1/apple-music/search
1credit base cost

Request parameters

Up to 1 credit

Search query

Result type to return. Use all, song, album, artist, playlist, station, music_video, or radio_episode.

Try in the console

Live requests use your prepaid balance. Cached responses cost zero where supported.

curl --request GET \
  --url 'https://fetchgoblin.com/api/data/v1/apple-music/search?query=taylor+swift' \
  --header 'x-api-key: YOUR_FETCHGOBLIN_API_KEY'

Response

Example
{
  "success": true,
  "data": {
    "query": "taylor swift",
    "type": "song",
    "results": [
      {
        "id": "1833328840",
        "kind": "song",
        "title": "The Fate of Ophelia",
        "artist_name": "Taylor Swift",
        "url": "https://music.apple.com/us/album/the-fate-of-ophelia/1833328839?i=1833328840",
        "duration_ms": 226000
      }
    ]
  },
  "credits_charged": 1,
  "credits_remaining": 1000,
  "request_id": "00000000-0000-4000-8000-000000000000"
}
Example data from the API specification. Run a request to retrieve current data.

Response shape

This schema describes the documented data shape. Some platform fields may be absent or null. The response also includes your FetchGoblin request ID and current credit balance.

View JSON Schema +
{
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean"
    },
    "data": {
      "type": "object",
      "properties": {
        "query": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "results": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "kind": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "artist_name": {
                "type": "string"
              },
              "url": {
                "type": "string"
              },
              "duration_ms": {
                "type": "integer"
              }
            }
          }
        }
      }
    },
    "credits_charged": {
      "type": "integer",
      "minimum": 0,
      "description": "FetchGoblin credits charged for this request."
    },
    "credits_remaining": {
      "type": "integer",
      "description": "Your FetchGoblin credit balance after this request."
    },
    "request_id": {
      "type": "string",
      "format": "uuid",
      "description": "FetchGoblin request identifier."
    }
  }
}