curl --request POST \
--url https://api.aisa.one/apis/v1/cbc-ca/news/lookup-region \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "Edmonton"
}
'import requests
url = "https://api.aisa.one/apis/v1/cbc-ca/news/lookup-region"
payload = { "query": "Edmonton" }
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({query: 'Edmonton'})
};
fetch('https://api.aisa.one/apis/v1/cbc-ca/news/lookup-region', 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/cbc-ca/news/lookup-region",
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([
'query' => 'Edmonton'
]),
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/cbc-ca/news/lookup-region"
payload := strings.NewReader("{\n \"query\": \"Edmonton\"\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/cbc-ca/news/lookup-region")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"Edmonton\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/cbc-ca/news/lookup-region")
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 \"query\": \"Edmonton\"\n}"
response = http.request(request)
puts response.read_body{
"cities": [
{
"id": "10945",
"label": "Edmonton, AB",
"latitude": 53.5344445,
"leaf_slug": "edmonton",
"leaf_source_id": "https://taxo.cbcrc.ca/id/9aef9477-48d9-40d3-9cc0-9a8faac6932c",
"longitude": -113.4902778,
"path": "The Americas/North America/Canada/Alberta/Edmonton",
"slug_path": "the-americas/north-america/canada/alberta/edmonton"
}
],
"count": 1,
"observed_at_ms": 1791922855011,
"query": "Edmonton"
}Lookup region
Turn a user’s city or region name into CBC’s taxonomy path and the candidate category slug for list_articles.
curl --request POST \
--url https://api.aisa.one/apis/v1/cbc-ca/news/lookup-region \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "Edmonton"
}
'import requests
url = "https://api.aisa.one/apis/v1/cbc-ca/news/lookup-region"
payload = { "query": "Edmonton" }
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({query: 'Edmonton'})
};
fetch('https://api.aisa.one/apis/v1/cbc-ca/news/lookup-region', 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/cbc-ca/news/lookup-region",
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([
'query' => 'Edmonton'
]),
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/cbc-ca/news/lookup-region"
payload := strings.NewReader("{\n \"query\": \"Edmonton\"\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/cbc-ca/news/lookup-region")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"Edmonton\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/cbc-ca/news/lookup-region")
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 \"query\": \"Edmonton\"\n}"
response = http.request(request)
puts response.read_body{
"cities": [
{
"id": "10945",
"label": "Edmonton, AB",
"latitude": 53.5344445,
"leaf_slug": "edmonton",
"leaf_source_id": "https://taxo.cbcrc.ca/id/9aef9477-48d9-40d3-9cc0-9a8faac6932c",
"longitude": -113.4902778,
"path": "The Americas/North America/Canada/Alberta/Edmonton",
"slug_path": "the-americas/north-america/canada/alberta/edmonton"
}
],
"count": 1,
"observed_at_ms": 1791922855011,
"query": "Edmonton"
}Request contract
- Method and path: POST /apis/v1/cbc-ca/news/lookup-region
- Availability: enabled
- Request URL template:
https://api.aisa.one/apis/v1/cbc-ca/news/lookup-region
{
"operationId": "cbc-ca.news.lookup-region",
"method": "POST",
"path": "/apis/v1/cbc-ca/news/lookup-region",
"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": {
"query": "Edmonton"
}
}
},
"schema": {
"additionalProperties": true,
"properties": {
"query": {
"description": "City or place name, for example `Edmonton`.",
"type": "string"
}
},
"required": [
"query"
],
"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
Response
Resolve a Canadian place name to CBC's location taxonomy through GraphQL searchCanadianCities: label (Edmonton, AB), taxonomy path (The Americas/North America/Canada/Alberta/Edmonton), slug path, coordinates and the taxonomy leaf id. leaf_slug is the last segment of the slug path; for CBC's regional sections it is the category slug list_articles accepts (edmonton, calgary, toronto). An unknown name is an empty list, not an error.
The response contains the tool result directly.
The provider identifies cities as the primary payload key.
| Documented field | Provider type | Description |
|---|---|---|
id | string | |
label | string | |
latitude | number | |
leaf_slug | string | Last segment of slug_path; the regional category slug for list_articles when CBC has a regional section for the place. |
leaf_source_id | string | CBC taxonomy concept URI. |
longitude | number | |
path | string | |
slug_path | string |
These are the provider's documented fields. Field requiredness, nullability and nested object structures are specified only where the descriptions explicitly say so.