API Documentation

Access Rating BD data programmatically through our REST API

v1Base URL:https://rating.lonesock.pro/api

Overview

The Rating BD API provides access to channel rankings, artist popularity scores, content metrics, and leaderboard data. All responses are in JSON format.

Quick Start

# Get top channels
curl "https://rating.lonesock.pro/api/v1/leaderboards/channels?period=daily"

# Get channel details
curl "https://rating.lonesock.pro/api/v1/channels/{id}"

# Search content
curl "https://rating.lonesock.pro/api/v1/content?search=natok"

Authentication

The public API endpoints do not require authentication. Rate limits apply to prevent abuse.

Admin endpoints require authentication and are not documented here. Contact us for admin API access.

Channels

GET/v1/channels

List all tracked channels with pagination

Parameters

pagenumberPage number (default: 1)
pageSizenumberItems per page (default: 20, max: 100)
searchstringSearch by name or handle
GET/v1/channels/{id}

Get detailed information about a specific channel

Parameters

iduuidrequiredChannel ID

Artists

GET/v1/artists

List all tracked artists

Parameters

pagenumberPage number (default: 1)
pageSizenumberItems per page (default: 20)
searchstringSearch by name or alias
GET/v1/artists/{id}

Get detailed information about an artist

Parameters

iduuidrequiredArtist ID

Content

GET/v1/content

List content items with filtering

Parameters

pagenumberPage number (default: 1)
pageSizenumberItems per page (default: 20)
channelIduuidFilter by channel
categorystringFilter by category slug
searchstringSearch by title
GET/v1/content/{id}

Get detailed content information with metrics

Parameters

iduuidrequiredContent ID

Leaderboards

GET/v1/leaderboards/{type}

Get ranked leaderboard data

Parameters

typestringrequiredchannels, artists, or content
periodstringdaily or weekly (default: daily)
categorystringFilter by category slug (content only)
datestringSpecific date (YYYY-MM-DD)

Rate Limits

To ensure fair usage and availability, the API enforces rate limits:

EndpointLimitWindow
All endpoints100 requestsper minute
Search endpoints30 requestsper minute

Rate limit headers are included in all responses:X-RateLimit-Limit,X-RateLimit-Remaining,X-RateLimit-Reset