Overview
The Insights API provides focused, domain-specific analytics endpoints for content creators. These endpoints offer comprehensive analytics data, charts, and export capabilities.
Base URL: https://open.beatpass.ca/api/v1/producer-intelligence/insights
All Insights endpoints require authentication. Include your Bearer token in the Authorization header.
Track Insights
Get Track Analytics
Retrieve comprehensive analytics for a track including plays, engagement, and performance metrics.
curl "https://open.beatpass.ca/api/v1/producer-intelligence/insights/tracks/123" \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_TOKEN_HERE"
Parameters:
Parameter Type Required Description trackIdinteger Yes Track ID periodstring No Time period: 7-days, 30-days, 90-days, 1-year. Default: 30-days
Response:
{
"success" : true ,
"data" : {
"plays" : { "total" : 1250 , "period" : 340 },
"listeners" : { "total" : 890 , "unique" : 456 },
"engagement" : { "likes" : 78 , "reposts" : 12 },
"growth" : { "plays_change" : 15.2 , "listeners_change" : 8.4 }
}
}
Get Track Charts
Retrieve chart data for visualizing track performance over time.
GET /api/v1/producer-intelligence/insights/tracks/{trackId}/charts?timeframe=30d
Parameters:
Parameter Type Description trackIdinteger Track ID timeframestring Chart timeframe: 7d, 30d, 90d, 1y
Get Real-Time Metrics
Get live metrics for a track (active listeners, recent plays).
GET /api/v1/producer-intelligence/insights/tracks/{trackId}/realtime
Album Insights
Get Album Analytics
Retrieve analytics for an album including aggregate track performance.
GET /api/v1/producer-intelligence/insights/albums/{albumId}?period=30-days
Parameters:
Parameter Type Required Description albumIdinteger Yes Album ID periodstring No Time period. Default: 30-days
Get Album Charts
GET /api/v1/producer-intelligence/insights/albums/{albumId}/charts?timeframe=30d
Artist Insights
Get Artist Analytics
Retrieve comprehensive analytics for an artist’s content.
GET /api/v1/producer-intelligence/insights/artists/{artistId}?period=30-days
Parameters:
Parameter Type Required Description artistIdinteger Yes Artist ID periodstring No Time period. Default: 30-days
Get Artist Charts
GET /api/v1/producer-intelligence/insights/artists/{artistId}/charts?timeframe=30d
Get Collaboration Stats
Retrieve collaboration statistics and network data.
GET /api/v1/producer-intelligence/insights/artists/{artistId}/collaborations
Response:
{
"success" : true ,
"data" : {
"total_collaborations" : 15 ,
"top_collaborators" : [ ... ],
"collaboration_tracks" : [ ... ]
}
}
Export
List available export formats.
GET /api/v1/producer-intelligence/insights/export/formats
Response:
{
"success" : true ,
"formats" : [
{ "id" : "csv" , "name" : "CSV" , "description" : "..." },
{ "id" : "json" , "name" : "JSON" , "description" : "..." },
{ "id" : "pdf" , "name" : "PDF Report" , "description" : "..." }
]
}
Export to CSV
Export analytics data as CSV.
POST /api/v1/producer-intelligence/insights/export/csv
Content-Type: application/json
{
"type" : "tracks",
"period" : "30-days"
}
Export to JSON
Export analytics data as structured JSON.
POST /api/v1/producer-intelligence/insights/export/json
Content-Type: application/json
{
"type" : "tracks",
"period" : "30-days"
}
Generate Report
Generate a comprehensive analytics report.
POST /api/v1/producer-intelligence/insights/export/report
Content-Type: application/json
{
"period" : "30-days",
"include_charts" : true
}
Export PDF
Export the report as a PDF document.
POST /api/v1/producer-intelligence/insights/export/pdf
Content-Type: application/json
{
"period" : "30-days"
}
Error Responses
All Insights endpoints use standardized error responses:
Status Error Description 401 unauthorizedAuthentication required 403 forbiddenAccess denied to this resource 404 not_foundResource not found 422 validation_failedInvalid parameters 500 server_errorInternal server error
Example Error Response:
{
"success" : false ,
"message" : "Track not found" ,
"error" : "not_found"
}
Authentication Learn about API authentication.
Rate Limits Understand API rate limits and caching.