A lightweight JSON API service that provides direct access to AT Protocol data by prefixing atpi.
to any AT Protocol URI.
# Get user profile
curl "https://atpi.at://sri.xyz"
# Get specific post
curl "https://atpi.at://sriganesh.bsky.social/app.bsky.feed.post/3lry27bsx2s2z"
# Get all posts
curl "https://atpi.at://sri.xyz/app.bsky.feed.post"
- Direct JSON access to AT Protocol data
- Multiple URL format support
- Automatic handle and DID resolution
- CORS support for web applications
The API supports multiple URL formats for flexibility:
# Direct AT URI
https://atpi.at://sri.xyz/app.bsky.feed.post
# Query parameter (browser-friendly)
https://atpi.at?uri=at://sri.xyz/app.bsky.feed.post
# Slash format
https://atpi.at/sri.xyz/app.bsky.feed.post
# Get profile and format with jq
curl -s "https://atpi.at://sri.xyz" | jq '.displayName'
# Get recent posts
curl -s "https://atpi.at://sri.xyz/app.bsky.feed.post?limit=5" | \
jq '.records[].value.text'
- Profile:
https://atpi.at://[handle-or-did]
- Collection:
https://atpi.at://[handle-or-did]/[collection]
- Record:
https://atpi.at://[handle-or-did]/[collection]/[rkey]
limit
- Number of records to return (max 100, default 50)cursor
- Pagination cursor from previous response
Note: Query parameters only work with API clients (curl, code), not browsers.
The API returns raw AT Protocol data without any wrapper.
All responses include rate limit headers:
X-RateLimit-Limit
- Requests allowed per windowX-RateLimit-Remaining
- Requests remainingX-RateLimit-Reset
- Window reset timestamp
Errors return structured JSON with helpful debugging information:
{
"error": {
"code": "HANDLE_NOT_FOUND",
"message": "Handle could not be resolved to a DID",
"details": { "handle": "unknown.handle" }
},
"status": 404,
"requestId": "abc123",
"timestamp": "2025-07-15T10:30:00.000Z"
}
When accessed from a browser, ATPI automatically redirects to a query parameter format for better compatibility:
- Request:
https://atpi.at://sri.xyz
- Redirects to:
https://atpi.at?uri=at://sri.xyz
MIT License - see LICENSE file for details