Stack Overflow

Search Stack Overflow questions

Search Stack Overflow questions and answers by words, title, body, tag, author or answer count, with snippets.

GET/v1/stack-overflow/questions/search
1credit
x-api-keystringheader

API key (`sfk_...`)

Parameters
19
sitestringquery

Stack Exchange site, by its API name (`askubuntu`, `serverfault`, `math`, `ru.stackoverflow`). Default: `stackoverflow`. The sites endpoint lists them all.

qstringquery

Free text to find in titles, bodies and tags.

min 1 chars · max 200 chars

titlestringquery

Text that must be in the title.

min 1 chars · max 200 chars

bodystringquery

Text that must be in the question body.

min 1 chars · max 200 chars

taggedarrayquery

Only questions that carry all of these tags, comma-separated, up to 5.

notTaggedarrayquery

Leave out questions that carry any of these tags, comma-separated, up to 5.

userintegerquery

Only questions asked by this user id.

≥ -1 · ≤ 2147483647

acceptedbooleanquery

`true` for questions with an accepted answer, `false` for those without.

closedbooleanquery

`true` for closed questions, `false` for open ones.

answersMinintegerquery

Only questions with at least this many answers.

≥ 0 · ≤ 1000000000

viewsMinintegerquery

Only questions with at least this many views.

≥ 0 · ≤ 1000000000

createdAfterstringquery

Only questions asked at or after this time, as an ISO 8601 date or time (such as `2026-01-31`) or epoch seconds. A time with no zone is UTC.

createdBeforestringquery

Only questions asked before this time, as an ISO 8601 date or time (such as `2026-01-31`) or epoch seconds. A time with no zone is UTC.

sortstringquery

Order: `relevance` (default), `creation` (the only one that pages without a ceiling), `activity` or `votes`. Ties can repeat or skip rows.

one of: relevance, creation, activity, votes

orderstringquery

Direction of the sort: `desc` (default) or `asc`.

one of: desc, asc

modestringquery

`full` (default) returns questions. `excerpt` returns the questions and answers that match, each with a highlighted snippet.

one of: full, excerpt

includearrayquery

`body` adds the question text (HTML and Markdown) to each row in `full` mode. Default: none.

limitintegerquery

Up to this many rows per page, 1 to 100. Default: 30. A page can hold fewer than `limit` rows where rows share a creation second or a block of 100 rows ends. Follow `page.nextCursor` until `hasMore` is false.

≥ 1 · ≤ 100

cursorstringquery

Cursor from `page.nextCursor` of the previous response. It only works with the same filters.

min 1 chars · max 1024 chars

Response fields
220

Endpoint-specific response payload.

datasite
string

The site that was searched.

datamode
string

Which list below is filled.

one of: full, excerpt

The matching questions in `full` mode; null in `excerpt` mode.

dataquestions[]id
integer

Question id.

dataquestions[]url
stringnullable

Link to the question.

dataquestions[]title
stringnullable

Title, with HTML entities decoded.

Tags.

dataquestions[]tags[]
stringoptional
dataquestions[]score
integernullable

Votes up minus votes down.

Vote counts.

dataquestions[]votesup
integernullable

Upvotes.

dataquestions[]votesdown
integernullable

Downvotes.

dataquestions[]viewCount
integernullable

Views.

dataquestions[]answerCount
integernullable

Answers.

dataquestions[]commentCount
integernullable

Comments on the question.

dataquestions[]favoriteCount
integernullable

Times favourited.

dataquestions[]isAnswered
booleannullable

Whether it has an accepted or upvoted answer.

dataquestions[]acceptedAnswerId
integernullable

The accepted answer; null when none.

dataquestions[]createdAt
stringnullable

When it was asked, ISO 8601 UTC.

dataquestions[]lastActivityAt
stringnullable

Last activity, ISO 8601 UTC.

dataquestions[]lastEditedAt
stringnullable

Last edit, ISO 8601 UTC; null when never edited.

dataquestions[]communityWikiAt
stringnullable

When it became a community wiki; null when it is not.

dataquestions[]protectedAt
stringnullable

When it was protected; null when it is not.

dataquestions[]lockedAt
stringnullable

When it was locked; null when it is not.

Why it was closed; null when it is open.

dataquestions[]closedat
stringnullable

When it was closed, ISO 8601 UTC.

dataquestions[]closedreason
stringnullable

Why it was closed, e.g. `Duplicate`.

dataquestions[]closeddescriptionHtml
stringnullable

The explanation shown on the question, as HTML.

The users who voted to close.

dataquestions[]closedbyUsers[]id
integernullable

User id on this site; null for a deleted user.

dataquestions[]closedbyUsers[]accountId
integernullable

Network-wide account id, the same on every site.

dataquestions[]closedbyUsers[]name
stringnullable

Display name.

dataquestions[]closedbyUsers[]url
stringnullable

Profile URL.

dataquestions[]closedbyUsers[]imageUrl
stringnullable

Avatar URL.

dataquestions[]closedbyUsers[]reputation
integernullable

Reputation on this site.

dataquestions[]closedbyUsers[]type
stringnullable

Kind of account.

one of: registered, moderator, unregistered, does_not_exist, team_admin, null

dataquestions[]closedbyUsers[]acceptRate
integernullable

Percent of the user's questions with an accepted answer; null when not shown.

The questions this one duplicates.

dataquestions[]closedoriginalQuestions[]id
integer

Question id of the original.

dataquestions[]closedoriginalQuestions[]title
stringnullable

Its title.

dataquestions[]closedoriginalQuestions[]answerCount
integernullable

Its answer count.

dataquestions[]closedoriginalQuestions[]accepted
booleannullable

Whether it has an accepted answer.

The open bounty; null when none.

dataquestions[]bountyamount
integernullable

Reputation offered.

dataquestions[]bountyclosesAt
stringnullable

When the bounty closes, ISO 8601 UTC.

Who offered it.

dataquestions[]bountysponsorid
integernullable

User id on this site; null for a deleted user.

dataquestions[]bountysponsoraccountId
integernullable

Network-wide account id, the same on every site.

dataquestions[]bountysponsorname
stringnullable

Display name.

dataquestions[]bountysponsorurl
stringnullable

Profile URL.

dataquestions[]bountysponsorimageUrl
stringnullable

Avatar URL.

dataquestions[]bountysponsorreputation
integernullable

Reputation on this site.

dataquestions[]bountysponsortype
stringnullable

Kind of account.

one of: registered, moderator, unregistered, does_not_exist, team_admin, null

dataquestions[]bountysponsoracceptRate
integernullable

Percent of the user's questions with an accepted answer; null when not shown.

The lock, protection or bounty banner; null when none.

dataquestions[]noticebodyHtml
stringnullable

The banner text as HTML (a lock, a protection or a bounty).

dataquestions[]noticecreatedAt
stringnullable

When the banner was put up, ISO 8601 UTC.

dataquestions[]noticeownerUserId
integernullable

Who put it up.

Who asked it.

dataquestions[]authorid
integernullable

User id on this site; null for a deleted user.

dataquestions[]authoraccountId
integernullable

Network-wide account id, the same on every site.

dataquestions[]authorname
stringnullable

Display name.

dataquestions[]authorurl
stringnullable

Profile URL.

dataquestions[]authorimageUrl
stringnullable

Avatar URL.

dataquestions[]authorreputation
integernullable

Reputation on this site.

dataquestions[]authortype
stringnullable

Kind of account.

one of: registered, moderator, unregistered, does_not_exist, team_admin, null

dataquestions[]authoracceptRate
integernullable

Percent of the user's questions with an accepted answer; null when not shown.

Who edited it last; null when never edited.

dataquestions[]lastEditorid
integernullable

User id on this site; null for a deleted user.

dataquestions[]lastEditoraccountId
integernullable

Network-wide account id, the same on every site.

dataquestions[]lastEditorname
stringnullable

Display name.

dataquestions[]lastEditorurl
stringnullable

Profile URL.

dataquestions[]lastEditorimageUrl
stringnullable

Avatar URL.

dataquestions[]lastEditorreputation
integernullable

Reputation on this site.

dataquestions[]lastEditortype
stringnullable

Kind of account.

one of: registered, moderator, unregistered, does_not_exist, team_admin, null

dataquestions[]lastEditoracceptRate
integernullable

Percent of the user's questions with an accepted answer; null when not shown.

dataquestions[]license
stringnullable

Content licence, e.g. `CC BY-SA 4.0`; null when the site does not say.

dataquestions[]migratedFrom
stringnullable

The site it was moved from; null when it was not moved.

dataquestions[]migratedTo
stringnullable

The site it was moved to; null when it was not moved.

dataquestions[]bodyHtml
stringnullable

Question text as HTML; null on lists that were not asked for bodies.

dataquestions[]bodyMarkdown
stringnullable

Question text as Markdown; null on lists that were not asked for bodies.

The answers when asked for with `include=answers`; null otherwise.

dataquestions[]answers[]id
integer

Answer id.

dataquestions[]answers[]questionId
integernullable

The question it answers.

dataquestions[]answers[]questionTitle
stringnullable

Title of the question it answers, with HTML entities decoded.

Tags of the question it answers, filled when the answer is nested in its question; empty on answer lists, which do not carry them.

dataquestions[]answers[]tags[]
stringoptional
dataquestions[]answers[]url
stringnullable

Link to the answer.

dataquestions[]answers[]score
integernullable

Votes up minus votes down.

Vote counts.

dataquestions[]answers[]votesup
integernullable

Upvotes.

dataquestions[]answers[]votesdown
integernullable

Downvotes.

dataquestions[]answers[]isAccepted
booleannullable

Whether the asker accepted it.

dataquestions[]answers[]createdAt
stringnullable

When it was posted, ISO 8601 UTC.

dataquestions[]answers[]lastActivityAt
stringnullable

Last edit or activity, ISO 8601 UTC.

dataquestions[]answers[]lastEditedAt
stringnullable

Last edit, ISO 8601 UTC; null when never edited.

dataquestions[]answers[]communityWikiAt
stringnullable

When it became a community wiki; null when it is not.

dataquestions[]answers[]lockedAt
stringnullable

When it was locked; null when it is not.

Who wrote it.

dataquestions[]answers[]authorid
integernullable

User id on this site; null for a deleted user.

dataquestions[]answers[]authoraccountId
integernullable

Network-wide account id, the same on every site.

dataquestions[]answers[]authorname
stringnullable

Display name.

dataquestions[]answers[]authorurl
stringnullable

Profile URL.

dataquestions[]answers[]authorimageUrl
stringnullable

Avatar URL.

dataquestions[]answers[]authorreputation
integernullable

Reputation on this site.

dataquestions[]answers[]authortype
stringnullable

Kind of account.

one of: registered, moderator, unregistered, does_not_exist, team_admin, null

dataquestions[]answers[]authoracceptRate
integernullable

Percent of the user's questions with an accepted answer; null when not shown.

Who edited it last; null when never edited.

dataquestions[]answers[]lastEditorid
integernullable

User id on this site; null for a deleted user.

dataquestions[]answers[]lastEditoraccountId
integernullable

Network-wide account id, the same on every site.

dataquestions[]answers[]lastEditorname
stringnullable

Display name.

dataquestions[]answers[]lastEditorurl
stringnullable

Profile URL.

dataquestions[]answers[]lastEditorimageUrl
stringnullable

Avatar URL.

dataquestions[]answers[]lastEditorreputation
integernullable

Reputation on this site.

dataquestions[]answers[]lastEditortype
stringnullable

Kind of account.

one of: registered, moderator, unregistered, does_not_exist, team_admin, null

dataquestions[]answers[]lastEditoracceptRate
integernullable

Percent of the user's questions with an accepted answer; null when not shown.

dataquestions[]answers[]license
stringnullable

Content licence, e.g. `CC BY-SA 4.0`.

dataquestions[]answers[]commentCount
integernullable

Comments on the answer.

The bounty this answer was awarded; null when none.

dataquestions[]answers[]bountyAwardedamount
integernullable

Reputation awarded.

Who received it.

dataquestions[]answers[]bountyAwardedusers[]id
integernullable

User id on this site; null for a deleted user.

dataquestions[]answers[]bountyAwardedusers[]accountId
integernullable

Network-wide account id, the same on every site.

dataquestions[]answers[]bountyAwardedusers[]name
stringnullable

Display name.

dataquestions[]answers[]bountyAwardedusers[]url
stringnullable

Profile URL.

dataquestions[]answers[]bountyAwardedusers[]imageUrl
stringnullable

Avatar URL.

dataquestions[]answers[]bountyAwardedusers[]reputation
integernullable

Reputation on this site.

dataquestions[]answers[]bountyAwardedusers[]type
stringnullable

Kind of account.

one of: registered, moderator, unregistered, does_not_exist, team_admin, null

dataquestions[]answers[]bountyAwardedusers[]acceptRate
integernullable

Percent of the user's questions with an accepted answer; null when not shown.

dataquestions[]answers[]bodyHtml
stringnullable

Answer text as HTML; null when bodies were not asked for.

dataquestions[]answers[]bodyMarkdown
stringnullable

Answer text as Markdown; null when bodies were not asked for.

Comments on the answer when asked for with `include=comments`; null otherwise.

dataquestions[]answers[]comments[]id
integer

Comment id.

dataquestions[]answers[]comments[]postId
integernullable

The question or answer the comment is on.

dataquestions[]answers[]comments[]postType
stringnullable

Whether the comment is on a question or an answer; null when not known.

one of: question, answer, null

dataquestions[]answers[]comments[]url
stringnullable

Link to the comment.

dataquestions[]answers[]comments[]score
integernullable

Upvotes the comment received.

dataquestions[]answers[]comments[]edited
booleannullable

Whether the comment was edited. The flag comes from the route that returned the comment, so the same comment can differ between routes.

dataquestions[]answers[]comments[]createdAt
stringnullable

When it was written, ISO 8601 UTC.

Who wrote it.

dataquestions[]answers[]comments[]authorid
integernullable

User id on this site; null for a deleted user.

dataquestions[]answers[]comments[]authoraccountId
integernullable

Network-wide account id, the same on every site.

dataquestions[]answers[]comments[]authorname
stringnullable

Display name.

dataquestions[]answers[]comments[]authorurl
stringnullable

Profile URL.

dataquestions[]answers[]comments[]authorimageUrl
stringnullable

Avatar URL.

dataquestions[]answers[]comments[]authorreputation
integernullable

Reputation on this site.

dataquestions[]answers[]comments[]authortype
stringnullable

Kind of account.

one of: registered, moderator, unregistered, does_not_exist, team_admin, null

dataquestions[]answers[]comments[]authoracceptRate
integernullable

Percent of the user's questions with an accepted answer; null when not shown.

The user the comment is addressed to, when it is a reply. Null when the comment is not a reply; on the comments-by-post routes it is always null because those routes do not carry reply targets.

dataquestions[]answers[]comments[]replyToid
integernullable

User id on this site; null for a deleted user.

dataquestions[]answers[]comments[]replyToaccountId
integernullable

Network-wide account id, the same on every site.

dataquestions[]answers[]comments[]replyToname
stringnullable

Display name.

dataquestions[]answers[]comments[]replyTourl
stringnullable

Profile URL.

dataquestions[]answers[]comments[]replyToimageUrl
stringnullable

Avatar URL.

dataquestions[]answers[]comments[]replyToreputation
integernullable

Reputation on this site.

dataquestions[]answers[]comments[]replyTotype
stringnullable

Kind of account.

one of: registered, moderator, unregistered, does_not_exist, team_admin, null

dataquestions[]answers[]comments[]replyToacceptRate
integernullable

Percent of the user's questions with an accepted answer; null when not shown.

dataquestions[]answers[]comments[]isByPostAuthor
booleannullable

Whether the comment's author wrote the post it is on; null on lists that do not carry it.

dataquestions[]answers[]comments[]license
stringnullable

Content licence, e.g. `CC BY-SA 4.0`.

dataquestions[]answers[]comments[]bodyHtml
stringnullable

Comment text as HTML.

dataquestions[]answers[]comments[]bodyMarkdown
stringnullable

Comment text as Markdown; null on lists that do not carry it.

dataquestions[]answersComplete
booleannullable

False when the list in `answers` has fewer answers than `answerCount` says the question has; null when answers were not asked for.

Comments on the question when asked for with `include=comments`; null otherwise.

dataquestions[]comments[]id
integer

Comment id.

dataquestions[]comments[]postId
integernullable

The question or answer the comment is on.

dataquestions[]comments[]postType
stringnullable

Whether the comment is on a question or an answer; null when not known.

one of: question, answer, null

dataquestions[]comments[]url
stringnullable

Link to the comment.

dataquestions[]comments[]score
integernullable

Upvotes the comment received.

dataquestions[]comments[]edited
booleannullable

Whether the comment was edited. The flag comes from the route that returned the comment, so the same comment can differ between routes.

dataquestions[]comments[]createdAt
stringnullable

When it was written, ISO 8601 UTC.

Who wrote it.

dataquestions[]comments[]authorid
integernullable

User id on this site; null for a deleted user.

dataquestions[]comments[]authoraccountId
integernullable

Network-wide account id, the same on every site.

dataquestions[]comments[]authorname
stringnullable

Display name.

dataquestions[]comments[]authorurl
stringnullable

Profile URL.

dataquestions[]comments[]authorimageUrl
stringnullable

Avatar URL.

dataquestions[]comments[]authorreputation
integernullable

Reputation on this site.

dataquestions[]comments[]authortype
stringnullable

Kind of account.

one of: registered, moderator, unregistered, does_not_exist, team_admin, null

dataquestions[]comments[]authoracceptRate
integernullable

Percent of the user's questions with an accepted answer; null when not shown.

The user the comment is addressed to, when it is a reply. Null when the comment is not a reply; on the comments-by-post routes it is always null because those routes do not carry reply targets.

dataquestions[]comments[]replyToid
integernullable

User id on this site; null for a deleted user.

dataquestions[]comments[]replyToaccountId
integernullable

Network-wide account id, the same on every site.

dataquestions[]comments[]replyToname
stringnullable

Display name.

dataquestions[]comments[]replyTourl
stringnullable

Profile URL.

dataquestions[]comments[]replyToimageUrl
stringnullable

Avatar URL.

dataquestions[]comments[]replyToreputation
integernullable

Reputation on this site.

dataquestions[]comments[]replyTotype
stringnullable

Kind of account.

one of: registered, moderator, unregistered, does_not_exist, team_admin, null

dataquestions[]comments[]replyToacceptRate
integernullable

Percent of the user's questions with an accepted answer; null when not shown.

dataquestions[]comments[]isByPostAuthor
booleannullable

Whether the comment's author wrote the post it is on; null on lists that do not carry it.

dataquestions[]comments[]license
stringnullable

Content licence, e.g. `CC BY-SA 4.0`.

dataquestions[]comments[]bodyHtml
stringnullable

Comment text as HTML.

dataquestions[]comments[]bodyMarkdown
stringnullable

Comment text as Markdown; null on lists that do not carry it.

The matching questions and answers in `excerpt` mode; null in `full` mode.

dataexcerpts[]itemType
string

Whether the match is a question or an answer.

one of: question, answer

dataexcerpts[]questionId
integer

The question, or the question the answer belongs to.

dataexcerpts[]answerId
integernullable

The answer id for an answer match; null for a question.

dataexcerpts[]title
stringnullable

Question title, with HTML entities decoded.

dataexcerpts[]url
string

Link to the question or answer.

dataexcerpts[]excerptHtml
stringnullable

A snippet with the matched words in `<span class="highlight">`.

dataexcerpts[]bodyHtml
stringnullable

The full text of the match as plain text, with HTML entities decoded.

Tags of the question.

dataexcerpts[]tags[]
stringoptional
dataexcerpts[]score
integernullable

Score of the match.

dataexcerpts[]questionScore
integernullable

Score of the question.

dataexcerpts[]isAnswered
booleannullable

Whether the question is answered.

dataexcerpts[]hasAcceptedAnswer
booleannullable

Whether the question has an accepted answer.

dataexcerpts[]isAccepted
booleannullable

For an answer match, whether it is the accepted one.

dataexcerpts[]answerCount
integernullable

Answers on the question.

dataexcerpts[]createdAt
stringnullable

When the match was posted, ISO 8601 UTC.

dataexcerpts[]lastActivityAt
stringnullable

Last activity, ISO 8601 UTC.

dataexcerpts[]equivalentTagSearch
booleannullable

Whether the search term was also matched as a tag.

Pagination state for the current page.

datapagehasMore
boolean

Whether another page is available.

datapagenextCursor
stringnullable

Cursor for the next page; null on the last page.

datalimitReached
boolean

True when the list stopped at the site's 25-page ceiling (2,500 rows, or 625 when the page carries text), or when a user's answer or comment list is too large for page-offset paging and has served its first 100 rows (25 when it carries text). Sort by `creation` to page deeper. False for every list that ends because it ran out.

Metadata describing the request and billing outcome.

metarequestId
string

Unique request identifier for tracing this API call.

min 1 chars

metacreditsCharged
integer

Credits charged for this request.

≥ 0

metaversion
string

Public API version that served the response.

one of: v1

Code example

curl "https://api.socialfetch.dev/v1/stack-overflow/questions/search?q=segfault" \
  -H "x-api-key: YOUR_API_KEY"

Responses

Search results.