Skip to main content
POST
/
api
/
stackexchange
/
questions
/
search
/stackexchange/questions/search
curl --request POST \
  --url https://api.anysite.io/api/stackexchange/questions/search \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "query": "<string>",
  "count": 2,
  "timeout": 300,
  "site": "stackoverflow",
  "tagged": "python;pandas",
  "sort": "relevance",
  "order": "desc",
  "accepted": true,
  "min_answers": 1,
  "min_views": 1000
}
'
[
  {
    "id": 123,
    "@type": "@stackexchange_question",
    "title": "",
    "body": "<string>",
    "score": 123,
    "view_count": 123,
    "answer_count": 123,
    "is_answered": false,
    "is_closed": false,
    "accepted_answer_id": 123,
    "tags": [],
    "owner": {
      "@type": "@stackexchange_owner",
      "user_id": 123,
      "account_id": 123,
      "display_name": "",
      "reputation": 123,
      "image": "<string>",
      "user_type": "<string>",
      "profile_url": "<string>"
    },
    "created_at": 123,
    "last_activity_at": 123,
    "last_edit_at": 123,
    "content_license": "<string>",
    "link": ""
  }
]

Authorizations

access-token
string
header
required

API token from the dashboard

Headers

access-token
string
required

Body

application/json
query
string
required

Free-text search query matched against question titles and bodies

Minimum string length: 1
count
integer
required

Max result count

Required range: x >= 1
Example:

20

timeout
integer
default:300

Max scrapping execution timeout (in seconds)

Required range: 20 <= x <= 1500
site
string
default:stackoverflow

Stack Exchange network site to query (e.g. stackoverflow, superuser, serverfault, math)

Minimum string length: 1
Example:

"stackoverflow"

tagged
string | null

Restrict to questions with these tags (semicolon-separated)

Example:

"python;pandas"

sort
enum<string>
default:relevance

Result sorting

Available options:
relevance,
votes,
activity,
creation
order
enum<string>
default:desc

Sort direction

Available options:
desc,
asc
accepted
boolean | null

Only questions with (true) or without (false) an accepted answer

min_answers
integer | null

Only questions with at least this many answers

Required range: x >= 0
Example:

1

min_views
integer | null

Only questions with at least this many views

Required range: x >= 0
Example:

1000

Response

Successful Response

id
integer
required
@type
string
default:@stackexchange_question
title
string
default:""
body
string | null
score
integer | null
view_count
integer | null
answer_count
integer | null
is_answered
boolean
default:false
is_closed
boolean
default:false
accepted_answer_id
integer | null
tags
string[]
owner
StackexchangeOwner · object
created_at
integer | null
last_activity_at
integer | null
last_edit_at
integer | null
content_license
string | null