Spiral gives your agent every tool with one account. Browse the tools →

AlexandriaSocial MediaAvailable now

Stack Exchange · Search

stackexchange-com/questions/search

Get public social media posts, profiles and videos with Stack Exchange · Search from Alexandria through one Spiral API key. Questions on one Stack Exchange site matching free text (q: one term or up to 5 searched together), tags, or title/body text, optionally inside a creation-date window (fromdate/todate) and score/date bounds (min/max); accepted: true keeps only questions with an accepted answer. It runs in the background and returns structured JSON. Pay as you go, with no subscription.

Pricing

$0.00873 per call.

Limits

Runs
In the background
Returns
json
Longest queue wait
1 hour
Run deadline
5 minutes
Longest run, end to end
225 minutes
Largest inline input
1 MB
Largest input file
2 GB
Largest output
5 GB

Input

FieldKindDefaultDescription
qtext—

Free-text query matched against title and body, or up to 5 such terms searched in one call (one upstream request per term; questions is the merged, de-duplicated union and terms reports each term's own count and total). The site's search syntax applies: [tag] matches a tag, quotes match an exact phrase.

keytext—

Optional Stack Exchange application key. Raises the per-IP quota from 300 to 10,000 requests per day and unlocks pages above 25, which the API refuses anonymously. Keys are public identifiers, not secrets.

maxnumber—

Upper bound on the sort field: score for sort: votes, Unix seconds for activity or creation. Not accepted with relevance.

minnumber—

Lower bound on the sort field: score for sort: votes, Unix seconds for activity or creation. Not accepted with relevance.

urltext—

A pasted site search URL (https://stackoverflow.com/search?q=..., any Stack Exchange host) or tag listing URL (https://superuser.com/questions/tagged/windows+powershell). The site comes from the host, q from the search URL and tagged from the listing path; tab maps to sort (a tag listing defaults to creation, like the site). Not combinable with q or tagged; an explicit site must match the host.

bodytext—

Text that must appear in the body.

pagenumber
1 to 10000
1

Pages above 25 need key: Stack Exchange serves deeper pages only with an application key (access_denied otherwise). Without one the last page reports partial coverage.

sitetextstackoverflow

Stack Exchange site API parameter, e.g. stackoverflow, superuser, math, askubuntu, english, physics. Use sites to list them. Pattern: ^[a-z0-9]+(\.[a-z0-9]+)*$.

sortone of
relevance, votes, activity, creation
—

Defaults to relevance, or to creation when fromdate or todate is given so a date window reads as a timeline.

orderone of
desc, asc
desc

order

titletext—

Text that must appear in the title.

closedtrue or false—

closed

taggedlist—

Every tag must be present on the question.

todatenumber—

Upper bound on the question's creation time, inclusive: Unix seconds, YYYY-MM-DD or an RFC 3339 date-time (UTC). A date-only value covers that whole day.

acceptedtrue or false—

true: only questions with an accepted answer; false: only without.

fromdatenumber—

Lower bound on the question's creation time, inclusive: Unix seconds, YYYY-MM-DD or an RFC 3339 date-time (UTC).

pagesizenumber
1 to 100
10

pagesize

nottaggedlist—

None of these tags may be present.

min_answersnumber
0 to 1000
—

min_answers

include_bodytrue or false—

true adds body_html/body_markdown to every question; off by default because bodies dominate the response size.

Same request in code

curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "alexandria",
    "model": "stackexchange-com/questions/search",
    "input": {
      "q": "<q>"
    }
  }'

Frequently asked questions

How much does Stack Exchange · Search cost?

$0.00873 per call. You pay as you go from one Spiral balance, with no subscription, and a failed run is not charged.

How do I use Stack Exchange · Search through an API?

Send `POST /v1/runs` with `"provider": "alexandria"`, `"model": "stackexchange-com/questions/search"` and the input fields on this page, using one Spiral API key. It runs in the background: poll the run, or name a webhook to be told when it finishes.

Do I need an account with Alexandria to use Stack Exchange · Search?

No. Spiral runs it on its own Alexandria account and charges your Spiral balance.

Can my AI agent use Stack Exchange · Search?

Yes. Agents find and run it through Spiral's MCP server, CLI or agent skill, with the same API key.