Reddit API — Getting Started — FetchLayer Docs
Documentation menu
FetchLayer FetchLayer API

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

bash
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

typescript
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

The free tier covers a generous number of requests per month with no credit card required — plenty for testing before you commit to a paid plan.

3. Understand the response

Every endpoint returns structured JSON. Listing endpoints return entries in items together with pagination and scrape metadata.

json
{
  "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"
}

Next steps