Documentation Index
Fetch the complete documentation index at: https://mintlify.com/bluesky-social/atproto/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Thecom.atproto.sync namespace provides lexicons for synchronizing repository data across the AT Protocol network. These are primarily used by crawlers, feed generators, and other services that need to replicate and index repository data.
Key Concepts
- Repository Synchronization: Replicating complete repository state
- CAR Files: Content-Addressable aRchive format for data transfer
- Commit History: Versioned sequence of repository changes
- Blocks: Individual data blocks in a repository
- Blobs: Binary large objects (images, videos, etc.)
Repository Queries
getRepo
Get a repository export as a CAR file. Endpoint:com.atproto.sync.getRepo
DID of the repository
Only include commits since this revision
getRecord
Get a specific record from a repository. Endpoint:com.atproto.sync.getRecord
DID of the repository
NSID of the record collection
Record key
Specific commit CID to retrieve record from
listRepos
List repositories on a host. Endpoint:com.atproto.sync.listRepos
Maximum repositories to return (1-1000, default 500)
Pagination cursor
Next page cursor
Array of repository information
listReposByCollection
List repositories that contain a specific collection. Endpoint:com.atproto.sync.listReposByCollection
NSID of the collection (e.g.,
app.bsky.feed.post)Maximum repositories to return
Pagination cursor
getRepoStatus
Get the sync status of a repository. Endpoint:com.atproto.sync.getRepoStatus
DID of the repository
Repository DID
Whether the repository is active
Repository status (e.g.,
takendown, suspended, deactivated)Current revision
Commit Operations
getHead
Get the current head commit of a repository. Endpoint:com.atproto.sync.getHead
DID of the repository
CID of the current repository head
getLatestCommit
Get the latest commit for a repository. Endpoint:com.atproto.sync.getLatestCommit
DID of the repository
CID of the latest commit
Revision identifier
getCheckout
Get a repository checkout at a specific commit. Endpoint:com.atproto.sync.getCheckout
DID of the repository
Block Operations
getBlocks
Get blocks from a repository. Endpoint:com.atproto.sync.getBlocks
DID of the repository
Array of block CIDs to retrieve
Blob Operations
getBlob
Get a blob from a repository. Endpoint:com.atproto.sync.getBlob
DID of the repository
CID of the blob
listBlobs
List blobs in a repository. Endpoint:com.atproto.sync.listBlobs
DID of the repository
Only include blobs since this revision
Maximum blobs to return
Pagination cursor
Next page cursor
Array of blob CIDs
Subscriptions
subscribeRepos
Subscribe to repository update events (firehose). Endpoint:com.atproto.sync.subscribeRepos
Protocol: WebSocket
Start from specific event sequence number
- commit: Repository commit with new/updated/deleted records
- identity: Identity update (handle change)
- account: Account status change
- handle: Handle update
- migrate: Repository migration
- tombstone: Repository deleted
Crawling
notifyOfUpdate
Notify a crawling service of a repository update. Endpoint:com.atproto.sync.notifyOfUpdate
Authentication: Required
Hostname of the PDS that has updates
requestCrawl
Request a crawl of a repository. Endpoint:com.atproto.sync.requestCrawl
Authentication: Required
Hostname of the PDS to crawl
Host Management
listHosts
List known PDS hosts. Endpoint:com.atproto.sync.listHosts
Maximum hosts to return
Pagination cursor
Next page cursor
Array of host information
getHostStatus
Get the status of a PDS host. Endpoint:com.atproto.sync.getHostStatus
Hostname of the PDS
Host status:
active, idle, offline, throttled, or bannedType Definitions
hostStatus
Possible values for PDS host status:active: Host is actively serving requestsidle: Host is online but not activeoffline: Host is not respondingthrottled: Host is rate-limitedbanned: Host is banned from network
Common Use Cases
Building a Firehose Consumer
Crawling a Repository
Downloading Blobs
Monitoring Repository Updates
Related Lexicons
- com.atproto.repo - Repository management
- com.atproto.identity - Identity resolution