example-data.com
Menu
Browse docs and collections

songs

songs

Page 117 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": 2785,
      "albumId": 265,
      "artistId": 94,
      "title": "Big Bad John",
      "slug": "big-bad-john-2785",
      "trackNumber": 2,
      "durationSeconds": 237,
      "isExplicit": false,
      "playCount": 48109226,
      "createdAt": "2024-12-29T12:57:42.962Z"
    },
    {
      "id": 2786,
      "albumId": 265,
      "artistId": 94,
      "title": "Love Shack",
      "slug": "love-shack-2786",
      "trackNumber": 3,
      "durationSeconds": 428,
      "isExplicit": false,
      "playCount": 1904588,
      "createdAt": "2023-04-28T01:10:57.117Z"
    },
    {
      "id": 2787,
      "albumId": 265,
      "artistId": 94,
      "title": "We Can Work it Out",
      "slug": "we-can-work-it-out-2787",
      "trackNumber": 4,
      "durationSeconds": 164,
      "isExplicit": false,
      "playCount": 6271412,
      "createdAt": "2024-04-03T03:56:00.065Z"
    }
  ],
  "meta": {
    "page": 117,
    "limit": 24,
    "total": 2978,
    "totalPages": 125
  },
  "links": {
    "self": "/api/v1/songs?page=117&limit=24",
    "first": "/api/v1/songs?page=1&limit=24",
    "last": "/api/v1/songs?page=125&limit=24",
    "next": "/api/v1/songs?page=118&limit=24",
    "prev": "/api/v1/songs?page=116&limit=24"
  }
}