example-data.com
Menu
Browse docs and collections

songs

songs

Page 16 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": 361,
      "albumId": 33,
      "artistId": 15,
      "title": "(You Keep Me) Hangin' On",
      "slug": "you-keep-me-hangin-on-361",
      "trackNumber": 9,
      "durationSeconds": 352,
      "isExplicit": false,
      "playCount": 5441701,
      "createdAt": "2022-02-05T04:29:19.428Z"
    },
    {
      "id": 362,
      "albumId": 33,
      "artistId": 15,
      "title": "I Got You (I Feel Good)",
      "slug": "i-got-you-i-feel-good-362",
      "trackNumber": 10,
      "durationSeconds": 193,
      "isExplicit": false,
      "playCount": 14670490,
      "createdAt": "2024-11-08T17:20:35.406Z"
    },
    {
      "id": 363,
      "albumId": 33,
      "artistId": 15,
      "title": "Baby Come Back",
      "slug": "baby-come-back-363",
      "trackNumber": 11,
      "durationSeconds": 191,
      "isExplicit": false,
      "playCount": 9009730,
      "createdAt": "2023-08-08T22:14:00.630Z"
    }
  ],
  "meta": {
    "page": 16,
    "limit": 24,
    "total": 2978,
    "totalPages": 125
  },
  "links": {
    "self": "/api/v1/songs?page=16&limit=24",
    "first": "/api/v1/songs?page=1&limit=24",
    "last": "/api/v1/songs?page=125&limit=24",
    "next": "/api/v1/songs?page=17&limit=24",
    "prev": "/api/v1/songs?page=15&limit=24"
  }
}