AcFun APIlive.acfun.cn ↗
Access real-time AcFun Live stream data: titles, audience counts, likes, cover images, streamer stats, and categories via a single paginated endpoint.
What is the AcFun API?
The AcFun Live API exposes one endpoint — list_live_streams — that returns up to 100 live room records per page from live.acfun.cn, covering 10 fields per stream including title, current online audience count, like count, cover image URLs, and room URL. It supports category filtering and cursor-based pagination, making it straightforward to iterate through all currently broadcasting rooms or drill into a specific content category.
curl -X GET 'https://api.parse.bot/scraper/b5cd0a01-7190-4ca8-866e-32668d26cfda/list_live_streams?category=all' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace live-acfun-cn-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: AcFun Live Streams — browse what's currently broadcasting."""
from parse_apis.live_acfun_cn_api import AcfunLive, LiveCategory, InputFormatInvalid
client = AcfunLive()
# List all live streams across every category, capped at 10 items.
for stream in client.streams.list(limit=10):
print(stream.title, f"👤 {stream.author_name}", f"👁 {stream.online_count}")
# Filter to game streams and grab the top one.
try:
top_game = client.streams.list(category=LiveCategory.GAME, limit=1).first()
except InputFormatInvalid as e:
# Raised when the category value is rejected by the site.
print(f"Invalid category: {e.message}")
top_game = None
if top_game is not None:
print(
f"\nTop game stream: {top_game.title}",
f"\n Streamer: {top_game.author_name} ({top_game.author_fan_count} fans)",
f"\n Category: {top_game.category_name} / {top_game.type_name}",
f"\n Viewers: {top_game.online_count} Likes: {top_game.like_count}",
f"\n Room: {top_game.room_url}",
)
print("exercised: streams.list with category filter and default")
Returns the live streams currently broadcasting on AcFun Live, one record per live room, in the site's default ordering (most-watched first). Each record carries the stream title, poster/cover image URLs, the internal stream name, current online audience count, like count, the streamer's id/name/signature/avatar/fan and following counts, the content type and category labels, the stream start time (Unix milliseconds) and the room URL. Optional category narrows the list to one of the homepage category tabs; omitted means all categories. Pagination is cursor-based over the site's stream: count (max 100, default 100) sets the page size, and when more streams exist the response carries next_cursor to pass back as pcursor for the following page; next_cursor is null and has_more is false on the last page. total_count is the site's count of live streams matching the category, independent of page size. At the time of writing the whole site had fewer than 100 concurrent streams, so a single default call usually returns everything. An empty streams list is a valid result when nobody in the category is live. One request per call.
| Param | Type | Description |
|---|---|---|
| count | integer | Page size; values above 100 are clamped to 100, values below 1 are rejected. |
| pcursor | string | Continuation cursor copied unchanged from next_cursor of the previous response. Omit for the first page. |
| category | string | Homepage category tab to filter by. Unrecognized values are rejected before any request. |
{
"type": "object",
"fields": {
"streams": "array of live stream records, one per live room currently broadcasting",
"has_more": "true when next_cursor is present",
"returned": "number of records in this page (integer)",
"next_cursor": "cursor for the next page, or null on the last page",
"total_count": "site-reported number of live streams matching the category (integer)",
"streams[].title": "stream title",
"streams[].live_id": "site identifier of this live session (string)",
"streams[].type_id": "content sub-type id (integer)",
"streams[].portrait": "true when the stream is portrait-oriented",
"streams[].room_url": "public URL of the live room",
"streams[].author_id": "streamer user id (string); also the room id in room_url",
"streams[].panoramic": "true when the stream is 360°/panoramic",
"streams[].type_name": "content sub-type label (Chinese)",
"streams[].like_count": "likes received in this live session (integer)",
"streams[].poster_url": "primary poster/cover image URL (thumbnail-sized)",
"streams[].author_name": "streamer display name",
"streams[].category_id": "top-level category id (integer)",
"streams[].poster_urls": "all poster/cover image URLs offered by the site (array of strings)",
"streams[].stream_name": "internal stream name of the broadcast (string, kszt_ prefixed)",
"streams[].online_count": "current live audience (viewers online) count (integer)",
"streams[].author_gender": "site gender code (integer; -1 = unset)",
"streams[].category_name": "top-level category label (Chinese)",
"streams[].has_fans_club": "true when the streamer has a fan club",
"streams[].start_time_ms": "stream start time, Unix epoch milliseconds (integer)",
"streams[].author_location": "streamer self-reported location (province,city) or null",
"streams[].author_fan_count": "streamer follower count (integer)",
"streams[].author_signature": "streamer profile bio text",
"streams[].author_avatar_url": "streamer avatar image URL",
"streams[].author_following_count": "number of users the streamer follows (integer)",
"streams[].author_contribute_count": "number of uploads by the streamer (integer)"
},
"sample": {
"data": {
"streams": [
{
"title": "来咯!",
"live_id": "d2xxZJg1eWc",
"type_id": 102,
"portrait": false,
"room_url": "https://live.acfun.cn/live/366012",
"author_id": "366012",
"panoramic": false,
"type_name": "网游",
"like_count": 501,
"poster_url": "https://js-live.static.yximgs.com/bs2/ztlc/cover_d2xxZJg1eWc_raw.jpg?imageView2/1/w/198/h/111",
"author_name": "按钮",
"category_id": 1,
"poster_urls": [
"https://js-live.static.yximgs.com/bs2/ztlc/cover_d2xxZJg1eWc_raw.jpg?imageView2/1/w/198/h/111",
"https://ali-live.static.yximgs.com/bs2/ztlc/cover_d2xxZJg1eWc_raw.jpg"
],
"stream_name": "kszt_yiQxcdkPwWs",
"online_count": 51,
"author_gender": 1,
"category_name": "游戏直播",
"has_fans_club": true,
"start_time_ms": 1789349066930,
"author_location": "湖南,长沙",
"author_fan_count": 1685,
"author_signature": "专注潜水5年~~~",
"author_avatar_url": "https://tx-free-imgs.acfun.cn/content/2020_6_23/1.5928498431176252E9.png?imageView2/1/w/40/h/40|imageslim",
"author_following_count": 28,
"author_contribute_count": 41
}
],
"has_more": false,
"returned": 14,
"next_cursor": null,
"total_count": 14
},
"status": "success"
}
}About the AcFun API
What the API Returns
The list_live_streams endpoint returns an array of live room records for streams currently broadcasting on AcFun Live, ordered by audience size (most-watched first). Each record in streams[] includes title, live_id (the site's session identifier), room_url, portrait (orientation flag), type_id (content sub-type), and the current online audience count and like count. The response envelope provides total_count (the site-reported total matching the filter), returned (records on this page), has_more, and next_cursor.
Filtering and Pagination
Pass a category string to the list_live_streams endpoint to restrict results to a specific homepage tab. Unrecognized category values are rejected before any request is made. Page size is controlled by count (clamped to a maximum of 100). To paginate, copy next_cursor from one response into the pcursor parameter of the next call; omit pcursor on the first request. When has_more is false or next_cursor is null, you have reached the last page.
Coverage and Freshness
All records reflect streams that are live at the moment of the request — there is no historical or VOD data in the response. The total_count field gives a site-reported snapshot of how many rooms match the current category filter, but this number can shift between paginated requests as streams start or end. Portrait vs. landscape orientation is indicated per-record via the boolean portrait field, which is useful for layout decisions in aggregator UIs.
The AcFun API is a managed, monitored endpoint for live.acfun.cn — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when live.acfun.cn changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official live.acfun.cn API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Build a real-time dashboard tracking AcFun Live audience counts across all active rooms
- Monitor which content categories (
type_id) draw the largest live audiences at any given time - Aggregate cover images and
room_urllinks for a third-party live stream directory - Track like counts alongside audience counts to surface engagement-to-viewership ratios
- Page through all live rooms using cursor pagination to build a full snapshot for analysis
- Filter streams by category to surface niche content tabs not visible on the AcFun homepage
- Detect portrait-oriented streams (
portrait: true) for mobile-first content curation tools
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 200 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
| Team | $300/mo | 20,000 | 300 req/min |
| Company | $1,000/mo | 100,000 | 500 req/min |
Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does AcFun have an official developer API?+
What does the `list_live_streams` endpoint actually return for each room?+
streams[] array includes the room's title, live_id, room_url, portrait orientation flag, type_id sub-category integer, current online audience count, and like count, along with poster/cover image URLs. The response envelope also reports total_count, has_more, next_cursor, and returned.Does pagination stay consistent as streams start and stop during a crawl?+
total_count is a site-reported snapshot that can shift mid-pagination. Treat each page as an independent point-in-time sample rather than a stable sorted set.Does the API return individual streamer profile data or follower counts?+
list_live_streams endpoint returns per-room audience and like counts but does not expose detailed streamer profile fields such as follower counts, account bio, or historical stream stats. You can fork this API on Parse and revise it to add a streamer profile endpoint if those fields are needed.