curl --request POST \
--url https://api.aisa.one/apis/v1/socrata-com/open-data/query-dataset \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dataset_id": "ydr8-5enu",
"portal": "data.cityofchicago.org"
}
'import requests
url = "https://api.aisa.one/apis/v1/socrata-com/open-data/query-dataset"
payload = {
"dataset_id": "ydr8-5enu",
"portal": "data.cityofchicago.org"
}
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({dataset_id: 'ydr8-5enu', portal: 'data.cityofchicago.org'})
};
fetch('https://api.aisa.one/apis/v1/socrata-com/open-data/query-dataset', 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/socrata-com/open-data/query-dataset",
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([
'dataset_id' => 'ydr8-5enu',
'portal' => 'data.cityofchicago.org'
]),
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/socrata-com/open-data/query-dataset"
payload := strings.NewReader("{\n \"dataset_id\": \"ydr8-5enu\",\n \"portal\": \"data.cityofchicago.org\"\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/socrata-com/open-data/query-dataset")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dataset_id\": \"ydr8-5enu\",\n \"portal\": \"data.cityofchicago.org\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/socrata-com/open-data/query-dataset")
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 \"dataset_id\": \"ydr8-5enu\",\n \"portal\": \"data.cityofchicago.org\"\n}"
response = http.request(request)
puts response.read_body{
"columns": [
{
"datatype": "text",
"field_name": "id"
},
{
"datatype": "text",
"field_name": "permit_"
},
{
"datatype": "text",
"field_name": "permit_type"
},
{
"datatype": "floating_timestamp",
"field_name": "issue_date"
},
{
"datatype": "number",
"field_name": "street_number"
},
{
"datatype": "text",
"field_name": "street_direction"
},
{
"datatype": "text",
"field_name": "street_name"
}
],
"count": 1,
"data_last_modified": "Fri, 09 Oct 2026 12:07:11 GMT",
"dataset_id": "ydr8-5enu",
"limit": 5,
"next_offset": null,
"observed_at_ms": 1791566245239,
"offset": 0,
"portal": "data.cityofchicago.org",
"rows": [
{
"id": "1634695",
"issue_date": "2006-01-03T00:00:00.000",
"permit_": "100084789",
"permit_type": "PERMIT - SIGNS",
"street_direction": "N",
"street_name": "MILWAUKEE AVE",
"street_number": "1576"
}
],
"source_url": "https://data.cityofchicago.org/resource/ydr8-5enu.json?%24select=id%2C+permit_%2C+permit_type%2C+issue_date%2C+street_number%2C+street_direction%2C+street_name&%24where=permit_+%3D+%27100084789%27&%24order=%3Aid&%24limit=5"
}Query dataset
Any question that needs actual records or aggregates from an open-data dataset (permit lookups by address or number, inspection results, 311 requests by type, counts by category). Get the portal and 4x4 from search_datasets and field names from describe_dataset first.
curl --request POST \
--url https://api.aisa.one/apis/v1/socrata-com/open-data/query-dataset \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dataset_id": "ydr8-5enu",
"portal": "data.cityofchicago.org"
}
'import requests
url = "https://api.aisa.one/apis/v1/socrata-com/open-data/query-dataset"
payload = {
"dataset_id": "ydr8-5enu",
"portal": "data.cityofchicago.org"
}
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({dataset_id: 'ydr8-5enu', portal: 'data.cityofchicago.org'})
};
fetch('https://api.aisa.one/apis/v1/socrata-com/open-data/query-dataset', 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/socrata-com/open-data/query-dataset",
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([
'dataset_id' => 'ydr8-5enu',
'portal' => 'data.cityofchicago.org'
]),
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/socrata-com/open-data/query-dataset"
payload := strings.NewReader("{\n \"dataset_id\": \"ydr8-5enu\",\n \"portal\": \"data.cityofchicago.org\"\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/socrata-com/open-data/query-dataset")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dataset_id\": \"ydr8-5enu\",\n \"portal\": \"data.cityofchicago.org\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/socrata-com/open-data/query-dataset")
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 \"dataset_id\": \"ydr8-5enu\",\n \"portal\": \"data.cityofchicago.org\"\n}"
response = http.request(request)
puts response.read_body{
"columns": [
{
"datatype": "text",
"field_name": "id"
},
{
"datatype": "text",
"field_name": "permit_"
},
{
"datatype": "text",
"field_name": "permit_type"
},
{
"datatype": "floating_timestamp",
"field_name": "issue_date"
},
{
"datatype": "number",
"field_name": "street_number"
},
{
"datatype": "text",
"field_name": "street_direction"
},
{
"datatype": "text",
"field_name": "street_name"
}
],
"count": 1,
"data_last_modified": "Fri, 09 Oct 2026 12:07:11 GMT",
"dataset_id": "ydr8-5enu",
"limit": 5,
"next_offset": null,
"observed_at_ms": 1791566245239,
"offset": 0,
"portal": "data.cityofchicago.org",
"rows": [
{
"id": "1634695",
"issue_date": "2006-01-03T00:00:00.000",
"permit_": "100084789",
"permit_type": "PERMIT - SIGNS",
"street_direction": "N",
"street_name": "MILWAUKEE AVE",
"street_number": "1576"
}
],
"source_url": "https://data.cityofchicago.org/resource/ydr8-5enu.json?%24select=id%2C+permit_%2C+permit_type%2C+issue_date%2C+street_number%2C+street_direction%2C+street_name&%24where=permit_+%3D+%27100084789%27&%24order=%3Aid&%24limit=5"
}Request contract
- Method and path: POST /apis/v1/socrata-com/open-data/query-dataset
- Availability: enabled
- Request URL template:
https://api.aisa.one/apis/v1/socrata-com/open-data/query-dataset
{
"operationId": "socrata-com.open-data.query-dataset",
"method": "POST",
"path": "/apis/v1/socrata-com/open-data/query-dataset",
"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": {
"dataset_id": "ydr8-5enu",
"limit": 5,
"portal": "data.cityofchicago.org",
"select": "id, permit_, permit_type, issue_date, street_number, street_direction, street_name",
"where": "permit_ = '100084789'"
}
}
},
"schema": {
"additionalProperties": true,
"properties": {
"dataset_id": {
"description": "The dataset's Socrata 4x4 id (for example ydr8-5enu, from search_datasets) or a dataset URL on the same portal: /d/<id>, /<Category>/<Name>/<id>, /resource/<id>.json.",
"type": "string"
},
"group": {
"description": "SoQL $group, e.g. `permit_type` (with an aggregate in select).",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"limit": {
"default": 100,
"description": "Rows per page (1-1000). A page is also cut at about 1 MB of row data; continue from next_offset.\n\nProvider reference: minimum 1; maximum 1000; default 100.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"max": 1000,
"min": 1
}
},
"offset": {
"default": 0,
"description": "Row offset (next_offset of the previous page).\n\nProvider reference: minimum 0; maximum 100000000; default 0.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"max": 100000000,
"min": 0
}
},
"order": {
"description": "SoQL $order, e.g. `issue_date DESC`. Defaults to the row id `:id` for stable paging (none for aggregates).",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"portal": {
"description": "The portal: its hostname (data.cityofchicago.org, data.ny.gov, www.dallasopendata.com) or any URL on it. Must be a Socrata domain served by the Socrata Discovery API (US or EU region); anything else fails with invalid_input not_socrata_portal before the host is contacted.",
"type": "string"
},
"q": {
"description": "Full-text search across the dataset's text columns.",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"select": {
"description": "SoQL $select without the keyword: columns, aliases, aggregates. E.g. `permit_, permit_type, issue_date` or `permit_type, count(*) AS n`.",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"where": {
"description": "SoQL $where without the keyword. String literals in single quotes ('O''Hare' escapes a quote). E.g. `issue_date >= '2024-01-01' AND permit_type = 'PERMIT - NEW CONSTRUCTION'`, `within_circle(location, 41.88, -87.63, 500)`.",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body"
}
}
},
"required": [
"dataset_id",
"portal"
],
"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
The portal: its hostname (data.cityofchicago.org, data.ny.gov, www.dallasopendata.com) or any URL on it. Must be a Socrata domain served by the Socrata Discovery API (US or EU region); anything else fails with invalid_input not_socrata_portal before the host is contacted.
Response
Query rows of a dataset on any Socrata portal through its SODA 2.1 endpoint with SoQL: select (columns, aliases, aggregates), where (comparisons, like, between, in, date and spatial functions), order, group and full-text q, paged with limit (1-1000) and offset. Rows come back as published (numbers and dates as strings, geometry as GeoJSON) with the returned field names and types; pages are cut at about 1 MB of row data with next_offset to continue. The portal must be a Socrata domain (else invalid_input not_socrata_portal); an unknown dataset is not_found; SoQL the portal rejects (unknown column, syntax) is invalid_input at the offending field; an empty page is a successful result.
The response contains the tool result directly.
The provider identifies rows as the primary payload key.
The provider does not publish a field list for this tool.
These are the provider's documented fields. Field requiredness, nullability and nested object structures are specified only where the descriptions explicitly say so.