Answer
curl --request POST \
--url https://api.aisa.one/apis/v1/stackexchange-com/questions/answer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"answer_id": 3940144
}
'import requests
url = "https://api.aisa.one/apis/v1/stackexchange-com/questions/answer"
payload = { "answer_id": 3940144 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({answer_id: 3940144})
};
fetch('https://api.aisa.one/apis/v1/stackexchange-com/questions/answer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/stackexchange-com/questions/answer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'answer_id' => 3940144
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/stackexchange-com/questions/answer"
payload := strings.NewReader("{\n \"answer_id\": 3940144\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/stackexchange-com/questions/answer")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"answer_id\": 3940144\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/stackexchange-com/questions/answer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"answer_id\": 3940144\n}"
response = http.request(request)
puts response.read_body{
"answers": [
{
"answer_id": 3940144,
"body_html": "<p>To get a <em>new</em> reversed list, apply the <a href=\"https://docs.python.org/3/library/functions.html#reversed\" rel=\"noreferrer\"><code>reversed</code></a> function and collect the items into a <a href=\"https://docs.python.org/3/library/stdtypes.html#list\" rel=\"noreferrer\"><code>list</code></a>:</p>\n<pre><code>>>> xs = [0, 10, 20, 40]\n>>> list(reversed(xs))\n[40, 20, 10, 0]\n</code></pre>\n<p>To iterate backwards through a list:</p>\n<pre><code>>>> xs = [0, 10, 20, 40]\n>>> for x in reversed(xs):\n... print(x)\n40\n20\n10\n0\n</code></pre>\n",
"body_markdown": "To get a *new* reversed list, apply the [`reversed`][1] function and collect the items into a [`list`][list]:\r\n\r\n```\r\n>>> xs = [0, 10, 20, 40]\r\n>>> list(reversed(xs))\r\n[40, 20, 10, 0]\r\n```\r\n\r\nTo iterate backwards through a list:\r\n\r\n```\r\n>>> xs = [0, 10, 20, 40]\r\n>>> for x in reversed(xs):\r\n... print(x)\r\n40\r\n20\r\n10\r\n0\r\n```\r\n\r\n [1]: https://docs.python.org/3/library/functions.html#reversed\r\n [pep0322]: https://www.python.org/dev/peps/pep-0322/\r\n [list]: https://docs.python.org/3/library/stdtypes.html#list",
"comment_count": 8,
"content_license": "CC BY-SA 4.0",
"created_at_ms": 1287126140000,
"is_accepted": true,
"last_activity_at_ms": 1660588390000,
"last_edit_at_ms": 1660588390000,
"owner": {
"display_name": "codaddict",
"link": "https://stackoverflow.com/users/227665/codaddict",
"reputation": 457906,
"user_id": 227665,
"user_type": "registered"
},
"question_id": 3940128,
"question_title": "How do I reverse a list or loop over it backwards?",
"score": 1738,
"site": "stackoverflow",
"source_url": "https://stackoverflow.com/questions/3940128/how-do-i-reverse-a-list-or-loop-over-it-backwards/3940144#3940144"
}
],
"count": 1,
"observed_at_ms": 1789448650658,
"quota": {
"backoff_seconds": null,
"max": 300,
"remaining": 299
},
"requested": [
3940144
],
"site": "stackoverflow",
"source_url": "https://api.stackexchange.com/2.3/answers/3940144?site=stackoverflow&filter=%217ry9ouLWcQWrdWSzrv7eT0TX0kxJ.zt0R1"
}Stack Exchange
Answer
One answer by answer_id or answer url, or up to 100 answers by answer_ids, on one site. Returns the full answer records (bodies, score, is_accepted, owner). Ids that do not exist are simply absent from the result.
POST
https://api.aisa.one
/
apis
/
v1
/
stackexchange-com
/
questions
/
answer
Answer
curl --request POST \
--url https://api.aisa.one/apis/v1/stackexchange-com/questions/answer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"answer_id": 3940144
}
'import requests
url = "https://api.aisa.one/apis/v1/stackexchange-com/questions/answer"
payload = { "answer_id": 3940144 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({answer_id: 3940144})
};
fetch('https://api.aisa.one/apis/v1/stackexchange-com/questions/answer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/stackexchange-com/questions/answer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'answer_id' => 3940144
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/stackexchange-com/questions/answer"
payload := strings.NewReader("{\n \"answer_id\": 3940144\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/stackexchange-com/questions/answer")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"answer_id\": 3940144\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/stackexchange-com/questions/answer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"answer_id\": 3940144\n}"
response = http.request(request)
puts response.read_body{
"answers": [
{
"answer_id": 3940144,
"body_html": "<p>To get a <em>new</em> reversed list, apply the <a href=\"https://docs.python.org/3/library/functions.html#reversed\" rel=\"noreferrer\"><code>reversed</code></a> function and collect the items into a <a href=\"https://docs.python.org/3/library/stdtypes.html#list\" rel=\"noreferrer\"><code>list</code></a>:</p>\n<pre><code>>>> xs = [0, 10, 20, 40]\n>>> list(reversed(xs))\n[40, 20, 10, 0]\n</code></pre>\n<p>To iterate backwards through a list:</p>\n<pre><code>>>> xs = [0, 10, 20, 40]\n>>> for x in reversed(xs):\n... print(x)\n40\n20\n10\n0\n</code></pre>\n",
"body_markdown": "To get a *new* reversed list, apply the [`reversed`][1] function and collect the items into a [`list`][list]:\r\n\r\n```\r\n>>> xs = [0, 10, 20, 40]\r\n>>> list(reversed(xs))\r\n[40, 20, 10, 0]\r\n```\r\n\r\nTo iterate backwards through a list:\r\n\r\n```\r\n>>> xs = [0, 10, 20, 40]\r\n>>> for x in reversed(xs):\r\n... print(x)\r\n40\r\n20\r\n10\r\n0\r\n```\r\n\r\n [1]: https://docs.python.org/3/library/functions.html#reversed\r\n [pep0322]: https://www.python.org/dev/peps/pep-0322/\r\n [list]: https://docs.python.org/3/library/stdtypes.html#list",
"comment_count": 8,
"content_license": "CC BY-SA 4.0",
"created_at_ms": 1287126140000,
"is_accepted": true,
"last_activity_at_ms": 1660588390000,
"last_edit_at_ms": 1660588390000,
"owner": {
"display_name": "codaddict",
"link": "https://stackoverflow.com/users/227665/codaddict",
"reputation": 457906,
"user_id": 227665,
"user_type": "registered"
},
"question_id": 3940128,
"question_title": "How do I reverse a list or loop over it backwards?",
"score": 1738,
"site": "stackoverflow",
"source_url": "https://stackoverflow.com/questions/3940128/how-do-i-reverse-a-list-or-loop-over-it-backwards/3940144#3940144"
}
],
"count": 1,
"observed_at_ms": 1789448650658,
"quota": {
"backoff_seconds": null,
"max": 300,
"remaining": 299
},
"requested": [
3940144
],
"site": "stackoverflow",
"source_url": "https://api.stackexchange.com/2.3/answers/3940144?site=stackoverflow&filter=%217ry9ouLWcQWrdWSzrv7eT0TX0kxJ.zt0R1"
}Request contract
- Method and path: POST /apis/v1/stackexchange-com/questions/answer
- Availability: enabled
- Request URL template:
https://api.aisa.one/apis/v1/stackexchange-com/questions/answer
{
"operationId": "stackexchange-com.questions.answer",
"method": "POST",
"path": "/apis/v1/stackexchange-com/questions/answer",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"examples": {
"provider": {
"summary": "Official provider example; checked against AIsa request constraints",
"value": {
"answer_id": 3940144
}
}
},
"schema": {
"additionalProperties": true,
"allOf": [
{
"anyOf": [
{
"properties": {
"answer_id": {}
},
"required": [
"answer_id"
]
},
{
"properties": {
"answer_ids": {}
},
"required": [
"answer_ids"
]
},
{
"properties": {
"url": {}
},
"required": [
"url"
]
}
]
}
],
"properties": {
"answer_id": {
"description": "answer_id",
"type": "number"
},
"answer_ids": {
"description": "answer_ids",
"items": {
"type": "number"
},
"type": "array"
},
"include_body": {
"description": "include_body",
"type": "boolean",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"key": {
"description": "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.",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"site": {
"default": "stackoverflow",
"description": "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]+)*$.\n\nProvider reference: default \"stackoverflow\".",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"url": {
"description": "HTTPS answer URL on any Stack Exchange site: /a/<answer_id> (share link) or /questions/<question_id>/<slug>/<answer_id>. The site is derived from the host; an explicit `site` must match it.",
"type": "string"
}
},
"type": "object"
}
}
},
"required": true
},
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
Cost and request rules
Usage-based pricing. Default request estimate: $0.0005 USD. The final charge depends on actual usage. Your account price may differ; use a request quote where supported.Authorizations
Body
application/json
- Option 1
- Option 2
- Option 3
Response
One answer by answer_id or answer url, or up to 100 answers by answer_ids, on one site. Returns the full answer records (bodies, score, is_accepted, owner). Ids that do not exist are simply absent from the result.
The response contains the tool result directly.
| Documented field | Provider type | Description |
|---|---|---|
answers | object[] | |
count | number | |
observed_at_ms | number | |
quota | object | |
requested | number[] | |
site | string | |
source_url | string |
These are the provider's documented fields. Field requiredness, nullability and nested object structures are specified only where the descriptions explicitly say so.