Browse docs and collections
Overview
songs / #1408
Component variants
Medium
Over the Rainbow
· 3 min
Small
Over the Rainbow Related
References
Request
curl example
curl -sS \ "https://example-data.com/api/v1/songs/1408" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/songs/1408" ); 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/1408"
);
const song = (await res.json()) as Song; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/songs/1408"
)
song = res.json() Response
{
"id": 1408,
"albumId": 133,
"artistId": 49,
"title": "Over the Rainbow",
"slug": "over-the-rainbow-1408",
"trackNumber": 8,
"durationSeconds": 199,
"isExplicit": true,
"playCount": 49832150,
"createdAt": "2024-08-02T17:56:46.479Z"
}