# Lemmy on Onekey > 20 endpoints for Lemmy (20 stable, 0 beta), 1 to 5 credits each. Category: Messaging & communities. One key, one JSON shape. Base URL: https://api.onekey.dev Auth: header `x-api-key: `. Call shape: `GET /v1/{platform}/{endpoint}?{params}`. Every response is `{success, data, metadata, error}`; check `success` first. Cost is in `metadata.credits_charged`. Free when served from cache (0.2 credit for a cached response over 100 KB). Failed and not-found calls are refunded. Status: stable = verified against the live source; beta = not yet verified, fields may be missing. Page: https://onekey.dev/platforms/lemmy Reference (Markdown): https://onekey.dev/docs/api/lemmy.md All docs: https://onekey.dev/llms.txt ## Canonical fields returned Unified-schema fields (same names on every platform), with how many of the 20 mapped Lemmy endpoints return each: - `content.text` (string): 18 - `engagement.comments` (integer): 18 - `content.createdAt` (ISO 8601 date): 17 - `content.title` (string): 16 - `author.avatarUrl` (URL): 15 - `author.displayName` (string): 15 - `author.id` (string): 15 - `author.username` (string): 15 - `content.id` (string): 15 - `entity.name` (string): 13 - `author.url` (URL): 12 - `engagement.likes` (integer): 11 - `content.url` (URL): 8 - `media.thumbnailUrl` (URL): 5 - `entity.stats.followers` (integer): 4 - `entity.url` (URL): 4 - `package.version` (string): 1 - plus 6 platform-specific fields under `ext.` ## Endpoints ### lemmy.comments Comments of a Lemmy post. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/lemmy/comments?id=52463999` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Lemmy instance (allowlisted), default lemmy.world - `id` (string, required): Post id on the instance - Fields returned: `content.id`, `content.text`, `content.createdAt`, `author.id`, `author.username`, `author.displayName`, `author.avatarUrl`, `content.title`, `engagement.likes`, `engagement.comments`, `ext.path`, `ext.apUrl` - Reference: https://onekey.dev/docs/api/lemmy/comments.md ### lemmy.communities Popular Lemmy communities on an instance. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/lemmy/communities` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Lemmy instance (allowlisted), default lemmy.world - Fields returned: `content.id`, `entity.name`, `content.title`, `content.text`, `entity.url`, `media.thumbnailUrl`, `content.createdAt`, `entity.stats.followers`, `engagement.comments`, `ext.posts` - Reference: https://onekey.dev/docs/api/lemmy/communities.md ### lemmy.communities_new Newest Lemmy communities (all federated). - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/lemmy/communities_new` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Lemmy instance (allowlisted), default lemmy.world - Fields returned: `content.id`, `entity.name`, `content.title`, `content.text`, `entity.url`, `media.thumbnailUrl`, `content.createdAt`, `entity.stats.followers`, `engagement.comments`, `ext.posts` - Reference: https://onekey.dev/docs/api/lemmy/communities_new.md ### lemmy.community A Lemmy community. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/lemmy/community?name=technology` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Lemmy instance (allowlisted), default lemmy.world - `name` (string, required): Community name without instance, e.g. technology - Fields returned: `content.id`, `entity.name`, `content.title`, `content.text`, `entity.url`, `media.thumbnailUrl`, `content.createdAt`, `entity.stats.followers`, `engagement.comments`, `ext.posts` - Reference: https://onekey.dev/docs/api/lemmy/community.md ### lemmy.community_moderators Moderators of a Lemmy community. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/lemmy/community_moderators?name=technology` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Lemmy instance (allowlisted), default lemmy.world - `name` (string, required): Community name without instance, e.g. technology - Fields returned: `author.id`, `author.username`, `author.displayName`, `author.url`, `author.avatarUrl` - Reference: https://onekey.dev/docs/api/lemmy/community_moderators.md ### lemmy.frontpage Hot posts across all Lemmy communities on an instance. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/lemmy/frontpage` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Lemmy instance (allowlisted), default lemmy.world - Fields returned: `content.id`, `content.title`, `content.text`, `content.url`, `content.createdAt`, `author.id`, `author.username`, `author.displayName`, `author.url`, `author.avatarUrl`, `entity.name`, `engagement.likes`, `engagement.comments`, `ext.apUrl`, `ext.languageId`, `ext.title` - Reference: https://onekey.dev/docs/api/lemmy/frontpage.md ### lemmy.local_posts Hot posts from local communities of a Lemmy instance. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/lemmy/local_posts` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Lemmy instance (allowlisted), default lemmy.world - Fields returned: `content.id`, `content.title`, `content.text`, `content.url`, `content.createdAt`, `author.id`, `author.username`, `author.displayName`, `author.url`, `author.avatarUrl`, `entity.name`, `engagement.likes`, `engagement.comments`, `ext.apUrl`, `ext.languageId`, `ext.title` - Reference: https://onekey.dev/docs/api/lemmy/local_posts.md ### lemmy.post A Lemmy post. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/lemmy/post?id=52463999` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Lemmy instance (allowlisted), default lemmy.world - `id` (string, required): Post id on the instance - Fields returned: `content.id`, `content.title`, `content.text`, `content.url`, `content.createdAt`, `author.id`, `author.username`, `author.displayName`, `author.url`, `author.avatarUrl`, `entity.name`, `engagement.likes`, `engagement.comments`, `ext.apUrl`, `ext.languageId`, `ext.title` - Reference: https://onekey.dev/docs/api/lemmy/post.md ### lemmy.posts_hot Hot posts of a Lemmy community. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/lemmy/posts_hot?name=technology` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Lemmy instance (allowlisted), default lemmy.world - `name` (string, required): Community name without instance, e.g. technology - Fields returned: `content.id`, `content.title`, `content.text`, `content.url`, `content.createdAt`, `author.id`, `author.username`, `author.displayName`, `author.url`, `author.avatarUrl`, `entity.name`, `engagement.likes`, `engagement.comments`, `ext.apUrl`, `ext.languageId`, `ext.title` - Reference: https://onekey.dev/docs/api/lemmy/posts_hot.md ### lemmy.posts_new Newest posts of a Lemmy community. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/lemmy/posts_new?name=technology` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Lemmy instance (allowlisted), default lemmy.world - `name` (string, required): Community name without instance, e.g. technology - Fields returned: `content.id`, `content.title`, `content.text`, `content.url`, `content.createdAt`, `author.id`, `author.username`, `author.displayName`, `author.url`, `author.avatarUrl`, `entity.name`, `engagement.likes`, `engagement.comments`, `ext.apUrl`, `ext.languageId`, `ext.title` - Reference: https://onekey.dev/docs/api/lemmy/posts_new.md ### lemmy.posts_top Top posts of a Lemmy community (past week). - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/lemmy/posts_top?name=technology` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Lemmy instance (allowlisted), default lemmy.world - `name` (string, required): Community name without instance, e.g. technology - Fields returned: `content.id`, `content.title`, `content.text`, `content.url`, `content.createdAt`, `author.id`, `author.username`, `author.displayName`, `author.url`, `author.avatarUrl`, `entity.name`, `engagement.likes`, `engagement.comments`, `ext.apUrl`, `ext.languageId`, `ext.title` - Reference: https://onekey.dev/docs/api/lemmy/posts_top.md ### lemmy.search_comments Search Lemmy comments. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/lemmy/search_comments?q=python` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Lemmy instance (allowlisted), default lemmy.world - `q` (string, required): Search query - Fields returned: `content.id`, `content.text`, `content.createdAt`, `author.id`, `author.username`, `author.displayName`, `author.avatarUrl`, `content.title`, `engagement.likes`, `engagement.comments`, `ext.path`, `ext.apUrl` - Reference: https://onekey.dev/docs/api/lemmy/search_comments.md ### lemmy.search_communities Search Lemmy communities. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/lemmy/search_communities?q=python` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Lemmy instance (allowlisted), default lemmy.world - `q` (string, required): Search query - Fields returned: `content.id`, `entity.name`, `content.title`, `content.text`, `entity.url`, `media.thumbnailUrl`, `content.createdAt`, `entity.stats.followers`, `engagement.comments`, `ext.posts` - Reference: https://onekey.dev/docs/api/lemmy/search_communities.md ### lemmy.search_posts Search Lemmy posts. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/lemmy/search_posts?q=python` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Lemmy instance (allowlisted), default lemmy.world - `q` (string, required): Search query - Fields returned: `content.id`, `content.title`, `content.text`, `content.url`, `content.createdAt`, `author.id`, `author.username`, `author.displayName`, `author.url`, `author.avatarUrl`, `entity.name`, `engagement.likes`, `engagement.comments`, `ext.apUrl`, `ext.languageId`, `ext.title` - Reference: https://onekey.dev/docs/api/lemmy/search_posts.md ### lemmy.search_users Search Lemmy users. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/lemmy/search_users?q=lemmy` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Lemmy instance (allowlisted), default lemmy.world - `q` (string, required): Search query - Fields returned: `author.id`, `author.username`, `author.displayName`, `author.url`, `author.avatarUrl`, `content.text`, `content.createdAt`, `engagement.comments`, `ext.posts` - Reference: https://onekey.dev/docs/api/lemmy/search_users.md ### lemmy.site Lemmy instance information. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/lemmy/site` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Lemmy instance (allowlisted), default lemmy.world - Fields returned: `entity.name`, `content.text`, `content.title`, `media.thumbnailUrl`, `engagement.comments`, `package.version`, `ext.users`, `ext.posts` - Reference: https://onekey.dev/docs/api/lemmy/site.md ### lemmy.site_admins Administrators of a Lemmy instance. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/lemmy/site_admins` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Lemmy instance (allowlisted), default lemmy.world - Fields returned: `author.id`, `author.username`, `author.displayName`, `author.url`, `author.avatarUrl` - Reference: https://onekey.dev/docs/api/lemmy/site_admins.md ### lemmy.user A Lemmy user's profile. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/lemmy/user?name=lemmy` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Lemmy instance (allowlisted), default lemmy.world - `name` (string, required): Username on the instance, e.g. lemmy - Fields returned: `author.id`, `author.username`, `author.displayName`, `author.url`, `author.avatarUrl`, `content.text`, `content.createdAt`, `engagement.comments`, `ext.posts` - Reference: https://onekey.dev/docs/api/lemmy/user.md ### lemmy.user_comments Comments by a Lemmy user. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/lemmy/user_comments?name=inclementimmigrant` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Lemmy instance (allowlisted), default lemmy.world - `name` (string, required): Username on the instance, e.g. lemmy - Fields returned: `content.id`, `content.text`, `content.createdAt`, `author.id`, `author.username`, `author.displayName`, `author.avatarUrl`, `content.title`, `engagement.likes`, `engagement.comments`, `ext.path`, `ext.apUrl` - Reference: https://onekey.dev/docs/api/lemmy/user_comments.md ### lemmy.user_posts Posts by a Lemmy user. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/lemmy/user_posts?name=inclementimmigrant` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Lemmy instance (allowlisted), default lemmy.world - `name` (string, required): Username on the instance, e.g. lemmy - Fields returned: `content.id`, `content.title`, `content.text`, `content.url`, `content.createdAt`, `author.id`, `author.username`, `author.displayName`, `author.url`, `author.avatarUrl`, `entity.name`, `engagement.likes`, `engagement.comments`, `ext.apUrl`, `ext.languageId`, `ext.title` - Reference: https://onekey.dev/docs/api/lemmy/user_posts.md ## Sample request ```bash curl "https://api.onekey.dev/v1/lemmy/community?name=technology" \ -H "x-api-key: YOUR_API_KEY" ```