# Lobsters API

Lobsters is a computing-focused community where members submit links and discuss them. The API reads stories from the front page, the newest page and any tag page, one story by its link, every comment on a story, and a user's public profile.

A story's ID is the short code in its link, as in `https://lobste.rs/s/5kmyma`; `url` takes the link or the bare code. `upvote_count` is the net score, upvotes minus downvotes, because the site does not show the two separately. `links` holds the links submitted with the story, and `url` is the story's discussion page on Lobsters. Story lists come 25 to a page.

- Request: POST https://api.everyinfra.com/api/v1/social with `{"platform": "lobsters", "action": "<action>", "params": {...}}`
- Canonical page: [https://everyinfra.com/en/lobsters-api](https://everyinfra.com/en/lobsters-api?utm_medium=ai_doc&utm_campaign=page_md)
- Each capability uses the price recorded in the public catalog. The response includes the amount charged. Authentication failures, invalid parameters, failed calls, and empty results are not charged.

## Actions

### trending — Trending
List the stories on the Lobsters front page in the site's order, 25 per page, each with `title`, `url`, `links`, `upvote_count`, `comment_count`, `tags`, `author_username`, `posted_at` and `rank`. Each page is one call; send the response's `next_page_token` as `page_token` to get the next one.
- Sync delivery · Price: $0.79 per 1,000 requests
- Each call returns one page of up to 25 rows; for the next page, pass the response's top-level next_page_token as page_token. limit is accepted and has no effect.
- Parameters:
  - `page_token` (optional): Page token for `trending`, `latest_posts` and `tag_posts`. Leave it out for the first page, then pass back the previous response's `next_page_token` exactly as received, keeping `tag` the same on `tag_posts`. Pages hold up to 25 stories and each is one call; the last page has no `next_page_token`.
- Returns fields: id, url, title, text, upvote_count, comment_count, author_username, tags, links, posted_at, rank, collected_at, platform
- Capability page: [https://everyinfra.com/en/lobsters-api/trending](https://everyinfra.com/en/lobsters-api/trending?utm_medium=ai_doc&utm_campaign=page_md) (Markdown: https://everyinfra.com/en/lobsters-api/trending.md)

### latest_posts — Latest posts
List the stories on the Lobsters newest page, 25 per page, with the same fields as the front page. Paging works the same way: `next_page_token` goes back in as `page_token`, one call per page.
- Sync delivery · Price: $0.79 per 1,000 requests
- Each call returns one page of up to 25 rows; for the next page, pass the response's top-level next_page_token as page_token. limit is accepted and has no effect.
- Parameters:
  - `page_token` (optional): Page token for `trending`, `latest_posts` and `tag_posts`. Leave it out for the first page, then pass back the previous response's `next_page_token` exactly as received, keeping `tag` the same on `tag_posts`. Pages hold up to 25 stories and each is one call; the last page has no `next_page_token`.
- Returns fields: id, url, title, text, upvote_count, comment_count, author_username, tags, links, posted_at, rank, collected_at, platform
- Capability page: [https://everyinfra.com/en/lobsters-api/latest_posts](https://everyinfra.com/en/lobsters-api/latest_posts?utm_medium=ai_doc&utm_campaign=page_md) (Markdown: https://everyinfra.com/en/lobsters-api/latest_posts.md)

### tag_posts — Tag posts
List the Lobsters stories under one tag, such as `programming` or `rust`, 25 per page, with the same fields as the front page. To read further, keep `tag` and pass `next_page_token` as `page_token`; every page is a separate call.
- Sync delivery · Price: $0.79 per 1,000 requests
- Each call returns one page of up to 25 rows; for the next page, pass the response's top-level next_page_token as page_token. limit is accepted and has no effect.
- Parameters:
  - `tag` (required): A Lobsters tag name such as `programming` or `rust`, the part after `/t/` in a tag page link. Case does not matter.
  - `page_token` (optional): Page token for `trending`, `latest_posts` and `tag_posts`. Leave it out for the first page, then pass back the previous response's `next_page_token` exactly as received, keeping `tag` the same on `tag_posts`. Pages hold up to 25 stories and each is one call; the last page has no `next_page_token`.
- Returns fields: id, url, title, text, upvote_count, comment_count, author_username, tags, links, posted_at, rank, collected_at, platform
- Capability page: [https://everyinfra.com/en/lobsters-api/tag_posts](https://everyinfra.com/en/lobsters-api/tag_posts?utm_medium=ai_doc&utm_campaign=page_md) (Markdown: https://everyinfra.com/en/lobsters-api/tag_posts.md)

### post_detail — Post details
Read one Lobsters story from its link or short code in `url`: `title`, `url`, `links`, `text` when the story has its own text, `upvote_count`, `comment_count`, `tags`, `author_username` and `posted_at`. Comments come from `comments`.
- Sync delivery · Price: $0.79 per 1,000 requests
- Parameters:
  - `url` (required): A Lobsters story link such as `https://lobste.rs/s/5kmyma`, with or without the title part, or just the short code `5kmyma`. Other forms are rejected before any charge.
- Returns fields: id, url, title, text, upvote_count, comment_count, author_username, tags, links, posted_at, collected_at, platform
- Capability page: [https://everyinfra.com/en/lobsters-api/post_detail](https://everyinfra.com/en/lobsters-api/post_detail?utm_medium=ai_doc&utm_campaign=page_md) (Markdown: https://everyinfra.com/en/lobsters-api/post_detail.md)

### comments — Comments
Read every comment on one Lobsters story in a single call, in page order, each with `text`, `text_html`, `author_username`, `upvote_count`, `depth`, `parent_id`, `posted_at` and `rank`. `parent_id` names the comment being replied to, and `post_comment_count` is the story's comment count. There is no paging.
- Sync delivery · Price: $0.79 per 1,000 requests
- Parameters:
  - `url` (required): A Lobsters story link such as `https://lobste.rs/s/5kmyma`, with or without the title part, or just the short code `5kmyma`. Other forms are rejected before any charge.
  - `limit` (optional): Positive integer (≥1): the maximum number of results to return; omit it to get every result from this call. Setting it only trims the response to at most this many and never fetches more; billing is the same with or without `limit`, whatever the value.
- Returns fields: id, post_id, text, text_html, posted_at, author_username, upvote_count, depth, parent_id, rank, post_comment_count, collected_at, platform
- Capability page: [https://everyinfra.com/en/lobsters-api/comments](https://everyinfra.com/en/lobsters-api/comments?utm_medium=ai_doc&utm_campaign=page_md) (Markdown: https://everyinfra.com/en/lobsters-api/comments.md)

### profile — Profiles
Read one Lobsters user's public profile from a `username` or profile link: `username`, `url`, `display_name` and `avatar_url`, plus `bio`, `joined_at` and `post_count` when the profile shows them.
- Sync delivery · Price: $0.79 per 1,000 requests
- Parameters:
  - `username` (required): A Lobsters username such as `jcs`, or a profile link such as `https://lobste.rs/u/jcs`. Other forms are rejected before any charge.
- Returns fields: username, url, display_name, avatar_url, bio, joined_at, post_count, collected_at, platform
- Capability page: [https://everyinfra.com/en/lobsters-api/profile](https://everyinfra.com/en/lobsters-api/profile?utm_medium=ai_doc&utm_campaign=page_md) (Markdown: https://everyinfra.com/en/lobsters-api/profile.md)

## Lobsters API questions

### What can I retrieve with the Lobsters API?

Set `platform` to `lobsters`. The current catalog lists trending, latest posts, tag posts, post details, comments, and more. These action names identify different Lobsters objects or views; they are not interchangeable search modes.

### Which input starts the Lobsters `trending` request?

The `trending` action has no required business input. Send the platform and action identifiers, plus only the optional parameters you need.

### Which fields can Lobsters `trending` return?

Its declared schema includes `title`, `text`, `upvote_count`, and `comment_count`. A declared field can still be absent from an individual record, and every other action has its own field list.

### Does every Lobsters action return immediately?

Actions labeled asynchronous return a job ID you poll. Every other action can also run asynchronously: add `"mode": "async"` to the request body to receive a job ID immediately, useful for slow tasks or large limits. The current catalog contains sync delivery.

## Also

- Machine catalog (no key): https://everyinfra.com/openapi.json · GET /api/v1/social/catalog?platform=lobsters
- API guide for AI clients: https://everyinfra.com/llms.txt · agents guide: https://everyinfra.com/agents.md
