Pre-release demo

API Console

Test our API endpoints directly in your browser. Experiment with parameters, see responses, and understand how to integrate BeatConnect into your applications.

GET /api/v1/beats List all beats

Retrieves a paginated list of beats with filtering options.

Request Parameters

Authentication

200 OK 324ms
{
  "success": true,
  "data": [
    {
      "id": 1,
      "title": "Amapiano Summer",
      "producer": "KayzBeatz",
      "price": 29.99,
      "genre": {
        "id": 3,
        "name": "Amapiano",
        "slug": "amapiano"
      },
      "bpm": 110,
      "key": "C minor",
      "length": "3:24",
      "cover_image": "https://api.beatconnectafrica.com/images/covers/beat1.jpg",
      "audio_preview": "https://api.beatconnectafrica.com/audio/previews/beat1.mp3",
      "created_at": "2024-04-12T14:30:00Z"
    },
    {
      "id": 2,
      "title": "Lagos Nights",
      "producer": "AfroRhythm",
      "price": 34.99,
      "genre": {
        "id": 5,
        "name": "Afrobeats",
        "slug": "afrobeats"
      },
      "bpm": 105,
      "key": "G major",
      "length": "3:42",
      "cover_image": "https://api.beatconnectafrica.com/images/covers/beat2.jpg",
      "audio_preview": "https://api.beatconnectafrica.com/audio/previews/beat2.mp3",
      "created_at": "2024-04-10T09:15:00Z"
    }
  ],
  "meta": {
    "page": 1,
    "limit": 20,
    "total": 231
  }
}

Example Code

bash
curl -X GET "https://api.beatconnectafrica.com/v1/beats?sort=popular&limit=20" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Accept: application/json"
javascript
// Using fetch API
const fetchBeats = async () => {
  const response = await fetch('https://api.beatconnectafrica.com/v1/beats?sort=popular&limit=20', {
    method: 'GET',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Accept': 'application/json'
    }
  });

  const data = await response.json();
}

fetchBeats();
php
python
import requests

url = 'https://api.beatconnectafrica.com/v1/beats'
params = {
    'sort': 'popular',
    'limit': 20
}
headers = {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Accept': 'application/json'
}

response = requests.get(url, params=params, headers=headers)
data = response.json()
print(data)