#What this API solves
One POST endpoint that proxies Popnable API and returns normalized JSON for search, trends, songs, artists, charts and YouTube videos. Use it when you need consistent data structures across multiple upstream calls, stable field names, predictable errors, and idempotent behavior suitable for caching.
#Endpoint & call model
#POST https://api.yeb.to/v1/music-popnable
- Best for: Unified access to Popnable data with opinionated normalization.
- How it works: You send an
actionplus its parameters; we call the corresponding Popnable v2 method and normalize the response. - Idempotent: Same input → same output; safe for caching and retries.
- Billing: Each request costs a fixed amount of credits (see chip above), regardless of the
action.
#Quick start
# 1) Search (songs/artists) by keyword
curl -X POST "https://api.yeb.to/v1/music-popnable" \
-H "Content-Type: application/json" \
-d '{ "api_key": "YOUR_KEY", "action": "search", "keyword": "preslava" }'
# 2) Songs by trend (country/region) for a specific day
curl -X POST "https://api.yeb.to/v1/music-popnable" \
-H "Content-Type: application/json" \
-d '{ "api_key": "YOUR_KEY", "action": "get-songs-by-trend",
"trend": "35", "day": "2025-01-05", "stats": "yes", "charts": "daily,weekly" }'
# 3) YouTube videos (normalized + optional charts/daily breakdown)
curl -X POST "https://api.yeb.to/v1/music-popnable" \
-H "Content-Type: application/json" \
-d '{ "api_key": "YOUR_KEY", "action": "get-videos",
"yt_codes": "AbCdE123,ZXCV987", "charts": "daily,weekly",
"dailyStats": "yes", "day": "2025-01-05" }'
#Common parameters (used by all actions)
| Param | Required | What to pass (practical) | Why it matters |
|---|---|---|---|
api_key |
Yes | Send server-side or via edge; avoid exposing in browser code. | Auth & rate limiting. |
action |
Yes | One of: search, get-trends, get-songs, get-songs-by-trend,
get-artists, get-artist-by-trend, get-daily-chart,
get-weekly-chart, get-monthly-chart, get-artist-chart, get-videos. |
Selects the upstream Popnable v2 method. |
#Actions explained (what each one solves)
#action=search
Solves: quick lookup when you have a name fragment and need likely candidates (songs/artists).
| Param | Type | Req | Notes (practical) |
|---|---|---|---|
keyword | string | Yes | Short text (~20 chars). Use user input as-is (trimmed). |
{
"api_key": "YOUR_KEY",
"action" : "search",
"keyword": "preslava"
}
{
"data": [
{ "id": 123, "song_name": "Some Song", "trend_id": 35, "singers": [ { "singer_id": 777, "artist_name": "Preslava" } ] }
],
"meta": { "provider": "popnable", "upstream_response_code": 200, "endpoint": "search" }
}
#action=get-trends
Solves: obtain available trend IDs (countries/regions) to drive UI pickers or scheduled fetches.
| Param | Type | Req | Notes |
|---|---|---|---|
ids | string | No | Comma-separated list of trend IDs to filter; omit to fetch all (subject to provider rules). |
#action=get-songs
Solves: fetch details for known song IDs (e.g., to refresh a small cached set, or hydrate UI cards).
| Param | Type | Req | Notes |
|---|---|---|---|
ids | string | Yes | Comma-separated song IDs. |
stats | string | No | yes/no include Popnable stats. |
charts | string | No | Comma list, e.g. daily,weekly. |
#action=get-songs-by-trend
Solves: build daily feeds per country/region for discovery, newsletters, or archives.
| Param | Type | Req | Notes |
|---|---|---|---|
trend | string | Yes | Trend ID (country/region). |
day | string | Yes | Date YYYY-MM-DD. |
stats | string | No | yes/no. |
charts | string | No | e.g. daily,weekly,monthly. |
#action=get-artists
Solves: hydrate artist cards and detail pages from known IDs.
| Param | Type | Req | Notes |
|---|---|---|---|
ids | string | Yes | Comma-separated artist IDs. |
stats | string | No | yes/no include artist stats. |
charts | string | No | Chart type (usually artists). |
songs | string | No | yes/no include songs for each artist. |
#action=get-artist-by-trend
Solves: discover artists by country/region for a given day; useful for editorial picks.
| Param | Type | Req | Notes |
|---|---|---|---|
trend | string | Yes | Trend ID. |
day | string | Yes | Date YYYY-MM-DD. |
stats | string | No | yes/no. |
charts | string | No | Usually artists. |
songs | string | No | yes/no include songs. |
#Charts — daily/weekly/monthly/artist
Solves: pull historical chart snapshots for analytics, leaderboards, or recap posts.
| Action | Params | Notes |
|---|---|---|
get-daily-chart |
trend (string, req), day (YYYY-MM-DD, req) |
Country/region daily chart. |
get-weekly-chart |
trend (string, req), day (YYYY-MM-DD, req) |
Weekly chart snapshot. |
get-monthly-chart |
trend (string, req), day (YYYY-MM-DD, req) |
Monthly chart snapshot. |
get-artist-chart |
trend (string, req), day (YYYY-MM-DD, req) |
Artists chart for the given trend/day. |
#action=get-videos
Solves: normalize YouTube video data and optionally enrich with chart context and daily breakdowns.
| Param | Type | Req | Notes |
|---|---|---|---|
yt_codes | string | Yes | Comma-separated video codes (AbCdE123). |
charts | string | No | e.g. daily,weekly. |
dailyStats | string | No | yes/no include daily breakdown. |
day | string | No | Reference day YYYY-MM-DD. |
#Reading & acting on responses
{
"data": [
{
"id": 123,
"song_name": "Some Song",
"day_released": "2025-01-05 12:34:56",
"trend": "Bulgaria",
"trend_flag": "https://popnable.com/images/flags/circle/bg.svg",
"trend_id": 35,
"singers": [ { "singer_id": 777, "artist_name": "Preslava" } ],
"videos": [ { "yt_code": "AbCdE123" } ]
}
],
"meta": {
"provider": "popnable",
"upstream_response_code": 200,
"upstream_error_number": null,
"endpoint": "search"
}
}
data— normalized records. Use directly in UI and storage.meta.provider—popnablefor transparency/debug.meta.upstream_response_code— HTTP-equivalent status from upstream.meta.endpoint— which upstream path we called (e.g.,songs/by-trend).
#Typical errors & how to fix
{ "error": "Missing \"action\" parameter", "code": 422 }
{ "error": "Missing or empty \"ids\"", "code": 422 }
{ "error": "Popnable: Access Denied.", "code": 403 }
- 422 missing/invalid: Ensure required params for the chosen
actionare present and non-empty. - 401 invalid key: Rotate your YEB key; call only from server/edge.
- 502 availability: Upstream temporarily unavailable; retry with backoff.
- 403 upstream denial: Access rules on provider side; validate your upstream configuration and inputs.
#Troubleshooting & field notes
- Dates: All
dayparams areYYYY-MM-DD. Keep a single timezone (prefer UTC) in your app. - Batching: For bulk imports, cap at ≤100 rps and reuse connections. Cache idempotent requests by full payload hash.
- Partial enrichment: Use
stats/charts/dailyStatsonly when needed to keep latency and cost predictable. - Stability: Field names are normalized; upstream changes are absorbed where possible and reflected in the Changelog below.
#API Changelog (latest changes)
meta.upstream_response_code now always set).
Hardened input validation messages for all actions.
dailyStats to get-videos. Unified day format across actions (YYYY-MM-DD).
singers and videos in song payloads. Deduplicated repeated fields.
search, get-trends, get-songs, get-songs-by-trend,
get-artists, get-artist-by-trend, get-daily-chart, get-weekly-chart,
get-monthly-chart, get-artist-chart, get-videos.