Getting Started
Get your first API call working in under two minutes.
1. Get your API key
Sign up for a FetchLayer account and generate an API key from the dashboard. Free tier included — no credit card required.
2. Make your first request
Call any endpoint with curl, or use the TypeScript SDK.
curl
curl -X POST https://api.fetchlayer.dev/reddit/search \
-H "Authorization: Bearer ss-your-key" \
-H "Content-Type: application/json" \
-d '{"query":"developer tools","sort":"top","limit":5}'TypeScript SDK
npm install @fetchlayer/reddit
import { FetchLayer } from '@fetchlayer/reddit';
const client = new FetchLayer({ apiKey: 'ss-your-key' });
const { items } = await client.search({
query: 'developer tools',
sort: 'top',
limit: 10,
});Tip
3. Understand the response
Every endpoint returns structured JSON. Listing endpoints return entries in items together with pagination and scrape metadata.
{
"blocked": false,
"listingType": "search",
"query": "developer tools",
"items": [
{
"id": "1wi3mi5",
"title": "Is vibe coding creating a hidden technical debt crisis?",
"subreddit": "webdev",
"author": "powleads",
"score": 3241,
"commentCount": 418,
"url": "https://www.reddit.com/r/webdev/comments/1wi3mi5/",
"createdAt": "2026-08-13T03:00:00.000Z"
}
],
"itemCount": 1,
"pagesRequested": 1,
"pagesScraped": 1,
"transport": "old-reddit-html"
}