Browse docs and collections
Overview
songs / #1872
Component variants
Medium
I Will Survive
· 7 min
Small
I Will Survive Related
References
Request
curl example
curl -sS \ "https://example-data.com/api/v1/songs/1872" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/songs/1872" ); const song = await res.json();
TypeScript example
// Download once: mkdir -p types && curl -o types/songs.d.ts https://example-data.com/types/songs.d.ts
import type { Song } from "./types/songs";
const res = await fetch(
"https://example-data.com/api/v1/songs/1872"
);
const song = (await res.json()) as Song; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/songs/1872"
)
song = res.json() Response
{
"id": 1872,
"albumId": 178,
"artistId": 63,
"title": "I Will Survive",
"slug": "i-will-survive-1872",
"trackNumber": 4,
"durationSeconds": 446,
"isExplicit": false,
"playCount": 12276516,
"createdAt": "2023-03-24T14:49:09.698Z"
}