example-data.com
Menu
Browse docs and collections

songs

songs

Page 75 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": 1777,
      "albumId": 170,
      "artistId": 59,
      "title": "Knock On Wood",
      "slug": "knock-on-wood-1777",
      "trackNumber": 1,
      "durationSeconds": 457,
      "isExplicit": false,
      "playCount": 5293437,
      "createdAt": "2021-08-03T21:47:55.384Z"
    },
    {
      "id": 1778,
      "albumId": 170,
      "artistId": 59,
      "title": "I Want You Back",
      "slug": "i-want-you-back-1778",
      "trackNumber": 2,
      "durationSeconds": 466,
      "isExplicit": false,
      "playCount": 48988992,
      "createdAt": "2022-02-20T13:57:11.771Z"
    },
    {
      "id": 1779,
      "albumId": 170,
      "artistId": 59,
      "title": "God Bless America",
      "slug": "god-bless-america-1779",
      "trackNumber": 3,
      "durationSeconds": 203,
      "isExplicit": false,
      "playCount": 6181993,
      "createdAt": "2024-08-21T17:34:39.974Z"
    }
  ],
  "meta": {
    "page": 75,
    "limit": 24,
    "total": 2978,
    "totalPages": 125
  },
  "links": {
    "self": "/api/v1/songs?page=75&limit=24",
    "first": "/api/v1/songs?page=1&limit=24",
    "last": "/api/v1/songs?page=125&limit=24",
    "next": "/api/v1/songs?page=76&limit=24",
    "prev": "/api/v1/songs?page=74&limit=24"
  }
}