Lemmy Federated Instances API
The domains one Lemmy instance federates with, or blocks, with enough state to see which are alive.
GET /v1/lemmy/instances2 credits Failed requests are free
About this endpoint
GET /v1/lemmy/instances?source=fed.dyne.org returns that instance's federation table in data.instances, each with domain, software, version, firstSeenAt, updatedAt, lastFederatedAt, failCount, lastRetryAt and nextRetryAt, plus blocked to say whether it came from the block list. data.total is the number of rows after the filters, and data.page pages them.
This is one instance's view of the network, not a network-wide directory. software keeps one kind of server and defaults to lemmy; all keeps every domain. activeSince keeps domains whose last successful delivery is at or after an ISO 8601 time. Set blocked=true to read the instance's block list instead. The table has no user counts, so the rows cannot be ranked by size.
Lemmy Federated Instances API FAQ
Is this a list of every Lemmy instance?
No. It is the federation table of the instance you name. Another instance can have seen a different set of domains, and the table has no user counts to rank them by size.
What does activeSince filter on?
On the last successful delivery from that domain, or on its record update when an older version does not report a federation state. Domains with neither timestamp are left out.
How do I read the block list?
Set blocked=true. The same rows come back with blocked: true, and total counts the filtered block list.
How many credits does the directory cost?
Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged: that field is the billing source of truth. Each paginated page is a separate billed request.