example-data.com
Menu
Browse docs and collections

songs

songs

Page 71 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": 1681,
      "albumId": 160,
      "artistId": 55,
      "title": "I Can Help",
      "slug": "i-can-help-1681",
      "trackNumber": 10,
      "durationSeconds": 238,
      "isExplicit": false,
      "playCount": 21338896,
      "createdAt": "2022-02-01T22:17:09.049Z"
    },
    {
      "id": 1682,
      "albumId": 160,
      "artistId": 55,
      "title": "Roll With It",
      "slug": "roll-with-it-1682",
      "trackNumber": 11,
      "durationSeconds": 446,
      "isExplicit": false,
      "playCount": 47142649,
      "createdAt": "2022-02-21T13:43:11.408Z"
    },
    {
      "id": 1683,
      "albumId": 160,
      "artistId": 55,
      "title": "Foolish Games",
      "slug": "foolish-games-1683",
      "trackNumber": 12,
      "durationSeconds": 108,
      "isExplicit": false,
      "playCount": 26432474,
      "createdAt": "2024-07-03T10:04:13.069Z"
    }
  ],
  "meta": {
    "page": 71,
    "limit": 24,
    "total": 2978,
    "totalPages": 125
  },
  "links": {
    "self": "/api/v1/songs?page=71&limit=24",
    "first": "/api/v1/songs?page=1&limit=24",
    "last": "/api/v1/songs?page=125&limit=24",
    "next": "/api/v1/songs?page=72&limit=24",
    "prev": "/api/v1/songs?page=70&limit=24"
  }
}