Lemmy hub

Lemmy User Posts API

One user's posts by time or a time-window top, with the profile reference attached.

GET /v1/lemmy/user/posts

1 credit Failed requests are free

About this endpoint

GET /v1/lemmy/user/posts?instance=lemmy.ml&username=dessalines&sort=New returns data.user as a profile reference, data.posts as post rows and data.page as the paging state. Each post carries its community, author, score, votes, comment count and timestamps. Ask by username, local or user@host.

This route returns the user's posts only; use the user comments route for their comments. Sort options are New, Old and the time-window tops. The instance does not return a total, so a full page means there may be more.

Lemmy User Posts API FAQ

Which sorts are available?

New, Old and the Top windows from hour through year.

Does this include the comments?

No. This route returns only the user's posts. Use the user comments route for their comments.

How do I page through a user's posts?

Follow page.nextCursor with the same username and sort while page.hasMore is true. The cursor is tied to those filters.

How many credits does a user posts page cost?

Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged: that field is the billing source of truth. Each paginated page is a separate billed request.