Last updated
Changeloglobste.rs API
HealthyRead-onlyStructured data from lobste.rs. Generated from lobste.rs.
/comment1 credit per callComment
A single comment by its short id (from /c/<short_id>): text (html and plain), author, score, depth, parent, url.
Authorization: Bearer <key> on every request.Parameters
Response fields
short_idcreated_atlast_edited_atis_deletedis_moderatedscoreflagsparent_commentcommentcomment_plaindepthcommenting_usershort_id_urlurlfetched_atagecurl "https://api.maviapi.com/v1/sites/lobste/comment?short_id=yds6tc" \-H "Authorization: Bearer $MAVI_KEY"
{
"short_id": "string",
"created_at": "string",
"last_edited_at": "string",
"is_deleted": false,
"is_moderated": false,
"score": 0,
"flags": 0,
"parent_comment": null,
"comment": "string",
"comment_plain": "string",
"depth": 0,
"commenting_user": "string",
"short_id_url": "string",
"url": "string",
"fetched_at": "string",
"age": 0
}Get all the data, no code
Collect every page of GET /comment into a dataset, for one request or for a whole list of them, then download it as CSV or JSON. A page costs the same as one call of the endpoint; the download is free.
Use lobste.rs API from Claude, ChatGPT and your coding tools
Add this URL as a custom connector and sign in to maviapi. Nothing to install.
https://mcp.maviapi.com/mcpOr run it locally, with each endpoint of lobste.rs API as its own tool:
claude mcp add maviapi -e MAVIAPI_TOOLS=lobste -- npx -y '@maviapi/mcp'Import lobste.rs API into Postman and other tools
How to importPaste a link into Postman, Insomnia, an agent framework or a no-code tool to get every endpoint with its parameters and response fields. The link always serves the current endpoints, so importing it again picks up new ones.
- OpenAPI 3.1
https://api.maviapi.com/v1/apis/lobste/openapi.json - Postman
https://api.maviapi.com/v1/apis/lobste/postman.json
The Postman collection sends the shared demo key until you put your own key in its maviapi_key variable.
Build with the lobste.rs API
Choose a starting endpoint
- Comment
GET /commentA single comment by its short id (from /c/<short_id>): text (html and plain), author, score, depth, parent, url.
Parameters and response fields for GET /comment
Request parameters Name Type / location Required Description short_id string / query No Response fields Field Type Description short_id string created_at string last_edited_at string is_deleted boolean is_moderated boolean score integer flags integer parent_comment null comment string comment_plain string depth integer commenting_user string short_id_url string url string fetched_at string age integer - Domain Stories
GET /domain_storiesStories linking to a domain (e.g. github.com). page: 1-based.
Parameters and response fields for GET /domain_stories
Request parameters Name Type / location Required Description domain string / query No page integer / query No - Recent Comments
GET /recent_commentsMost recent comments across the site (the /comments page), newest first. page: 1-based. Each: short_id, commenting_user, score, created_at, story_short_id, story_title, comment (html), comment_plain, url.
Parameters and response fields for GET /recent_comments
Request parameters Name Type / location Required Description page integer / query No - Search
GET /searchSearch stories or comments, returning {query, what, order, page, total, results}.
Parameters and response fields for GET /search
Request parameters Name Type / location Required Description q string / query No query (supports lobste.rs syntax such as tag:rust, domain:github.com, submitter:name, "phrases"). what string / query No 'stories' or 'comments'. order: 'newest', 'relevance' or 'score'. page: 1-based (20 results per page). order string / query No page integer / query No Response fields Field Type Description query string what string order string page integer total integer results object[] results[].short_id string results[].title string results[].url string results[].score integer results[].tags string[] results[].domain string results[].submitter_user string results[].created_at string results[].comment_count integer results[].description_excerpt string results[].comments_url string pagination object pagination.count integer pagination.has_more boolean pagination.next_cursor string fetched_at string age integer - Stories
GET /storiesFront-page story listings. Each story: short_id, title, url, score, flags, comment_count, description, submitter_user, tags, created_at, comments_url.
Parameters and response fields for GET /stories
Request parameters Name Type / location Required Description list string / query No 'hottest' (front page), 'newest' or 'active'. page: 1-based page (25 stories per page). page integer / query No - Story
GET /storyStory detail with its full comment tree (flat list; use depth / parent_comment to rebuild threads).
Parameters and response fields for GET /story
Request parameters Name Type / location Required Description short_id string / query No the id in /s/<short_id>/... URLs. Response fields Field Type Description short_id string created_at string title string url string score integer flags integer comment_count integer description string description_plain string submitter_user string user_is_author boolean tags string[] comments object[] comments[].short_id string comments[].created_at string comments[].last_edited_at string comments[].is_deleted boolean comments[].is_moderated boolean comments[].score integer comments[].flags integer comments[].parent_comment null comments[].comment string comments[].comment_plain string comments[].depth integer comments[].commenting_user string comments[].short_id_url string comments[].url string short_id_url string comments_url string pagination object pagination.count integer pagination.has_more boolean pagination.next_cursor null fetched_at string age integer - Tag Stories
GET /tag_storiesStories carrying a tag (e.g. rust, programming, security). Several tags can be comma-separated. page: 1-based.
Parameters and response fields for GET /tag_stories
Request parameters Name Type / location Required Description tag string / query No page integer / query No - Tags
GET /tagsAll tags with description, category, and whether they are media/privileged/active.
- User
GET /userPublic profile of a user: created_at, karma, about, homepage, invited_by, admin/moderator flags, etc.
Parameters and response fields for GET /user
Request parameters Name Type / location Required Description username string / query No Response fields Field Type Description username string created_at string is_admin boolean is_moderator boolean about string avatar_url string invited_by_user string github_username string mastodon_username string fetched_at string age integer - User Stories
GET /user_storiesStories submitted by a user, newest first. page: 1-based.
Parameters and response fields for GET /user_stories
Request parameters Name Type / location Required Description username string / query No page integer / query No
Export lobste.rs data to CSV
Each list below downloads as a CSV file with one row per record. Collect it into a dataset with "Get all the data, no code" under the console above. The dataset reads the list page by page, and you download it as CSV, JSON or JSONL.
| List | CSV columns |
|---|---|
SearchGET /search | short_id, title, url, score, tags, domain, submitter_user, created_at, comment_count, description_excerpt, comments_url |
StoryGET /story | short_id, created_at, last_edited_at, is_deleted, is_moderated, score, flags, parent_comment, comment, comment_plain, depth, commenting_user, short_id_url, url |
A nested value (a list or an object) is written as JSON in one cell. How datasets and exports work
lobste.rs API questions
What you get, what it costs and how to call it.
Is there an official lobste.rs API?
This lobste.rs API is not official. It is an independent, hosted API from maviapi for the public data on lobste.rs, and it is not made, endorsed or supported by lobste.rs. Whether lobste.rs offers a developer API of its own is a question for lobste.rs. This one is ready to call with a maviapi key, and every endpoint and field it returns is documented on this page.
What data can I get from the lobste.rs API?
The lobste.rs API has 10 endpoints. Each returns JSON with the parameters and fields documented above:
- GET
/comment: A single comment by its short id (from /c/<short_id>): text (html and plain), author, score, depth, parent, url. - GET
/domain_stories: Stories linking to a domain (e.g. - GET
/recent_comments: Most recent comments across the site (the /comments page), newest first. - GET
/search: Search stories or comments, returning {query, what, order, page, total, results}. - GET
/stories: Front-page story listings. - GET
/story: Story detail with its full comment tree (flat list; use depth / parent_comment to rebuild threads). - GET
/tag_stories: Stories carrying a tag (e.g. - GET
/tags: All tags with description, category, and whether they are media/privileged/active. - GET
/user: Public profile of a user: created_at, karma, about, homepage, invited_by, admin/moderator flags, etc. - GET
/user_stories: Stories submitted by a user, newest first.
How much does the lobste.rs API cost?
Calls are paid in credits from your maviapi plan, and only successful calls are charged. Every endpoint of this API costs 1 credit per call. On the Basic plan ($19 a month for 25,000 credits), 1,000 calls cost about $0.76. Failed calls are free. The Free plan gives you 1,000 credits a month, with no credit card required. See plans and credit prices for everything after that.
How do I call the lobste.rs API?
Send an HTTPS request to the endpoint with your API key in the Authorization header. For example, GET /comment:
curl 'https://api.maviapi.com/v1/sites/lobste/comment' \
-H "Authorization: Bearer $MAVI_KEY"Create a key on your API keys page, or try any endpoint first in the console above with the free test key.
What are the ways to get lobste.rs data as JSON?
Each way to get lobste.rs data as JSON fits a different need:
- Your own scraper: Full control and no vendor, but the parsing, the blocked requests and the repairs after every change on lobste.rs are yours. Better for a one-off pull from a page that rarely changes.
- Apify: A marketplace of Actors you run, where input, output and price are set by each Actor. Better when an Actor already returns what you need, or you want to host your own code. See maviapi vs Apify.
- RapidAPI: A hub of APIs added by many providers, called with one RapidAPI key and priced per API. Better when you already use the hub and one of its APIs covers what you need. Source: RapidAPI docs.
- maviapi: The lobste.rs API on this page: 10 documented endpoints, a published response schema and one key for the whole catalog. Better when this data is part of your product and you do not want to maintain a scraper.
What happens when lobste.rs changes its layout?
Your code does not change. maviapi keeps the lobste.rs API working when lobste.rs changes its pages, so you keep calling the same endpoints and get JSON in the shape documented here. See its current health on the status page and what changed in its changelog.
Will an update break my lobste.rs API integration?
No. An endpoint you use never changes shape: new fields, optional parameters and endpoints are added beside it, and a change that would break a call ships as a new endpoint. Ignore response fields you do not know, and follow the changelog for what is new.
Related APIs
- Tripadvisor API
Trip-planning data from Tripadvisor: geo search plus attractions, restaurants and hotels by location (geo_id), with…
- Eventbrite API
Events listed on Eventbrite for a city and date range: dates, venue with address and coordinates, image and summary…
- Songkick Concerts API
Upcoming concerts and music festivals in any city from Songkick, for a date window, with venues, performers, prices…