example-data.com
Menu
Browse docs and collections

Overview

songs / #2087

Till I Waltz Again With You

Component variants

Related

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/songs/2087" \
  -H "Accept: application/json"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/songs/2087"
);
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/2087"
);
const song = (await res.json()) as Song;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/songs/2087"
)
song = res.json()

Response

{
  "id": 2087,
  "albumId": 196,
  "artistId": 70,
  "title": "Till I Waltz Again With You",
  "slug": "till-i-waltz-again-with-you-2087",
  "trackNumber": 6,
  "durationSeconds": 479,
  "isExplicit": false,
  "playCount": 27178767,
  "createdAt": "2024-08-15T19:24:14.797Z"
}