InsightSocial API
Lemmy

Lemmy Search API reference

Your first 10 calls are free, no card needed. Pricing and FAQ

Get a free API key
Example request
curl "https://api.insightsocial.app/v1/lemmy/search?instance=<instance>&query=<query>" \
  -H "x-api-key: $INSIGHTSOCIAL_API_KEY"
GET
/v1/lemmy/search

Search Lemmy posts, comments, communities, users or exact URLs; All and Comments can take longer.

Beta. The source's own structure under our naming rules (snake_case keys, string ids, ISO times where the source gives a timestamp), not one of the schema-2 entities. Fields may change. See Beta endpoints.

20 credits per call.

Paginates by cursor: see Pagination.

x-api-key<token>

Your key from the dashboard. It starts with isk_.

In: header

Query Parameters

instance*string

The Lemmy instance, e.g. lemmy.world. A URL on the instance is also accepted. Ids and counts belong to this instance.

query*string

Search term, 1 to 300 characters, in any language. Required, never empty and no control characters.

type?string

Posts (default), All (every kind), Comments (comment text), Communities, Users or Url (posts linking to an exact URL). All and Comments can take much longer than the other kinds.

Value in

  • "All"
  • "Comments"
  • "Posts"
  • "Communities"
  • "Users"
  • "Url"
sort?string

Order. Scaled and Controversial are refused by 0.18 instances.

Value in

  • "Active"
  • "Hot"
  • "New"
  • "Old"
  • "TopHour"
  • "TopSixHour"
  • "TopTwelveHour"
  • "TopDay"
  • "TopWeek"
  • "TopMonth"
  • "TopThreeMonths"
  • "TopSixMonths"
  • "TopNineMonths"
  • "TopYear"
  • "TopAll"
  • "MostComments"
  • "NewComments"
  • "Controversial"
  • "Scaled"
community?string

Community name, e.g. technology, or technology@lemmy.world to resolve a community on another instance. Prefer the community's home instance for counts.

author?string

Restrict to one author, by username.

scope?string

local reads only this instance's own items; all includes federated items the instance has seen. Default: the endpoint's own listing.

Value in

  • "local"
  • "all"
limit?integer

Rows per page, 1 to 50. Default: 10.

Range1 <= value <= 50
cursor?string

Pass pagination.next_cursor from the previous response to get the next page. Keep the other parameters the same.

dry_run?"1"

Set to 1 to get the price of this call without making it: data.dry_run carries credits_min and credits_max. Nothing is charged.

Value in

  • "1"

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://api.insightsocial.app/v1/lemmy/search?instance=string&query=string"
{  "success": true,  "platform": "string",  "endpoint": "string",  "schema_version": "2",  "pagination": {    "next_cursor": "string",    "has_more": true,    "page_size": 0,    "stopped_at": "since"  },  "unavailable": [    "string"  ],  "credits_used": 0,  "credits_remaining": 0,  "request_id": "string",  "cached": true,  "idempotent_replay": true,  "charge_reason": "string",  "free_call": true,  "data": {    "property1": null,    "property2": null  }}