Call it
curl https://api.peume.com/v1/call/lemmy-community \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"limit": 20,
"community": "your community"
}
}'const res = await fetch("https://api.peume.com/v1/call/lemmy-community", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"limit": 20,
"community": "your community"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/lemmy-community",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"limit": 20,
"community": "your community"
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: lemmy-community.
Parameters
instancestringSelects the Lemmy instance domain, such as lemmy.world, which is also the default. A full instance URL is accepted but reduced to its hostname. This chooses the query entry point, not a community name.
limitintegerMaximum number of results, 1 to 200 (default 20). For some actions it counts pages or items per parent rather than final rows.
Example: 20
sortstringSorts posts as hot, active, new, top, most_comments, or new_comments. Search and community default to hot, feed defaults to active, and comments defaults to most_comments. One of: active, hot, most_comments, new, new_comments, top.
active · hot · most_comments · new · new_comments · top
communityRequiredstringSpecifies the community name or the cross-instance identifier in name@instance format. In the community action, it lists community posts; in the comments action, it fetches posts from the community and expands their comments rather than querying a single post URL directly.
top_rangestringSets the score window only when sort is top: hour, sixhour, twelvehour, day, week (default), month, threemonths, sixmonths, ninemonths, year, or all. It is not a comment publication-date filter. One of: all, day, hour, month, ninemonths, sixhour, sixmonths, threemonths, twelvehour, week, year.
all · day · hour · month · ninemonths · sixhour · sixmonths · threemonths · twelvehour · week · year
