example-data.com
Menu
Browse docs and collections

songs

songs

Page 47 of 125.

Overview

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/songs?limit=25"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/songs?limit=25"
);
const { data, meta } = 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, ListEnvelope } from "./types/songs";

const res = await fetch(
  "https://example-data.com/api/v1/songs?limit=25"
);
const { data, meta } = (await res.json()) as ListEnvelope<Song>;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/songs",
    params={"limit": 25},
)
data = res.json()

Response

{
  "data": [
    {
      "id": 1105,
      "albumId": 105,
      "artistId": 40,
      "title": "Be My Baby",
      "slug": "be-my-baby-1105",
      "trackNumber": 7,
      "durationSeconds": 243,
      "isExplicit": false,
      "playCount": 38399169,
      "createdAt": "2024-05-05T13:05:38.181Z"
    },
    {
      "id": 1106,
      "albumId": 105,
      "artistId": 40,
      "title": "Eight Days a Week",
      "slug": "eight-days-a-week-1106",
      "trackNumber": 8,
      "durationSeconds": 169,
      "isExplicit": true,
      "playCount": 33238373,
      "createdAt": "2025-01-22T00:02:52.320Z"
    },
    {
      "id": 1107,
      "albumId": 105,
      "artistId": 40,
      "title": "I Wanna Dance With Somebody (Who Loves Me)",
      "slug": "i-wanna-dance-with-somebody-who-loves-me-1107",
      "trackNumber": 9,
      "durationSeconds": 364,
      "isExplicit": false,
      "playCount": 35597646,
      "createdAt": "2022-07-15T18:02:39.783Z"
    }
  ],
  "meta": {
    "page": 47,
    "limit": 24,
    "total": 2978,
    "totalPages": 125
  },
  "links": {
    "self": "/api/v1/songs?page=47&limit=24",
    "first": "/api/v1/songs?page=1&limit=24",
    "last": "/api/v1/songs?page=125&limit=24",
    "next": "/api/v1/songs?page=48&limit=24",
    "prev": "/api/v1/songs?page=46&limit=24"
  }
}