ximalaya.com APIximalaya.com ↗
Access Ximalaya audio content via API: browse categories, fetch album and track metadata, search by keyword, retrieve comments, and pull user profiles.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/6306b7e5-8c54-4f86-ba68-c4aaf14e4300/get_categories' \ -H 'X-API-Key: $PARSE_API_KEY'
Get all content categories available on Ximalaya. Returns a list of category objects with IDs, names, and display titles.
No input parameters required.
{
"type": "object",
"fields": {
"ret": "integer status code (200 for success)",
"data": "object containing 'categories' array of category objects with id, name, title, categoryType, orderNum, parentId, isDisplay"
},
"sample": {
"data": {
"ret": 200,
"data": {
"categories": [
{
"id": 2,
"name": "music",
"title": "音乐",
"orderNum": 4,
"parentId": 0,
"isDisplay": true,
"categoryType": 0
},
{
"id": 3,
"name": "book",
"title": "有声书",
"orderNum": 1,
"parentId": 0,
"isDisplay": true,
"categoryType": 0
}
]
}
},
"status": "success"
}
}About the ximalaya.com API
The Ximalaya API provides 7 endpoints covering China's largest podcast and audiobook platform, returning structured data across categories, albums, tracks, comments, and user profiles. With get_album_tracks you can retrieve paginated track listings including duration, play counts, pricing flags, and comment totals. Album-level detail via get_album_info includes subscription counts, anchor identity, and pay-gating status.
Categories and Album Discovery
The get_categories endpoint returns a flat list of all top-level and nested content categories, each carrying id, name, title, categoryType, parentId, orderNum, and isDisplay fields. Once you have a category name in pinyin format (verified values include youshengshu, yinyue, ertong, xiangsheng), get_category_albums returns a paginated list of albums sorted by popularity, with per-album fields such as albumId, coverPath, anchorName, isPaid, isFinished, and track counts.
Album Detail and Track Listings
get_album_info accepts a numeric album_id and returns nested album metadata under albumPageMainInfo: albumTitle, cover, playCount, subscribeCount, shortIntro, isPaid, and anchor details. get_album_tracks adds a sort_asc parameter (true / false) and paginates a list of track objects, each with trackId, title, duration, playtimes, likes, comments, isPaid, isFree, and price. Note that get_album_tracks returns ret: 0 on success, while several other endpoints signal success with ret: 200.
Comments and User Profiles
get_album_comments returns an albumScore, allCommentsCount, a scoreDiagram distribution, and a paginated list of comment objects with commentId, content, user info, likes, and reply counts. The optional order parameter accepts values like content-score-desc to sort by rating. get_user_info takes a numeric uid obtainable from album or track responses and returns nickName, cover, personalSignature, fansCount, gender, province, city, anchorGrade, and follower counts.
Search
search_albums accepts a query string supporting both Chinese characters and English, and returns an album.docs array with per-result fields including albumId, title, playCount, tracksCount, and anchor information. Pagination is available via page and page_size parameters.
- Build a catalog browser for Ximalaya audiobooks using
get_category_albumsfiltered to theyoushengshucategory. - Monitor subscription and play-count trends for specific albums by polling
get_album_infoover time. - Aggregate user ratings and comment sentiment for albums using
albumScoreandscoreDiagramfromget_album_comments. - Search Ximalaya's library by keyword with
search_albumsto surface relevant audio content for a recommendation engine. - Retrieve track-level pricing flags (
isPaid,isFree,price) fromget_album_tracksto map paid content distribution across categories. - Pull anchor profiles via
get_user_infousing UIDs from album responses to enrich creator datasets withfansCountandanchorGrade. - Cross-reference category hierarchy from
get_categorieswith album metadata to analyze content distribution byparentIdandcategoryType.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Ximalaya have an official developer API?+
How does the `get_album_tracks` endpoint handle sorting and pagination?+
sort_asc=true for ascending track order or sort_asc=false for descending. Use page and page_size to paginate. Each track object in the returned list includes trackId, title, duration, playtimes, likes, comments, isPaid, isFree, and price. A successful response returns ret: 0, unlike most other endpoints which return ret: 200.Can I retrieve individual track audio stream URLs through this API?+
trackId, duration, playtimes, and pricing flags, but does not expose audio stream URLs. You can fork this API on Parse and revise it to add an endpoint that returns playback URLs for specific track IDs.Are there limitations on which category names work with `get_category_albums`?+
category_name parameter requires pinyin format. Verified working values are youshengshu, yinyue, ertong, and xiangsheng. You can obtain the full set of valid category names and their IDs first by calling get_categories, then matching the name field from those results.Does the API cover track-level comments or only album-level comments?+
get_album_comments, which returns comment content, user identity, likes, reply counts, and score distribution for a given album_id. Track-level comments are not exposed. You can fork this API on Parse and revise it to add a track comments endpoint using a trackId as input.