Skip to the content

Scraper API

Stack Overflow

stackexchange.searchAvailable

Stack Overflow search

A page of the questions found: title, the question's text, tags, score, answer and view counts, whether it has an accepted answer, who asked it, and dates.

Give it Words, tags or both, and the Stack Exchange site to search: Stack Overflow unless you name another.

1 unit a run, for runs that return data. Runs that fail cost nothing. How units work

Counted
1 unit a run
Inputs
8
Record
23 fields
A run takes
up to 5 minutes
Records kept
7 days
Measured
its success, on the status page

POST/v1/scrapers/stackexchange.search/runs

{
"input": {
"query": "python asyncio timeout",
"max_results": 5
}
}

sent, and answered

a record of the run23 fields

{
site: "stackoverflow"
question_id: 64534844
title: "python asyncio aiohttp timeout"
url: "https://stackoverflow.com/questions/64534844/python-asyncio-aiohttp-ti…
tags: [ "python", "http", "python-asyncio" ]
score: 13
answer_count: 3
view_count: 53430
is_answered: true
… 14 more fields

ok1 unit a run

A record this scraper returned for this input. The first 9 of its 23 fields are set down here; the whole record is below.

stackoverflow.com
The page Stack Overflow search reads, as a browser shows it
The page this scraper reads, photographed in a browser on 19 November 2026. It belongs to its publisher, who has no part in this service.

What it is used for

Find what your users ask
Search a site by your product's tag and read the questions with their scores and view counts, newest or most voted first.
Answer what is waiting
Search with accepted set to false and list the questions about your tool that no answer has settled yet.
Measure interest in a technology
Count the questions a tag gathers by created_at, with the views each has had, to compare languages, libraries or tools.

What you send

Words, tags or both, and the Stack Exchange site to search: Stack Overflow unless you name another. These are its 8 inputs, as its schema has them.

querystring Optional
The words to search for, in titles and bodies. May be left out when tags are given.
sitestring Optional
stackoverflow, superuser, serverfault, askubuntu, math, or any other Stack Exchange site's name or host name.Default stackoverflow
tagslist of strings Optional
Only questions that carry every one of these tags.
sortstring Optional
relevance, votes, creation or activity. relevance unless you say otherwise.Default relevance
orderstring Optional
desc or asc.Default desc
acceptedboolean Optional
true for questions with an accepted answer only, false for those without.
max_resultsinteger Optional
Questions a page: 1 to 100, 30 unless you say otherwise.Default 30
pageinteger Optional
The results page, from 1 to 25.Default 1

A request, ready to send

It starts a run with the input shown at the top of this page, waits up to 60 seconds for it, and reads its records. Put your key in the variable it reads.

# Start a run and wait up to 60 seconds for it to finish
curl -X POST "https://api.enrichednow.com/v1/scrapers/stackexchange.search/runs?wait=60" \
  -H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":{"query":"python asyncio timeout","max_results":5}}'

# Read its records, with the id the first call answered
curl "https://api.enrichednow.com/v1/runs/$RUN_ID/records?limit=100" \
  -H "Authorization: Bearer $ENRICHEDNOW_API_KEY"
from enrichednow import EnrichedNow

client = EnrichedNow()  # reads ENRICHEDNOW_API_KEY

# Start a run, wait for it to end, and get its records
result = client.scrape("stackexchange.search", {
    "query": "python asyncio timeout",
    "max_results": 5,
})
print(result.run.id, result.run.status, result.run.record_count)

# Read its records: pages are fetched as you go
for record in result.records:
    print(record)

Install it with pip install enrichednow, then save as run.py and run python3 run.py

import EnrichedNow from "enrichednow";

const client = new EnrichedNow(); // reads ENRICHEDNOW_API_KEY

// Start a run, wait for it to end, and get its records
const { run, records } = await client.scrape("stackexchange.search", {
  query: "python asyncio timeout",
  max_results: 5,
});
console.log(run.id, run.status, run.record_count);

// Read its records: pages are fetched as you go
for await (const record of records) console.log(record);

Install it with npm install enrichednow, then save as run.mjs and run node run.mjs

package main

import (
	"context"
	"fmt"
	"log"
	"time"

	enrichednow "github.com/enrichednow/enrichednow-go"
)

func main() {
	client, err := enrichednow.NewClient() // reads ENRICHEDNOW_API_KEY
	if err != nil {
		log.Fatal(err)
	}
	ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
	defer cancel()

	// Start a run, wait for it to end, and get its records
	run, records, err := client.Scrape(ctx, "stackexchange.search", map[string]any{"query": "python asyncio timeout", "max_results": 5})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(run.ID, run.Status, run.RecordCount)

	// Read its records: pages are fetched as you go
	for records.Next() {
		fmt.Println(string(records.Current()))
	}
	if err := records.Err(); err != nil {
		log.Fatal(err)
	}
}

Install it with go get github.com/enrichednow/enrichednow-go@latest, then save as run.go and run go run run.go

import com.enrichednow.EnrichedNowClient;
import com.enrichednow.ScrapeResult;
import java.util.Map;

public class Run {
    public static void main(String[] args) {
        EnrichedNowClient client = EnrichedNowClient.fromEnv(); // reads ENRICHEDNOW_API_KEY

        // Start a run, wait for it to end, and get its records
        ScrapeResult result = client.scrape("stackexchange.search", Map.of("query", "python asyncio timeout", "max_results", 5));
        System.out.println(result.run().id() + " " + result.run().status() + " " + result.run().recordCount());

        // Read its records: pages are fetched as you go
        for (Map<String, Object> record : result.records()) {
            System.out.println(record);
        }
    }
}

Add com.enrichednow:enrichednow-java:0.4.0 to your Maven or Gradle build, then save as Run.java

enrichednow run stackexchange.search --input 'query=python asyncio timeout' --input max_results=5

Install it with curl -fsSL https://raw.githubusercontent.com/enrichednow/enrichednow-cli/main/install.sh | sh

What comes back

A page of the questions found: title, the question's text, tags, score, answer and view counts, whether it has an accepted answer, who asked it, and dates. A record has 23 fields. One we could not read is null, never an empty string or a zero.

A record stackexchange.search returned
{
  "site": "stackoverflow",
  "question_id": 64534844,
  "title": "python asyncio aiohttp timeout",
  "url": "https://stackoverflow.com/questions/64534844/python-asyncio-aiohttp-timeout",
  "tags": [
    "python",
    "http",
    "python-asyncio"
  ],
  "score": 13,
  "answer_count": 3,
  "view_count": 53430,
  "is_answered": true,
  "accepted_answer_id": 64686124,
  "body": "Word of notice: This is my first approach with asyncio, so I might have done something really stupid.\n\nScenario is as follows:\n\nI need to \"http-ping\" a humongous list of urls to check if they respond 200 or any other value. I get timeouts … [truncated]",
  "owner_name": "glezo",
  "owner_id": 6042172,
  "owner_reputation": 889,
  "owner_url": "https://stackoverflow.com/users/6042172/glezo",
  "created_at": "2020-10-26T09:54:20Z",
  "last_activity_at": "2024-09-09T11:27:35Z",
  "last_edited_at": "2020-10-26T11:53:04Z",
  "closed_reason": null,
  "license": "CC BY-SA 4.0",
  "position": 2,
  "page": 1,
  "fetched_at": "2026-11-19T18:07:41.325491Z"
}

The scraper returned this record for the input above, reading a saved copy of the page, not the live site.

Values shortened for this page: body: 2,863 characters, the first 238 shown.

The fields of a record

sitestring
The Stack Exchange site the question is on, as it was asked for: stackoverflow, superuser, math, or a host name.
question_idinteger
The site's id of the question.
titlestring
The question's title.
urlstring or null
The question's address on the site.
tagslist of strings
The question's tags, e.g. ["python", "asyncio"].
scoreinteger or null
The question's votes: up minus down.
answer_countinteger or null
How many answers the question has.
view_countinteger or null
How often the question was viewed.
is_answeredboolean or null
True when an answer was accepted or has a positive score.
accepted_answer_idinteger or null
The id of the accepted answer; null when none was accepted.
bodystring or null
The question as plain text: paragraphs on their own lines, code kept as written.
owner_namestring or null
The display name of the account that posted it; null when the account was deleted.
owner_idinteger or null
The site's numeric id of that account.
owner_reputationinteger or null
That account's reputation on the site.
owner_urlstring or null
That account's public profile on the site.
created_atdatetime or null
When the question was asked, in UTC.
last_activity_atdatetime or null
When the question, an answer or a comment last changed, in UTC.
last_edited_atdatetime or null
When the question was last edited, in UTC; null when it never was.
closed_reasonstring or null
Why the question was closed, in the site's words, e.g. "Duplicate"; null for an open question.
licensestring or null
The licence the text is published under, e.g. "CC BY-SA 4.0".
positioninteger
The question's place in the whole result list, from 1.
pageinteger
The results page the question was on.
fetched_atdatetime
When the results were read, in UTC.

The whole schema, in its reference

Units and limits

Counted per request
Billed per request: a run that returns data costs 1 unit, however many records it returns.
A miss costs nothing
A run that fails, that meets something not supported yet, or that you cancel costs nothing. You pay for runs that return data.
What bounds a run
A run may take up to 5 minutes. Its records are read in pages of up to 1,000 and are kept for 7 days.

What it does not do

  • One run reads one page of results, and 25 pages of a search at most.
  • Stack Exchange's API answers a caller without an application key about 300 requests a day from one network address; these scrapers use no key, so the allowance is shared and heavy use can reach it. A search is one request. When the allowance is used up the run ends as failed, with the reason rate_limited, and costs nothing.
  • Answers and comments are not searched: use the question scraper for a question's answers.

The bounds its schema sets

tags
at most 5 items
sort
relevance, votes, creation, activity; relevance unless you say otherwise
order
desc, asc; desc unless you say otherwise
max_results
1 to 100; 30 unless you say otherwise
page
1 to 25; 1 unless you say otherwise

Scraper API pricing: how units workThe five ways a run ends

Questions

What does Stack Overflow search return?

A page of the questions found: title, the question's text, tags, score, answer and view counts, whether it has an accepted answer, who asked it, and dates. A record has 23 fields, among them site, question_id, title, url, tags and score. A value that could not be read is null, never an empty string or a zero.

What do I send?

Words, tags or both, and the Stack Exchange site to search: Stack Overflow unless you name another. Optional: query, site, tags, sort, order, accepted, max_results and page.

How is it counted?

Billed per request: a run that returns data costs 1 unit, however many records it returns. A run that fails, that meets something not supported yet, or that you cancel costs nothing. The first 1,000 units each month are free.

How much does one run return?

Its schema sets these bounds: tags at most 5 items; sort relevance, votes, creation, activity (relevance unless you say otherwise); order desc, asc (desc unless you say otherwise); max_results 1 to 100 (30 unless you say otherwise); page 1 to 25 (1 unless you say otherwise). A run may take up to 5 minutes.

What does it not do?

One run reads one page of results, and 25 pages of a search at most. Stack Exchange's API answers a caller without an application key about 300 requests a day from one network address; these scrapers use no key, so the allowance is shared and heavy use can reach it. A search is one request. When the allowance is used up the run ends as failed, with the reason rate_limited, and costs nothing. Answers and comments are not searched: use the question scraper for a question's answers.

How long are the records kept, and in what format do they come?

Records are kept for 7 days after the run ended, and read in pages of up to 1,000. They come as JSON, as NDJSON with one record a line, or as CSV with a column for each field.

Can an AI assistant call it?

Yes. Through the EnrichedNow MCP server an assistant calls the tool run_scraper with the scraper_id stackexchange.search and the same input. It costs what the same API call costs.

Used in this playbook

A playbook runs Stack Overflow search as one of its steps and hands back the finished list. Its runs of this scraper cost what they cost here, and the playbook adds nothing.

  • Finance

    Social Sentiment

    How often the tickers and brands you follow are mentioned on social sources, in what tone, and how both moved since the last run.

Stack Overflow

Questions and answers on Stack Overflow and every other Stack Exchange site: Super User, Server Fault, Ask Ubuntu, Mathematics and the rest.

  • Stack Overflow question

    stackexchange.question

    A question's id, or its address on Stack Overflow or another Stack Exchange site. The question — title, text, tags, score, views, who asked it, dates — and its answers: text, score, which one was accepted, who wrote each, and dates.

Stack Overflow on the line-up

Where
Worldwide

Run it on an input of your own.

Create an account, make a key, and send the request above with your own input. The first 1,000 units each month are free.