crawlbaseDocs
Log in

API usage

Add &scraper=reddit-serp to a Crawling API request. URL-encode the target URL in the url parameter.

curl 'https://api.crawlbase.com/?token=YOUR_TOKEN' \
  --data-urlencode 'url=https://www.reddit.com/search/?q=web+scraping' \
  --data-urlencode 'scraper=reddit-serp' -G
from crawlbase import CrawlingAPI

api = CrawlingAPI({'token': 'YOUR_TOKEN'})
res = api.get(
    'https://www.reddit.com/search/?q=web+scraping',
    {'scraper': 'reddit-serp'}
)

import json
data = json.loads(res['body'])
const { CrawlingAPI } = require('crawlbase');
const api = new CrawlingAPI({ token: 'YOUR_TOKEN' });

const res = await api.get(
  'https://www.reddit.com/search/?q=web+scraping',
  { scraper: 'reddit-serp' }
);
const data = JSON.parse(res.body);
require 'crawlbase'
api = Crawlbase::API.new(token: 'YOUR_TOKEN')

res = api.get('https://www.reddit.com/search/?q=web+scraping', scraper: 'reddit-serp')
data = JSON.parse(res.body)

Example input URL

The URL passed in the url parameter (URL-decoded for readability):

https://www.reddit.com/search/?q=web+scraping

Response shape

JSON response body. Field types may be null when the source page omits the value.

query
string
Search query that produced these results.
sort
string
Sort order applied to the search (for example relevance, new, top).
time
string
Time window applied to the search (for example all, day, week).
restrictSubreddit
boolean
True when the search was scoped to a single subreddit.
resultCount
integer
Number of results returned in results.
pagination
object
Pagination cursor for the next and previous pages.
pagination.next_page_url
string | null
URL for the next page of results, or null on the last page.
pagination.previous_page_url
string | null
URL for the previous page of results, or null on the first page.
pagination.has_next
boolean
True when a next page is available.
results
array
Search results, in ranked order.
results[].position
integer
Position of the result in the returned list (1-based).
results[].id
string
Reddit fullname of the post (for example t3_...).
results[].title
string
Post title.
results[].url
string
URL of the result on Reddit.
results[].author
string
Username of the post author.
results[].subreddit
string
Subreddit the post belongs to (without the r/ prefix).
results[].score
integer
Post score (upvotes minus downvotes).
results[].commentsCount
integer
Number of comments on the post.
results[].createdAt
string
Post creation time (ISO 8601).
results[].linkUrl
string
Outbound link the post points to.
results[].domain
string
Domain of the outbound link.
subreddits
array
Related subreddits surfaced alongside the results.
subreddits[].name
string
Subreddit name (without the r/ prefix).
subreddits[].url
string
Canonical subreddit URL.
subreddits[].subscribers
integer | null
Subscriber count of the subreddit.
subreddits[].description
string | null
Short subreddit description.

Sample response

{
  "query": "web scraping",
  "sort": "relevance",
  "time": "all",
  "restrictSubreddit": false,
  "resultCount": 2,
  "pagination": {
    "next_page_url": "https://old.reddit.com/search?q=web+scraping&count=25&after=t3_1c7aaaa",
    "previous_page_url": null,
    "has_next": true
  },
  "results": [
    {
      "position": 1,
      "id": "t3_1c7aaaa",
      "title": "What is the most reliable way to do web scraping at scale in 2026?",
      "url": "https://old.reddit.com/r/webdev/comments/1c7aaaa/what_is_the_most_reliable_way_to_do_web_scraping/",
      "author": "datawrangler",
      "subreddit": "webdev",
      "score": 486,
      "commentsCount": 133,
      "createdAt": "2026-06-30T14:22:10+00:00",
      "linkUrl": "https://old.reddit.com/r/webdev/comments/1c7aaaa/what_is_the_most_reliable_way_to_do_web_scraping/",
      "domain": "old.reddit.com"
    }
  ],
  "subreddits": [
    {
      "name": "webscraping",
      "url": "https://old.reddit.com/r/webscraping/",
      "subscribers": 84210,
      "description": "A community for web scraping, crawling and data extraction."
    }
  ]
}