Lemmy hub

Lemmy Moderation Log API

Public removals, bans, locks, features and purges, with the object that was acted on.

GET /v1/lemmy/modlog

1 credit Failed requests are free

About this endpoint

GET /v1/lemmy/modlog?instance=lemmy.world&kind=ModRemovePost returns data.entries, newest first. Each entry has kind (the instance's own name, such as ModRemovePost, ModBan, AdminPurgePost or ModHideCommunity), at, reason, moderator, flags, expiresAt and subject, where subject holds the acted-on post, comment, community or person.

This log is where removed content survives: a removed post still appears with its title, URL and body, and a removed comment with its content. On some instances moderator is null because the instance hides moderator names. limit applies to each kind: with kind=all the answer holds every kind at once, so one page can carry up to fifteen times the limit (at most 10 per kind, or 20 per kind with a communityId). Give a single kind for up to 50 rows of that kind. Use communityId to read one community's log, or modPersonId and otherPersonId to follow one moderator or one subject.

Lemmy Moderation Log API FAQ

Why does the log show a post that the post route calls not_found?

Removal is why. The entity routes answer not_found for a removed or deleted object, while the public log keeps the action and the removed content.

Why is the moderator null?

Some instances set hide_modlog_mod_names. The action and its subject are still returned, but the moderator field is null.

Why can a kind=all page be so long?

All kinds means fifteen lists in one answer, and limit applies to each list: at most 10 per kind, or 20 per kind with a communityId. One page can therefore carry many more entries than limit. Give one kind for up to 50 rows of that kind.

Are the pages in time order?

Within one answer the entries are newest first. Each kind is paged on its own before the kinds are sorted together, so a later page can hold entries newer than the previous page. Remove repeats by id if you merge pages.

What if the instance no longer serves its moderation log?

Lemmy 1.0 instances that still serve the rest of their public data do not serve their moderation log. There the answer is lookupStatus: not_compatible with reason.code: not_available, not a missing entry and not a server error.

How many credits does a modlog 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.