InsightSocial

Lemmy scraper API

The InsightSocial Lemmy API has 14 endpoints, from 20 credits a call. A community call costs 20 credits, about $0.02 on Pro, and your first 10 calls up to 100 credits each are free.

Lemmy as JSON on any instance: communities with their counts and moderators, posts and comment threads, users, search, the moderation log and an instance's federation table.

14 endpoints · from 20 credits a call · 10 free calls up to 100 credits each · no credit card

curl "https://api.insightsocial.app/v1/lemmy/community?instance=lemmy.world&name=technology" \
-H "x-api-key: $INSIGHTSOCIAL_API_KEY"
200 OKJSON
{
"success": true,
"platform": "lemmy",
"endpoint": "/v1/lemmy/community",
"schema_version": "2",
"data": {
"instance": "lemmy.world",
"community": {
"id": "2478",
"name": "technology",
"title": "Technology",
"handle": "technology@lemmy.world",
"actor_id": "https://lemmy.world/c/technology",
"nsfw": false,
"is_local": true,
"published_at": "2023-06-11T02:16:17.173Z",
"subscriber_count": 89543,
"post_count": 22609,
"comment_count": 986107,
"active_users": {
"day": 4925,
"week": 10067,
"month": 15387
}
}
},
"unavailable": [],
"credits_used": 0,
"charge_reason": "miss",
"free_call": true
}

What Lemmy data can you get?

Public Lemmy data only, in the same JSON envelope as every other platform. Every Lemmy endpoint is beta: inside data it returns Lemmy's own structure under our naming rules (snake_case keys, string ids, ISO times where Lemmy gives a timestamp), not the shared profile and post schema, and fields may change.

Communities

One community with subscriber, post and comment counts, active users and moderators, and the communities on an instance, local or federated.

Posts and comments

Posts across an instance or in one community in the order you ask, one post with its cross-posts, its comments or the replies to one comment, and the latest comments.

Users and search

A user with counts and moderator roles, their posts and comments, and search over posts, comments, communities, users or URLs.

Instances and moderation

An instance's version, counts and registration settings, the instances it federates with, and its moderation log.

What people build with the Lemmy API

  • Community research

    Compare the same topic's communities across instances by subscribers, posts and daily active users.

  • Cross-platform listening

    Search Lemmy alongside Reddit for the same keyword and keep both in one table with the same envelope.

  • Moderation studies

    Read an instance's moderation log by kind or community, and its federation table, to see how a server is run.

Lemmy API endpoints

All 14 Lemmy endpoints and their price in credits. Every one has a fixed price.

EndpointCreditsWhat it returns
/comment20Get one Lemmy comment with its post, community, creator and moderation flags.
/comments20List the latest Lemmy comments across an instance or community.
/communities20List Lemmy communities, local or federated, in the order asked for.
/community20Get one Lemmy community with its counts, active users and moderators.
/instance20Get Lemmy instance version, counts, registration and federation settings.
/instances40List Lemmy federated instances with software, version and delivery status.
/modlog20List the Lemmy moderation log by kind, community or moderator.
/post20Get one Lemmy post with its community, cross-posts and moderators.
/post/comments20List comments on one Lemmy post, or the replies to one comment.
/posts20List Lemmy posts, optionally for one community, in the order asked for.
/search20Search Lemmy posts, comments, communities, users or exact URLs; All and Comments can take longer.
/user20Get one Lemmy user with counts, moderator roles and latest activity.
/user/comments20List Lemmy comments by one user, in the order asked for.
/user/posts20List Lemmy posts by one user, in the order asked for.

Parameters, response fields and examples for each endpoint are in the Lemmy API reference.

InsightSocial vs the official Lemmy API

Every Lemmy instance serves its own free HTTP API, and public data can be read without an account. If you only read Lemmy, it is a good place to start.

InsightSocial APIOfficial Lemmy API
SetupSign in and copy a keyNone for public reads
InstancesAny instance through one base URLOne base URL per instance
Other platformsReddit, Mastodon and 58 more on the same keyLemmy only
Cost per call20 creditsFree; each instance sets its own limits

The official API is the right tool for posting, messaging or managing accounts you own. This one is read-only public data.

How much does the Lemmy API cost?

Lemmy calls start at 20 credits. Every endpoint's price is in the table above and in the free GET /v1/endpoints catalogue, so you know the cost before you call. Pro's 10,000 monthly credits cover about 500 community lookups at 20 credits each.

  • Failed calls are free

    A call that errors or finds nothing costs 0 credits.

  • Repeats and retries

    A repeat call is charged again: the full price when it fetches new data, 2 credits when the answer comes from the shared cache. Add fresh=1 to force a new read. Only a retry with the same Idempotency-Key is free.

  • One balance

    API calls and Chrome extension exports share the same credits. The free plan includes 500 a month.

Not writing code?

Connect InsightSocial to Claude or ChatGPT and ask for Lemmy data in plain English. Same account, same credits.

Use it from Claude or ChatGPT

Lemmy API: frequently asked questions

You can, for free. This API is for when Lemmy is one source among several: the same key, envelope and credit balance cover Reddit, Mastodon and the rest, and you switch instances with one parameter.