Developer tutorial
How to scrape Reddit search results with Node.js (2026)
This tutorial shows how to scrape Reddit search results in Node.js using the SocialCrawl API. You get matching posts with title, subreddit, author, score, comment count, and permalink for any search query, with no OAuth app required from one GET request, with no Reddit developer account, proxies, or HTML parsing. The code below is runnable as-is, and the response underneath it is a real, unedited call.
Code tested July 2026
How it works
- 1Get a free API keyCreate a SocialCrawl account and copy your API key from the dashboard. Every new account starts with free credits.
- 2Set up Node.jsUse Node.js 18 or newer, which includes the fetch API with no extra packages.
- 3Call the Reddit Search endpointSend a GET request to /v1/reddit/search with your API key in the x-api-key header and the `query` parameter.
- 4Read the responseParse the JSON. SocialCrawl returns matching posts with title, subreddit, author, score, comment count, and permalink for any search query, with no OAuth app required in one normalized schema, so you write no HTML parsing or proxy code.
The code
A real, unedited response from the request above.
const params = new URLSearchParams({
"query": "best programming languages 2024",
});
const response = await fetch(
`https://www.socialcrawl.dev/v1/reddit/search?${params}`,
{ headers: { "x-api-key": "YOUR_API_KEY" } },
);
const data = await response.json();
console.log(data);[ RESPONSE ]
{
"success": true,
"platform": "reddit",
"endpoint": "/v1/reddit/search",
"data": {
"items": [
{
"post": {
"id": "1u1143i",
"url": "https://www.reddit.com/r/AskTechnology/comments/1u1143i/which_programming_language_do_you_think_will_be/",
"content": {
"text": "Which programming language do you think will be most relevant in the next 5 years, and why?",
"media_urls": null,
"thumbnail_url": null,
"duration_seconds": null
},
"author": {
"username": "Any_Self_2605",
"display_name": "t2_25au9h5u7w",
"avatar_url": null,
"verified": null
},
"engagement": {
"views": null,
"likes": 14,
"comments": 40,
"shares": null,
"saves": null
},
"flags": {
"nsfw": false,
"spoiler": false,
"pinned": null,
"deleted": false
},
"published_at": "2026-06-09T10:27:28.000Z",
"ext": {
"subreddit": "AskTechnology",
"published_at_epoch": 1781000848
}
},
"computed": {
"engagement_rate": null,
"language": "en",
"content_category": "other",
"estimated_reach": null
}
},
{
"post": {
"id": "1uyqq8k",
"url": "https://www.reddit.com/r/AlignmentChartFills/comments/1uyqq8k/and_finally_which_programming_language_is_joy_and/",
"content": {
"text": "And finally: which programming language is joy and powers the world?",
"media_urls": null,
"thumbnail_url": null,
"duration_seconds": null
},
"author": {
"username": "WildXogos",
"display_name": "t2_r71luddl",
"avatar_url": null,
"verified": null
},
"engagement": {
"views": null,
"likes": 1108,
"comments": 739,
"shares": null,
"saves": null
},
"flags": {
"nsfw": false,
"spoiler": false,
"pinned": null,
"deleted": false
},
"published_at": "2026-07-17T05:35:33.000Z",
"ext": {
"subreddit": "AlignmentChartFills",
"published_at_epoch": 1784266533
}
},
"computed": {
"engagement_rate": null,
"language": "en",
"content_category": "other",
"estimated_reach": null
}
}
],
"next_cursor": "eyJjYW5kaWRhdGVzX3JldHVybmVkIjoie1wic2VjdGlvbl8xX3BpcGVsaW5lXzBfZ2xvYmFsX21vZGlmaWVyc1wiOlwiM1wiLFwic2VjdGlvbl8xX3BpcGVsaW5lXzFfbG9jYWxfbW9kaWZpZXJzXCI6XCIzXCIsXCJzZWN0aW9uXzJfcGlwZWxpbmVfMTBfcXVlcnlfc3VnZ2VzdGlvbnNcIjpcIjZcIixcInNlY3Rpb25fMl9waXBlbGluZV84X2R5bmFtaWNfMF9hbnN3ZXJzX3ByZXZpZXdcIjpcIjBcIixcInNlY3Rpb25fMl9waXBlbGluZV84X2R5bmFtaWNfMV9wb3N0X3NlYXJjaFwiOlwiN1wiLFwic2VjdGlvbl8zX3BpcGVsaW5lXzBfZHluYW1pY18wX3N1YnJlZGRpdF9zZWFyY2hcIjpcIjVcIixcInNlY3Rpb25fM19waXBlbGluZV8wX2R5bmFtaWNfMV9hdXRob3Jfc2VhcmNoXCI6XCI1XCJ9IiwiZHluYW1pY19hbGxfcmFua2VyIjoibGVnYWN5X2Fuc3dlcnMiLCJleHBlcmllbmNlX3NlbGVjdGlvbiI6ImR5bmFtaWNfYWxsIiwiZXhwZXJpZW5jZV92ZXJzaW9uIjoiZGVza3RvcCIsInNlY3Rpb25fMl9waXBlbGluZV84X2R5bmFtaW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Dl3YVhCbGJHbHVaVjg0WDJSNWJtRnRhV05mTVY5d2IzTjBYM05sWVhKamFDSTZJamNpZlE9PSIsInAiOiJhZnRlciJ9",
"has_more": true,
"page_size": 7
}
}Prefer another language?
FAQ
Have a question? We got answers
Find answers to frequently asked questions about SocialCrawl's API, pricing, and capabilities.
Contact usDo I need a Reddit developer account to scrape Reddit search results?
No. SocialCrawl handles authentication and proxies upstream, so you never register a Reddit app, manage OAuth tokens, or run your own scrapers. One API key returns Reddit data directly.
What does the Reddit Search endpoint return?
It returns matching posts with title, subreddit, author, score, comment count, and permalink for any search query, with no OAuth app required. The response is normalized into SocialCrawl's unified schema, identical in shape across every platform.
How much does it cost to scrape Reddit search results?
Each call costs a small number of credits, and new accounts start with free credits. There are no monthly minimums, so you pay only for the calls you make.
Can I use this Node.js code in production?
Yes. The snippet on this page is the real request against the live API. For production, add error handling and follow the response cursor to paginate through large result sets.
Ask AI about SocialCrawl
