API Documentation

Build powerful integrations with the ONLYDJS API. Access tracks, user data, and more programmatically.

Quick Start

1. Get API Key

Sign up for a free account and generate your API key from the dashboard.

2. Make Request

Use your API key to authenticate and start making requests to our endpoints.

3. Build Amazing

Integrate ONLYDJS data into your apps, tools, and workflows.

Authentication

All API requests require authentication using an API key. Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Keep your API key secure and never expose it in client-side code. Use environment variables or secure key management systems.

Base URL

https://api.onlydjs.com

All endpoints are relative to this base URL. For example: https://api.onlydjs.com/api/tracks

Rate Limits

To ensure fair usage and platform stability, we enforce the following rate limits:

  • Free Tier: 100 requests per hour
  • Pro Tier: 1,000 requests per hour
  • Enterprise: Custom limits (contact us)

Rate limit information is included in response headers: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset

Example Request

curl -X GET "https://api.onlydjs.com/api/tracks?genre=Tech%20House&limit=10" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Endpoints

GET/api/tracks

Get a list of tracks with optional filtering

Parameters

genrestring

Filter by genre

bpmnumber

Filter by BPM

limitnumber

Number of results (default: 20)

offsetnumber

Pagination offset

Response

{
  "tracks": [
    {
      "id": "123",
      "title": "Summer Vibes",
      "artist": "DJ Leo Zam",
      "genre": "Tech House",
      "bpm": 128,
      "key": "Am",
      "coverUrl": "https://...",
      "audioUrl": "https://...",
      "downloads": 1234,
      "createdAt": "2026-02-15T10:00:00Z"
    }
  ],
  "total": 500,
  "limit": 20,
  "offset": 0
}
GET/api/tracks/:id

Get detailed information about a specific track

Parameters

idstringrequired

Track ID

Response

{
  "id": "123",
  "title": "Summer Vibes",
  "artist": "DJ Leo Zam",
  "artistId": "user_456",
  "genre": "Tech House",
  "subgenre": "Melodic",
  "bpm": 128,
  "key": "Am",
  "duration": 360,
  "coverUrl": "https://...",
  "audioUrl": "https://...",
  "waveformUrl": "https://...",
  "downloads": 1234,
  "plays": 5678,
  "likes": 890,
  "price": 4.99,
  "tags": ["summer", "melodic", "festival"],
  "createdAt": "2026-02-15T10:00:00Z"
}
POST/api/tracks/upload

Upload a new track (requires authentication)

Parameters

filefilerequired

Audio file (WAV or MP3)

titlestringrequired

Track title

genrestringrequired

Genre

coverfile

Cover image

Response

{
  "success": true,
  "trackId": "123",
  "message": "Track uploaded successfully",
  "analysisStatus": "processing"
}
GET/api/users/:username

Get public profile information for a DJ

Parameters

usernamestringrequired

DJ username

Response

{
  "id": "user_456",
  "username": "djleozam",
  "displayName": "DJ Leo Zam",
  "bio": "Tech House producer from Miami",
  "avatarUrl": "https://...",
  "coverUrl": "https://...",
  "stats": {
    "tracks": 45,
    "downloads": 12345,
    "followers": 678,
    "totalEarnings": 5432.10
  },
  "socials": {
    "instagram": "djleozam",
    "soundcloud": "djleozam"
  },
  "joinedAt": "2025-01-15T10:00:00Z"
}

Need Help?

If you have questions about the API or need assistance with integration, we're here to help.