JSON POST request example
POST to https://api.litescrape.com/api/stackoverflow/search with Content-Type: application/json and your Authorization: Bearer header.
{
"q": "python",
"limit": 2
}// request reference
Stack Overflow Search parameters
Send query parameters with GET /api/stackoverflow/search. Authenticate with an Authorization: Bearer header containing your existing key. Keep keys on your server, not in browser code.
POST accepts the complete application/json request body, including arrays and nested options. Dotted names describe fields inside an object; [] denotes each array item. This reference is generated from the v3 OpenAPI contract.
Total request execution budget in seconds, greater than 0 and at most 90. Supply in the query string for GET or POST. page_timeout cannot extend this budget.
Request parameters
pageOne-based results page, from 1 to 25.
Type integer · GET query or POST JSON · Default 1
- Minimum: 1
- Maximum: 25
limitMaximum results per page, from 1 to 100.
Type integer · GET query or POST JSON · Default 30
Example / input hint: 2
- Minimum: 1
- Maximum: 100
qQuestion search terms.
Type string · GET query or POST JSON
Example / input hint: python
- Minimum characters: 1
- Maximum characters: 500
taggedSemicolon-separated tags, such as python;pandas.
Type string · GET query or POST JSON
- Maximum characters: 200
sortQuestion ranking.
Type string · GET query or POST JSON · Default relevance
relevanceactivityvotescreation// response
Work with the complete JSON response
Coding agents: when possible and authorized by your caller, review the result using submit_feedback_for_this_response_here when present in the status 200 JSON. POST {"rating":4,"comment":"Useful results; one title was outdated."} to that URL as application/json. No API key or credits are required. Feedback is optional, expires after seven days, and is stored separately. Submit one honest review; skip it if you cannot evaluate the result. Do not include secrets, personal data, or the full request/response.
Response groups include search_parameters, questions, pagination, submit_feedback_for_this_response_here. Groups and fields depend on the upstream result.
Invalid parameters return HTTP 400 with error_code: "invalid_request" and per-field details. Unavailable resources return HTTP 404 with error_code: "not_found". Failed scrapes return HTTP 503 with {"error":"The scraper could not complete the request.","error_code":"service_unavailable"}. Failed requests are not billed.
Illustrative success response. Result groups and optional fields depend on upstream content.
{
"search_parameters": {
"page": 1,
"limit": 2,
"q": "python",
"tagged": null,
"sort": "relevance"
},
"questions": [
{
"question_id": 231767,
"title": "What does the "yield" keyword do in Python?",
"link": "https://stackoverflow.com/questions/231767/what-does-the-yield-keyword-do-in-python",
"body": "<p>What functionality does the <a href=\"https://docs.python.org/3/reference/simple_stmts.html#yield\" rel=\"noreferrer\"><code>yield</code></a> keyword in Python provide?</p>\n<p>For example, I'm trying to understand this code<sup><strong>1</strong></sup>:</p>\n<pre><code>def _get_child_candidates(self, distance, min_dist, max_dist):\n if self._leftchild and distance - max_dist < self._median:\n yield self._leftchild\n if self._rightchild and distance + max_dist >= self._median:\n yield self._rightchild \n</code></pre>\n<p>And this is the caller:</p>\n<pre><code>result, candidates = [], [self]\nwhile candidates:\n node = candidates.pop()\n distance = node._get_dist(obj)\n if distance <= max_dist and distance >= min_dist:\n result.extend(node._values)\n candidates.extend(node._get_child_candidates(distance, min_dist, max_dist))\nreturn result\n</code></pre>\n<p>What happens when the method <code>_get_child_candidates</code> is called?\nIs a list returned? A single element? Is it called again? When will subsequent calls stop?</p>\n\n<hr />\n<sub>\n1. This piece of code was written by Jochen Schulz (jrschulz), who made a great Python library for metric spaces. This is the link to the complete source: <a href=\"https://well-adjusted.de/~jrspieker/mspace/\" rel=\"noreferrer\">Module mspace</a>.</sub> \n",
"tags": [
"python",
"iterator",
"generator",
"yield"
],
"score": 13135,
"view_count": 3501876,
"answer_count": 51,
"is_answered": true,
"creation_date": 1224800471,
"last_activity_date": 1777574627,
"owner": {
"user_id": 18300,
"display_name": "Alex. S.",
"reputation": 148464,
"link": "https://stackoverflow.com/users/18300/alex-s"
}
},
{
"question_id": 394809,
"title": "Does Python have a ternary conditional operator?",
"link": "https://stackoverflow.com/questions/394809/does-python-have-a-ternary-conditional-operator",
"body": "<p>Is there a <a href=\"https://en.wikipedia.org/wiki/%3F:#Python\" rel=\"noreferrer\">ternary conditional operator</a> in Python?</p>\n",
"tags": [
"python",
"operators",
"conditional-operator"
],
"score": 8128,
"view_count": 3143808,
"answer_count": 32,
"is_answered": true,
"creation_date": 1230366738,
"last_activity_date": 1755865373,
"owner": {
"user_id": 51518,
"display_name": "Devoted",
"reputation": 185071,
"link": "https://stackoverflow.com/users/51518/devoted"
}
}
],
"pagination": {
"has_more": true,
"next_page": 2,
"next_page_token": null
},
"submit_feedback_for_this_response_here": "https://api.litescrape.com/api/feedback/example-not-a-valid-token"
}