Linux APIlinux.do ↗
Access Linux Do community forum topics and posts via API. List topics by recency, popularity, or activity; fetch full post threads by topic ID.
What is the Linux API?
The Linux Do API provides two endpoints for reading content from the linux.do community forum. list_topics returns paginated topic listings with up to 30 fields of metadata per topic — including view count, reply count, like count, tags, and author — while get_topic retrieves a topic's full post thread by numeric ID, including the rendered HTML body and plain-text content of each reply.
curl -X GET 'https://api.parse.bot/scraper/6ecb6344-4600-4a61-bd5f-b1e332b10473/list_topics?order=latest' \ -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 linux-do-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: Linux Do community forum — browse topics and read posts."""
from parse_apis.linux_do_api import LinuxDo, Order, TopicNotFound
client = LinuxDo()
# List the hottest topics, capped at 5 total items.
for topic in client.topics.list(order=Order.HOT, limit=5):
print(topic.title, f"views={topic.views}", f"likes={topic.like_count}")
# Find the most recent topic and drill into its posts.
latest = client.topics.list(order=Order.LATEST, limit=1).first()
if latest is not None:
# Fetch full detail (includes posts) using the discovered id.
try:
detail = client.topics.get(topic_id=str(latest.id))
except TopicNotFound:
print("Topic was removed before we could fetch it")
detail = None
if detail is not None:
print(detail.title, f"replies={detail.reply_count}", detail.created_at)
if detail.post_items:
for post in detail.post_items[:3]:
print(f" #{post.post_number} by {post.username}: {post.text[:80]}")
# Filter by category (e.g. category_id "4" for 开发调优).
for topic in client.topics.list(order=Order.TOP, category_id="4", limit=3):
print(topic.title, f"replies={topic.reply_count}", "tags:", topic.tags)
print("exercised: topics.list (hot / latest / top + category) / topics.get")
List community topics sorted by the chosen order. Returns up to 30 topics per page (50 for top/daily). Supports pagination via the page parameter (0-indexed). Each topic includes metadata such as title, view count, reply count, like count, tags, author, and timestamps. When category_id is provided, results are scoped to that category; category_id values appear in every topic record's category_id field.
| Param | Type | Description |
|---|---|---|
| page | integer | 0-indexed page number for pagination. |
| order | string | Topic listing order. |
| category_id | string | Numeric category ID to filter topics. Obtained from the category_id field in topic records (e.g. 4 for 开发调优, 14 for 资源荟萃). |
{
"type": "object",
"fields": {
"page": "current page number",
"count": "number of topics returned in this page",
"topics": "array of topic objects with id, title, slug, category_id, tags, created_at, last_posted_at, views, reply_count, like_count, posts_count, pinned, closed, author, excerpt, url",
"has_more": "boolean indicating whether more pages are available"
},
"sample": {
"page": 0,
"count": 30,
"topics": [
{
"id": 2731016,
"url": "https://linux.do/t/topic/2731016",
"slug": "topic",
"tags": [
"公告"
],
"title": "FIX: 修复了服务器过于流畅的问题",
"views": 28583,
"author": "neo",
"closed": false,
"pinned": true,
"excerpt": "经常在社区活跃的佬友都知道…",
"created_at": "2026-08-10T07:30:14.802Z",
"like_count": 4311,
"category_id": 2,
"posts_count": 585,
"reply_count": 37,
"last_posted_at": "2026-08-14T06:13:42.756Z"
}
],
"has_more": true
}
}About the Linux API
Topic Listing
The list_topics endpoint returns an array of topic objects sorted by your chosen order parameter. Supported orders cover recency, popularity, and activity. Each page returns up to 30 topics (50 for top/daily orderings), and pagination is 0-indexed via the page parameter. Each topic object carries id, title, slug, category_id, tags, created_at, last_posted_at, views, reply_count, like_count, and a posts_count field. The has_more boolean tells you whether additional pages exist. Filter by forum section using the category_id parameter — category IDs are available from the category_id field on any returned topic (for example, 4 for 开发调优).
Topic Content
The get_topic endpoint accepts a required topic_id (numeric, sourced from list_topics) and an optional 1-indexed page parameter. Page 1 always begins with post number 1 (the original post), followed by replies in post_number order. Each post object includes id, post_number, username, display_name, created_at, updated_at, reply_to_post_number (null for the original post), and both a rendered HTML body and a plain-text rendering of the content. The response also surfaces topic-level fields: title, slug, tags, views, closed status, and the canonical url.
Pagination and Coverage
Both endpoints paginate independently. list_topics uses 0-indexed pages; get_topic uses 1-indexed pages. The count field on each response tells you how many records were returned in that page. The forum is a Chinese-language Linux and open-source technology community, so the majority of topic content and tags are in Chinese.
The Linux API is a managed, monitored endpoint for linux.do — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when linux.do 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 linux.do 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?+
- Track trending topics in a specific linux.do category by polling
list_topicswith acategory_idfilter and sorting bylike_count. - Build a read-only mirror or archive of linux.do threads using
get_topicto retrieve the HTML body of each post. - Monitor forum activity for a set of topic IDs by comparing
reply_countandlast_posted_atacross periodic calls tolist_topics. - Extract tag co-occurrence patterns across topics using the
tagsarray returned by both endpoints. - Identify the most-viewed discussions by paginating
list_topicswith a popularity order and sorting byviews. - Feed community discussion summaries into a newsletter by pulling
title,tags, and post plain-text fromget_topic. - Detect closed topics using the
closedboolean inget_topicto filter out threads no longer accepting replies.
| 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 linux.do have an official developer API?+
How does category filtering work in list_topics?+
category_id parameter. You obtain valid category IDs from the category_id field on any topic object returned by list_topics. For example, category 4 corresponds to 开发调优. Category IDs are stable across pages and can be reused across requests.Does get_topic return all posts in a thread in one call?+
posts_per_page setting. Use the 1-indexed page parameter to retrieve subsequent pages. The count field indicates how many posts were returned on the current page; when it is less than posts_per_page, you have reached the last page.Can I search for topics by keyword or filter by a specific username?+
category_id and sorting by order (recency, popularity, activity), but does not expose keyword search or per-user topic filtering. You can fork this API on Parse and revise it to add a search endpoint backed by the forum's search functionality.Are user profiles or private message data available?+
username, display_name) within topic threads, but does not include profile bios, follower counts, or trust levels. You can fork this API on Parse and revise it to add a user profile endpoint if those fields are needed.