Skip to main content
The Taylor Swift API is a public REST API. There’s no SDK to install, no API key to generate, and no account to create. You only need a way to make HTTP requests. Base URL: https://taylor-swift-api.sarbo.workers.dev
1

Make your first request

Run this command to fetch all albums:
curl https://taylor-swift-api.sarbo.workers.dev/albums
You’ll get back a JSON array of every album in the catalog:
[
  {
    "album_id": 1,
    "title": "1989",
    "release_date": "2014-10-27"
  },
  {
    "album_id": 2,
    "title": "Taylor Swift",
    "release_date": "2006-10-24"
  },
  {
    "album_id": 3,
    "title": "Fearless",
    "release_date": "2008-11-11"
  },
  {
    "album_id": 4,
    "title": "Speak Now",
    "release_date": "2010-10-25"
  }
]
Each album has an album_id you’ll use to fetch its songs in the next step.
2

Get songs for an album

Use an album_id from the previous response to fetch all songs on that album. For example, to get the songs on 1989 (album ID 1):
curl https://taylor-swift-api.sarbo.workers.dev/albums/1
The response is an array of songs on that album:
[
  {
    "song_id": 1,
    "title": "Blank Space",
    "album_id": 1
  },
  {
    "song_id": 2,
    "title": "Style",
    "album_id": 1
  },
  ...
]
Each song has a song_id you’ll use to fetch its full lyrics.
3

Fetch lyrics for a song

Use a song_id to retrieve the complete lyrics for that song. For example, to get the lyrics for Blank Space (song ID 1):
curl https://taylor-swift-api.sarbo.workers.dev/lyrics/1
The response contains the song title and full lyrics as a single string:
{
  "song_id": 1,
  "song_title": "Blank Space",
  "lyrics": "Nice to meet you, where you been?\nI could show you incredible things\nMagic, madness, heaven, sin\nSaw you there and I thought\nOh my God, look at that face\nYou look like my next mistake\nLove's a game, wanna play?\n..."
}
4

Try the random lyrics endpoint (optional)

You can fetch a set number of random lyric paragraphs — useful for placeholder text or sampling the catalog without targeting a specific song:
curl "https://taylor-swift-api.sarbo.workers.dev/lyrics?numberOfParagraphs=2&shouldRandomizeLyrics=true"
{
  "lyrics": [
    "He says he doesn't believe anything much he hears these days\nHe says, \"Why fall in love, just so you can watch it go away?\"\nHe spends most of his nights wishing it was how it used to be\nHe spends most of his flights getting pulled down by gravity",
    "All this time I didn't know\nYou were breaking down\nI'd fall to pieces on the floor\nIf you weren't around\nToo young to know it gets better\nI'll be summer sun for you forever\nForever winter if you go"
  ],
  "numParagraphs": 2
}
Set shouldRandomizeLyrics=false (or omit it) to get paragraphs in sequential order starting from the first song.

All endpoints at a glance

MethodEndpointDescription
GET/albumsList all albums
GET/albums/{albumID}List songs on a specific album
GET/songsList all songs
GET/songs/{songID}Get a single song
GET/lyrics/{songID}Get full lyrics for a song
GET/lyrics?numberOfParagraphs={n}&shouldRandomizeLyrics={bool}Get N paragraphs of lyrics

Next steps

API reference

Full endpoint documentation with all parameters and response schemas.

Browse albums

Learn how to work with the albums endpoint in depth.

Build docs developers (and LLMs) love