Finding my Lemmy Comment via API

I remembered a comment I had made quite a while ago I wanted to find. This was my journey.

What is Lemmy? My introduction became quite long and a personal history story, so I posted it separately as Lemmy, the open Reddit Alternative.

The comment I wanted to find contained recommendations for good isekai, as an answer to a frustrated post about the abundance of low-quality isekai. I wanted to publish it on this website as useful replication. But various aspects of how Lemmy works made it difficult but also interesting.

Searching Through Profile Comments

It’s a comment regarding anime. So maybe it was master my account switch/split and I posted it under my account?

Going through the pages of recent comments, I page-searched for the word isekai. And did not find the comment in question.

Then maybe it was before my account split under my account. But the frontend is dead, so I can’t access the respective profile page and profile comment list.

But Lemmy is federated - distributed and connected. Maybe I can open the profile from - cross-instance? Adding worked;

Going through that accounts comments and page-searching each paging-page did not yield results either though.

Could it be anywhere else? Maybe it was on Reddit?

I remembered that the Lemmy API is easily accessible on instances under /api/.

Opening /api/ yields an empty page.

There is API documentation with the general API introduction and generated API reference docs. What was new to me was the introduction linking two alternative, more accessible, and interactively-useable API documentations provided by the community at and

There is a Search endpoint and a LocalUser endpoint. There is also Comment, but that seems to be for querying a specific comment.

To search for a specific users comments, you need the account ID rather than the username. So the first step is querying the account for the account ID.

The API URL path was not obvious to me from the reference docs. But the interactive docs allowed me to input the data to produce and see the correct URL. The mv-gh page seems to work similarly well.

The backend still works, so while I can’t view the profile page and comments list directly, calling the API works fine.

Calling yields the account ID as id.

For the search, I knew I was searching for “isekai” content, so I searched for comments with that text, and created by the respective account, with

And indeed, the first result yielded the comment I was looking for. And I was able to copy my comment content from it.

Why did I not see it under the account comments?

I initially wondered whether looking at the profile from would only show comments that have been federated to, which would only happen for comments in communities that were federated, which only happens once a user subscribes to such a community.

But inspecting the API result a bit more, the comment result record includes post information. Opening the post URL was inaccessible - “there was an error on the server”. I wondered if the post had been deleted.

More surprisingly, that post URL wasn’t even on the instance the community listed in the result record, which was

So searching on the frontend,, I was able to see the comment, rendered, there, as a search result.

But accessing the link to it also returns a “server error”.

I now assume the original post was deleted, while the comment remains in data storage.


I’m glad I was able to find the comment. Turns out it was quite the list of recommendations. I have now published it under Good Non-Harem Isekai Recommendations. (I had forgotten about the non-harem part of the inquiry.)

I’m also glad the API was easily accessible.