Stack Overflow scraper API: search results as JSON
Send any Stack Overflow page URL with recipe=stackoverflow and get title, score, comments and 4 more fields as JSON. No selectors to write, no proxies to pick.
- 1 page type
- 7 fields
- 5 credits a page · $0.50 per 1,000
- Working · 91.7% in 7 days
5,000 free credits for 21 days, no card.
curl -G 'https://api.ujeebu.com/scrape' \
-H "ApiKey: $UJEEBU_API_KEY" \
--data-urlencode 'url=https://stackoverflow.com/questions/tagged/web-scraping' \
--data-urlencode 'recipe=stackoverflow'
{
"result": {
"results": [
{
"title": "Merge two Celery tasks",
"score": "-5",
"comments": "6"
}
]
},
"success": true
}
What you get from Stack Overflow
The fields of each page type and a real sample from our last validation, shortened.
Search and listing pages recipe=stackoverflow 5 credits a page
| Field | Type | Example |
|---|---|---|
results | list of 3+ items | |
results[].url | URL | https://stackoverflow.com/questions/80008831/merge-two-celery-tasks |
results[].title | text | Merge two Celery tasks |
results[].image | image URL | https://i.sstatic.net/zlTU5.png?s=32 |
results[].score | text | -5 |
results[].comments | number (as text) | 6 |
results[].description | text | Let's say I have a web scraping pipeline. For some reason, I use Ce... |
results[].updated | date | 2026-10-14 02:52:47Z |
Sample answer, validated 2026-12-03
{
"results": [
{
"url": "https://stackoverflow.com/questions/80008831/merge-two-celery-tasks",
"title": "Merge two Celery tasks",
"image": "https://i.sstatic.net/zlTU5.png?s=32",
"score": "-5",
"comments": "6",
"description": "Let's say I have a web scraping pipeline. For some reason, I use Celery to write sanitized payloads to the database. Each payload is a list of rows. Due to t...",
"updated": "2026-10-14 02:52:47Z"
},
{
"url": "https://stackoverflow.com/questions/79995776/why-does-selenium-playwright-keep-getting-detected-by-cloudflare-even-with-steal",
"title": "Why does Selenium/Playwright keep getting detected by Cloudflare even with stealth options? [duplicate]",
"image": "https://www.gravatar.com/avatar/ac856fbd26442684a89f853d1a6c349f?s=32&d=identicon&r=PG",
"score": "-8",
"comments": "5",
"description": "I'm working on a web scraping project where I need to extract data from several e-commerce sites. I started with Puppeteer, then tried Playwright with stealt...",
"updated": "2026-08-17 09:32:27Z"
}
]
}
One call
Send the page URL and the recipe name to the Scrape API. The recipe brings the extract rules and the settings that work on Stack Overflow (JavaScript rendering).
curl -G 'https://api.ujeebu.com/scrape' \
-H "ApiKey: $UJEEBU_API_KEY" \
--data-urlencode 'url=https://stackoverflow.com/questions/tagged/web-scraping' \
--data-urlencode 'recipe=stackoverflow'
import os, requests
r = requests.get(
"https://api.ujeebu.com/scrape",
params={"url": "https://stackoverflow.com/questions/tagged/web-scraping", "recipe": "stackoverflow"},
headers={"ApiKey": os.environ["UJEEBU_API_KEY"]},
timeout=120,
)
for item in r.json()["result"]["results"][:3]:
print(item["title"], item["score"], item["comments"])
# Example output:
# Merge two Celery tasks -5 6
# Why does Selenium/Playwright keep get... -8 5
const params = new URLSearchParams({
url: "https://stackoverflow.com/questions/tagged/web-scraping",
recipe: "stackoverflow",
});
const res = await fetch(`https://api.ujeebu.com/scrape?${params}`, {
headers: { ApiKey: process.env.UJEEBU_API_KEY },
});
const { result } = await res.json();
for (const item of result.results.slice(0, 3)) {
console.log(item.title, item.score, item.comments);
}
// Example output:
// Merge two Celery tasks -5 6
// Why does Selenium/Playwright keep get... -8 5
The answer is {"result": {...}} with the headers Ujb-Recipe and Ujb-Credits. Your own parameters always win over the recipe.
Search Stack Overflow with parameters
One call, no URL: send recipe=stackoverflow/search with the parameters below. We build the Stack Overflow search URL and answer the listing JSON, at the same credits as the page call.
| Parameter | Type | Values |
|---|---|---|
tag required | string | A tag to filter questions by topic or technology |
page | int | 1 to 10 |
One call (tag=python)
curl -G 'https://api.ujeebu.com/scrape' \
-H 'ApiKey: YOUR_API_KEY' \
-d 'recipe=stackoverflow/search' \
-d 'tag=python'
import os, requests
r = requests.get(
"https://api.ujeebu.com/scrape",
params={"recipe": "stackoverflow/search", "tag": "python"},
headers={"ApiKey": os.environ["UJEEBU_API_KEY"]},
timeout=120,
)
for item in r.json()["result"]["results"][:3]:
print(item["title"], item["score"], item["comments"])
# Example output:
# Merge two Celery tasks -5 6
# Why does Selenium/Playwright keep get... -8 5
const params = new URLSearchParams({
recipe: "stackoverflow/search",
tag: "python",
});
const res = await fetch(`https://api.ujeebu.com/scrape?${params}`, {
headers: { ApiKey: process.env.UJEEBU_API_KEY },
});
const { result } = await res.json();
for (const item of result.results.slice(0, 3)) {
console.log(item.title, item.score, item.comments);
}
// Example output:
// Merge two Celery tasks -5 6
// Why does Selenium/Playwright keep get... -8 5
The answer carries the built URL in the Ujb-Url header; a missing or invalid parameter answers 400 naming it (free). Have the URL already? Send it with recipe=stackoverflow/listing. Search with parameters in the docs
What people build with Stack Overflow data
Research datasets
Build datasets of public pages for analysis, search or LLM pipelines.
Learn moreTrend tracking
Follow what gets attention over time: scores, comments, stars.
Price
Same price as the page call, no fee for the recipe. Only successful responses are billed; blocked, timed-out and failed requests are free.
| Page type | Credits a page | Per 1,000, Starter | Per 1,000, Pro |
|---|---|---|---|
| Search results | 5 | $0.82 | $0.50 |
FAQ
What does the Stack Overflow recipe return?
JSON with 7 fields from search results (recipe=stackoverflow), for example title, score, comments, description, url. The answer is {"result": {...}} with the fields shown on this page.
How much does it cost to scrape Stack Overflow?
5 credits a page ($0.50 per 1,000 on Pro, $0.82 on Starter). Same price as the page call, no fee for the recipe. Only successful responses are billed; blocked, timed-out and failed requests are free.
Do I need proxies or a headless browser?
No. The recipe brings the settings that work on Stack Overflow: JavaScript rendering. Send only the URL and recipe=stackoverflow.
What happens when Stack Overflow changes its pages?
We check Stack Overflow every day and re-validate the recipe on real pages every week, then fix it when the site changes. Until a fix is live, the API answers 404 "the recipe has no working version" instead of empty data, and that call is free.
Can I search Stack Overflow with parameters?
Yes, in one call: send recipe=stackoverflow/search with tag, page and no URL. We build the Stack Overflow search URL (returned in the Ujb-Url header), apply recipe=stackoverflow/listing and answer its JSON, at the same credits as the page call. A missing or invalid parameter answers 400 naming it, and that call is free.
Related recipes
GitHubSearch results, Page · 5 credits
Hacker NewsSearch results · 1 credits
Hugging FaceSearch results, Page · 1 credits
LinkedInSearch results, Detail page, Profile · 5 credits
AmazonSearch results, Product page · 5 credits
InstagramProfile · 5 credits
Logos and names belong to their owners. Ujeebu is not affiliated with Stack Overflow.
Get Stack Overflow data as JSON today.
5,000 free credits for 21 days. No card.