Sites
curl --request POST \
--url https://api.aisa.one/apis/v1/stackexchange-com/questions/sites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"pagesize": 2
}'import requests
url = "https://api.aisa.one/apis/v1/stackexchange-com/questions/sites"
payload = { "pagesize": 2 }
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({pagesize: 2})
};
fetch('https://api.aisa.one/apis/v1/stackexchange-com/questions/sites', 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/sites",
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([
'pagesize' => 2
]),
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/sites"
payload := strings.NewReader("{\n \"pagesize\": 2\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/sites")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"pagesize\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/stackexchange-com/questions/sites")
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 \"pagesize\": 2\n}"
response = http.request(request)
puts response.read_body{
"count": 2,
"has_more": true,
"observed_at_ms": 1789448649931,
"page": 1,
"quota": {
"backoff_seconds": null,
"max": 300,
"remaining": 299
},
"sites": [
{
"api_site_parameter": "stackoverflow",
"audience": "professional and enthusiast programmers",
"launch_date_ms": 1221436800000,
"name": "Stack Overflow",
"site_state": "normal",
"site_type": "main_site",
"site_url": "https://stackoverflow.com"
},
{
"api_site_parameter": "serverfault",
"audience": "system and network administrators",
"launch_date_ms": 1243296000000,
"name": "Server Fault",
"site_state": "normal",
"site_type": "main_site",
"site_url": "https://serverfault.com"
}
],
"source_url": "https://api.stackexchange.com/2.3/sites?pagesize=2&filter=%217ry9ouLWcQWrdWSzrv7eT0TX0kxJ.zt0R1"
}Stack Exchange
Sites
Sites in the Stack Exchange network with the site parameter every other function takes. Input: page and page size. Returns site name, URL, audience and API parameter.
POST
https://api.aisa.one
/
apis
/
v1
/
stackexchange-com
/
questions
/
sites
Sites
curl --request POST \
--url https://api.aisa.one/apis/v1/stackexchange-com/questions/sites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"pagesize": 2
}'import requests
url = "https://api.aisa.one/apis/v1/stackexchange-com/questions/sites"
payload = { "pagesize": 2 }
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({pagesize: 2})
};
fetch('https://api.aisa.one/apis/v1/stackexchange-com/questions/sites', 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/sites",
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([
'pagesize' => 2
]),
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/sites"
payload := strings.NewReader("{\n \"pagesize\": 2\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/sites")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"pagesize\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/stackexchange-com/questions/sites")
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 \"pagesize\": 2\n}"
response = http.request(request)
puts response.read_body{
"count": 2,
"has_more": true,
"observed_at_ms": 1789448649931,
"page": 1,
"quota": {
"backoff_seconds": null,
"max": 300,
"remaining": 299
},
"sites": [
{
"api_site_parameter": "stackoverflow",
"audience": "professional and enthusiast programmers",
"launch_date_ms": 1221436800000,
"name": "Stack Overflow",
"site_state": "normal",
"site_type": "main_site",
"site_url": "https://stackoverflow.com"
},
{
"api_site_parameter": "serverfault",
"audience": "system and network administrators",
"launch_date_ms": 1243296000000,
"name": "Server Fault",
"site_state": "normal",
"site_type": "main_site",
"site_url": "https://serverfault.com"
}
],
"source_url": "https://api.stackexchange.com/2.3/sites?pagesize=2&filter=%217ry9ouLWcQWrdWSzrv7eT0TX0kxJ.zt0R1"
}Request contract
- Method and path: POST /apis/v1/stackexchange-com/questions/sites
- Availability: enabled
- Request URL template:
https://api.aisa.one/apis/v1/stackexchange-com/questions/sites
{
"operationId": "stackexchange-com.questions.sites",
"method": "POST",
"path": "/apis/v1/stackexchange-com/questions/sites",
"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": {
"pagesize": 2
}
}
},
"schema": {
"additionalProperties": true,
"properties": {
"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"
}
},
"page": {
"default": 1,
"description": "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.\n\nProvider reference: minimum 1; maximum 10000; default 1.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"max": 10000,
"min": 1
}
},
"pagesize": {
"default": 100,
"description": "pagesize\n\nProvider reference: minimum 1; maximum 100; default 100.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"max": 100,
"min": 1
}
}
},
"type": "object"
}
}
},
"required": false
},
"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
Response
Sites in the Stack Exchange network with the site parameter every other function takes. Input: page and page size. Returns site name, URL, audience and API parameter.
The response contains the tool result directly.
| Documented field | Provider type | Description |
|---|---|---|
count | number | |
has_more | boolean | |
observed_at_ms | number | |
page | number | |
quota | object | |
sites | object[] | |
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.