All endpoints are served from degenfeed.xyz/api/*. Public read endpoints require no authentication. State-changing endpoints require a valid session.
DegenFeed uses two authentication methods depending on the endpoint:
All GET feed and search endpoints are publicly accessible. Rate-limited by IP.
All POST endpoints require a valid session cookie obtained via wallet authentication.
DegenFeed uses Sign-In with Ethereum (EIP-4361) and Solana wallet authentication. The flow is a standard challenge-response:
POST /api/auth/wallet/noncePOST /api/auth/wallet/verify// Step 1: Request nonce
const nonceRes = await fetch('https://degenfeed.xyz/api/auth/wallet/nonce', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ address: '0x...', chainId: 1 }),
});
const { nonce } = await nonceRes.json();
// Step 2: Sign with wallet (use ethers, viem, or web3)
// const signature = await wallet.signMessage(nonce);
// Step 3: Verify signature
const verifyRes = await fetch('https://degenfeed.xyz/api/auth/wallet/verify', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
credentials: 'include',
body: JSON.stringify({
address: '0x...',
message: nonce,
signature: signature,
}),
});
const { session } = await verifyRes.json();Rate limiting is enforced per IP address. The rate limiter uses Cloudflare KV for global consistency and fails open during KV outages.
Per IP address
With valid session cookie
Contact us for a key
X-RateLimit-Remaining and X-RateLimit-Reset.Feed endpoints return paginated arrays of unified post objects. All support cursor-based pagination via the cursor parameter.
/api/feed/streamServer-Sent Events real-time feed./api/feed/:protocolPer-protocol feed. Replace :protocol with nostr, farcaster, lens, bluesky, mastodon, lemmy, reddit, rss.Try →/api/feed/category/:catFilter by niche: defi, nft, ai, bitcoin, ethereum, solana, security, macro.Try →/api/feed/post/:idSingle post by canonical ID. O(1) KV lookup./api/feed/post/:id/repliesThread context for a post. Nostr, Farcaster, Mastodon, Bluesky./api/feed/relatedRelated posts by niche overlap + time proximity./api/feed/rss.xmlRSS 2.0 feed of top posts./api/feed/atom.xmlAtom 1.0 feed of top posts.const response = await fetch(
'https://degenfeed.xyz/api/feed/home?sort=hot&protocols=nostr,farcaster&limit=5'
);
const data = await response.json();
// {
// posts: [{ id, protocol, author, content, score, ... }],
// cursor: "1720000000000",
// hasMore: true
// }{
"posts": [
{
"id": "nostr:note1abc...",
"protocol": "nostr",
"author": {
"displayName": "Alice",
"handle": "alice@nostr",
"avatar": "https://..."
},
"content": "Bitcoin is the future of money. Here's why...",
"score": 94.2,
"scoreReasons": [
{ "factor": "engagement", "weight": 3.5, "value": 42.1 },
{ "factor": "recency", "weight": 2.4, "value": 18.3 }
],
"stats": { "likes": 142, "replies": 23, "reposts": 15 },
"timestamp": 1720000000000,
"media": [{ "type": "image", "url": "https://..." }]
}
],
"cursor": "1720000000000",
"hasMore": true
}| Parameter | Default | Description |
|---|---|---|
| protocols | all | Comma-separated: nostr,farcaster,lens,bluesky,mastodon,lemmy,reddit,rss (threads requires explicit opt-in; experimental) |
| sort | scored | scored | hot | new | top |
| limit | 50 | 1-200 posts per page |
| category | Filter by niche: defi, ai, bitcoin, ethereum, solana, security, macro | |
| type | Content type: video, article, image, thread, link, text | |
| cursor | Timestamp for cursor-based pagination | |
| direction | desc | asc | desc |
| lang | en | en | all (language filter) |
| trending | 24 | Trending window in hours: 1 | 6 | 24 |
/api/tip/createCreate a crypto tip: ETH, SOL, Lightning./api/tip/resolveResolve available tipping methods./api/tip/lightning/invoiceGenerate Lightning invoice.# Create a 0.01 ETH tip
curl -X POST https://degenfeed.xyz/api/tip/create \
-H "Content-Type: application/json" \
-H "Cookie: session=..." \
-d '{
"postId": "nostr:note1abc...",
"currency": "ETH",
"amount": "0.01",
"recipientAddress": "0x..."
}'
# Resolve tipping methods for a post
curl "https://degenfeed.xyz/api/tip/resolve?postId=nostr:note1abc..."
# Generate Lightning invoice
curl "https://degenfeed.xyz/api/tip/lightning/invoice?amount=1000&pubkey=<npub>"/api/auth/wallet/nonceRequest signing nonce for wallet auth./api/auth/wallet/verifyVerify wallet signature, issue session cookie./api/auth/gotosocial/authorizeStart GotoSocial OAuth2 flow./api/auth/gotosocial/callbackOAuth2 callback handler./api/auth/sessionVerify session cookie./api/identity/resolveResolve handle across protocols./api/identity/profileCross-platform identity profile./api/notificationsUnified notification inbox./api/searchCross-protocol text search. Query: ?q=bitcoin&protocols=nostr,farcaster&limit=25/api/search/identitySearch identities across protocols.# Cross-protocol text search
curl "https://degenfeed.xyz/api/search?q=bitcoin&protocols=nostr,farcaster&limit=25"
# Search for identities
curl "https://degenfeed.xyz/api/search/identity?q=vitalik"/api/discover/peopleWho to follow — trending authors./api/embed/resolveOpenGraph metadata for a URL. 24h KV cache./api/frame/resolveParse Farcaster Frame meta tags. 5min cache./api/frame/actionSubmit Farcaster Frame button action./v1/pricesCrypto prices via CoinGecko. 60s cache./api/newsletter/subscribeSubscribe to daily digest./api/newsletter/digestPreview latest daily digest./api/push/subscribeRegister PWA push subscription./api/account/exportGDPR-compliant data export./api/account/deletePermanently delete account.All errors return a consistent JSON structure with an appropriate HTTP status code.
{
"error": {
"code": "RATE_LIMITED",
"message": "Too many requests. Try again in 3 seconds.",
"status": 429,
"retryAfter": 3
}
}| Status | Code | Meaning | Description |
|---|---|---|---|
| 400 | BAD_REQUEST | Invalid parameters | Missing or malformed query parameters or request body. |
| 401 | UNAUTHORIZED | No valid session | State-changing endpoint without valid authentication. |
| 403 | FORBIDDEN | Insufficient permissions | Authenticated but not allowed for this action. |
| 404 | NOT_FOUND | Resource not found | Post, profile, or endpoint does not exist. |
| 429 | RATE_LIMITED | Too many requests | Rate limit exceeded. Retry after indicated time. |
| 500 | INTERNAL_ERROR | Server error | Unexpected server error. Try again later. |
retryAfter field for 429 responses. Always retry with exponential backoff for 5xx errors.Questions about the API? [email protected]