curl --request GET \
--url https://api.andiai.com/api/v1/news/{topic} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.andiai.com/api/v1/news/{topic}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.andiai.com/api/v1/news/{topic}', 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.andiai.com/api/v1/news/{topic}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.andiai.com/api/v1/news/{topic}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.andiai.com/api/v1/news/{topic}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.andiai.com/api/v1/news/{topic}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"results_type": "<string>",
"answer": "<string>",
"type": "<string>",
"title": "<string>",
"results": [
{
"title": "<string>",
"link": "<string>",
"desc": "<string>",
"source": "<string>",
"type": "website",
"date": "<string>",
"dateModified": "<string>",
"image": "<string>",
"snippet": "<string>",
"answer": "<string>",
"extracts": [
"<string>"
],
"contentType": "<string>",
"reader": {},
"contentSafety": {
"rating": "safe",
"safeSearchApplied": true
},
"bang": "<string>",
"queryIndices": [
123
],
"seeAlso": [
{
"title": "<string>",
"url": "<string>",
"source": "<string>"
}
]
}
],
"metrics": {
"query": "<string>",
"intent": "<string>",
"timestamp": "<string>",
"duration": 123,
"queries_executed": 123,
"api_requests_count": 123,
"results_returned": 123,
"total_results_found": 123,
"queries_provided": 123,
"queries_truncated": 123,
"cached": true,
"cache_age_seconds": 123,
"cost_dollars": 123,
"effort": "low",
"response_time_ms": 123
},
"correctedQuery": "<string>",
"related_searches": [
"<string>"
],
"topics": [
"<string>"
],
"related_topics": [
"<string>"
],
"infobox": {
"heading": "<string>",
"source": "<string>",
"items": [
{
"label": "<string>",
"value": "<string>"
}
]
},
"disambiguation": {
"query": "<string>",
"message": "<string>",
"options": [
{
"title": "<string>",
"text": "<string>",
"url": "<string>"
}
]
},
"aiSummary": {
"text": "<string>",
"generatedAt": "2023-11-07T05:31:56Z",
"model": "<string>",
"mode": "pregen"
},
"safeSearch": {
"requested": "off",
"applied": "off"
},
"videos": [
{
"title": "<string>",
"link": "<string>",
"desc": "<string>",
"source": "<string>",
"type": "website",
"date": "<string>",
"dateModified": "<string>",
"image": "<string>",
"snippet": "<string>",
"answer": "<string>",
"extracts": [
"<string>"
],
"contentType": "<string>",
"reader": {},
"contentSafety": {
"rating": "safe",
"safeSearchApplied": true
},
"bang": "<string>",
"queryIndices": [
123
],
"seeAlso": [
{
"title": "<string>",
"url": "<string>",
"source": "<string>"
}
]
}
],
"images": [
{
"title": "<string>",
"link": "<string>",
"image": "<string>",
"source": "<string>",
"type": "image",
"thumbnail": "<string>",
"width": "<string>",
"height": "<string>"
}
],
"news": [
{
"title": "<string>",
"link": "<string>",
"desc": "<string>",
"source": "<string>",
"type": "website",
"date": "<string>",
"dateModified": "<string>",
"image": "<string>",
"snippet": "<string>",
"answer": "<string>",
"extracts": [
"<string>"
],
"contentType": "<string>",
"reader": {},
"contentSafety": {
"rating": "safe",
"safeSearchApplied": true
},
"bang": "<string>",
"queryIndices": [
123
],
"seeAlso": [
{
"title": "<string>",
"url": "<string>",
"source": "<string>"
}
]
}
],
"places": [
{
"title": "<string>",
"link": "<string>",
"desc": "<string>",
"source": "<string>",
"type": "website",
"date": "<string>",
"dateModified": "<string>",
"image": "<string>",
"snippet": "<string>",
"answer": "<string>",
"extracts": [
"<string>"
],
"contentType": "<string>",
"reader": {},
"contentSafety": {
"rating": "safe",
"safeSearchApplied": true
},
"bang": "<string>",
"queryIndices": [
123
],
"seeAlso": [
{
"title": "<string>",
"url": "<string>",
"source": "<string>"
}
]
}
],
"profiles": [
{
"title": "<string>",
"link": "<string>",
"desc": "<string>",
"source": "<string>",
"type": "website",
"date": "<string>",
"dateModified": "<string>",
"image": "<string>",
"snippet": "<string>",
"answer": "<string>",
"extracts": [
"<string>"
],
"contentType": "<string>",
"reader": {},
"contentSafety": {
"rating": "safe",
"safeSearchApplied": true
},
"bang": "<string>",
"queryIndices": [
123
],
"seeAlso": [
{
"title": "<string>",
"url": "<string>",
"source": "<string>"
}
]
}
],
"social": [
{
"title": "<string>",
"link": "<string>",
"desc": "<string>",
"source": "<string>",
"type": "website",
"date": "<string>",
"dateModified": "<string>",
"image": "<string>",
"snippet": "<string>",
"answer": "<string>",
"extracts": [
"<string>"
],
"contentType": "<string>",
"reader": {},
"contentSafety": {
"rating": "safe",
"safeSearchApplied": true
},
"bang": "<string>",
"queryIndices": [
123
],
"seeAlso": [
{
"title": "<string>",
"url": "<string>",
"source": "<string>"
}
]
}
],
"academic": [
{
"title": "<string>",
"link": "<string>",
"desc": "<string>",
"source": "<string>",
"type": "website",
"date": "<string>",
"dateModified": "<string>",
"image": "<string>",
"snippet": "<string>",
"answer": "<string>",
"extracts": [
"<string>"
],
"contentType": "<string>",
"reader": {},
"contentSafety": {
"rating": "safe",
"safeSearchApplied": true
},
"bang": "<string>",
"queryIndices": [
123
],
"seeAlso": [
{
"title": "<string>",
"url": "<string>",
"source": "<string>"
}
]
}
],
"weather": {
"location": {
"name": "<string>",
"country": "<string>",
"coordinates": {
"latitude": 123,
"longitude": 123
}
},
"temperature": 123,
"units": "metric",
"description": "<string>",
"feelsLike": 123,
"humidity": 123,
"windSpeed": 123,
"windDirection": 123,
"pressure": 123,
"icon": "<string>",
"cloudiness": 123,
"visibility": 123,
"timestamp": 123
},
"calculation": {
"expression": "<string>",
"result": "<string>",
"rawResult": "<unknown>"
}
}{
"error": "Unauthorized",
"message": "Invalid API key"
}{
"error": "Insufficient Credits",
"message": "Your account has insufficient credits. Please add credits to continue."
}{
"error": "Unknown topic",
"message": "No curated news feed exists for topic 'gardening'.",
"valid_topics": [
"technology",
"business",
"finance",
"politics",
"sports",
"health",
"science",
"world",
"entertainment",
"us",
"europe",
"uk",
"asia",
"middle-east",
"africa",
"latin-america",
"australia",
"programming",
"startups",
"media",
"crypto",
"legal",
"top",
"hn-frontpage",
"ai-news",
"tech-news"
]
}{
"error": "Too Many Requests",
"message": "Rate limit of N requests per second exceeded"
}{
"error": "Service unavailable",
"message": "The 'world' news feed is temporarily unavailable. Retry shortly."
}Get a curated news feed
Returns a curated, ranked news feed for a fixed topic — there is no query parameter, the topic path segment selects the feed. results are ordered by relevance (a semantic pass tuned to the topic, weighted toward fresher articles); news holds the same articles in strict reverse-chronological order. images includes article images when available.
curl --request GET \
--url https://api.andiai.com/api/v1/news/{topic} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.andiai.com/api/v1/news/{topic}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.andiai.com/api/v1/news/{topic}', 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.andiai.com/api/v1/news/{topic}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.andiai.com/api/v1/news/{topic}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.andiai.com/api/v1/news/{topic}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.andiai.com/api/v1/news/{topic}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"results_type": "<string>",
"answer": "<string>",
"type": "<string>",
"title": "<string>",
"results": [
{
"title": "<string>",
"link": "<string>",
"desc": "<string>",
"source": "<string>",
"type": "website",
"date": "<string>",
"dateModified": "<string>",
"image": "<string>",
"snippet": "<string>",
"answer": "<string>",
"extracts": [
"<string>"
],
"contentType": "<string>",
"reader": {},
"contentSafety": {
"rating": "safe",
"safeSearchApplied": true
},
"bang": "<string>",
"queryIndices": [
123
],
"seeAlso": [
{
"title": "<string>",
"url": "<string>",
"source": "<string>"
}
]
}
],
"metrics": {
"query": "<string>",
"intent": "<string>",
"timestamp": "<string>",
"duration": 123,
"queries_executed": 123,
"api_requests_count": 123,
"results_returned": 123,
"total_results_found": 123,
"queries_provided": 123,
"queries_truncated": 123,
"cached": true,
"cache_age_seconds": 123,
"cost_dollars": 123,
"effort": "low",
"response_time_ms": 123
},
"correctedQuery": "<string>",
"related_searches": [
"<string>"
],
"topics": [
"<string>"
],
"related_topics": [
"<string>"
],
"infobox": {
"heading": "<string>",
"source": "<string>",
"items": [
{
"label": "<string>",
"value": "<string>"
}
]
},
"disambiguation": {
"query": "<string>",
"message": "<string>",
"options": [
{
"title": "<string>",
"text": "<string>",
"url": "<string>"
}
]
},
"aiSummary": {
"text": "<string>",
"generatedAt": "2023-11-07T05:31:56Z",
"model": "<string>",
"mode": "pregen"
},
"safeSearch": {
"requested": "off",
"applied": "off"
},
"videos": [
{
"title": "<string>",
"link": "<string>",
"desc": "<string>",
"source": "<string>",
"type": "website",
"date": "<string>",
"dateModified": "<string>",
"image": "<string>",
"snippet": "<string>",
"answer": "<string>",
"extracts": [
"<string>"
],
"contentType": "<string>",
"reader": {},
"contentSafety": {
"rating": "safe",
"safeSearchApplied": true
},
"bang": "<string>",
"queryIndices": [
123
],
"seeAlso": [
{
"title": "<string>",
"url": "<string>",
"source": "<string>"
}
]
}
],
"images": [
{
"title": "<string>",
"link": "<string>",
"image": "<string>",
"source": "<string>",
"type": "image",
"thumbnail": "<string>",
"width": "<string>",
"height": "<string>"
}
],
"news": [
{
"title": "<string>",
"link": "<string>",
"desc": "<string>",
"source": "<string>",
"type": "website",
"date": "<string>",
"dateModified": "<string>",
"image": "<string>",
"snippet": "<string>",
"answer": "<string>",
"extracts": [
"<string>"
],
"contentType": "<string>",
"reader": {},
"contentSafety": {
"rating": "safe",
"safeSearchApplied": true
},
"bang": "<string>",
"queryIndices": [
123
],
"seeAlso": [
{
"title": "<string>",
"url": "<string>",
"source": "<string>"
}
]
}
],
"places": [
{
"title": "<string>",
"link": "<string>",
"desc": "<string>",
"source": "<string>",
"type": "website",
"date": "<string>",
"dateModified": "<string>",
"image": "<string>",
"snippet": "<string>",
"answer": "<string>",
"extracts": [
"<string>"
],
"contentType": "<string>",
"reader": {},
"contentSafety": {
"rating": "safe",
"safeSearchApplied": true
},
"bang": "<string>",
"queryIndices": [
123
],
"seeAlso": [
{
"title": "<string>",
"url": "<string>",
"source": "<string>"
}
]
}
],
"profiles": [
{
"title": "<string>",
"link": "<string>",
"desc": "<string>",
"source": "<string>",
"type": "website",
"date": "<string>",
"dateModified": "<string>",
"image": "<string>",
"snippet": "<string>",
"answer": "<string>",
"extracts": [
"<string>"
],
"contentType": "<string>",
"reader": {},
"contentSafety": {
"rating": "safe",
"safeSearchApplied": true
},
"bang": "<string>",
"queryIndices": [
123
],
"seeAlso": [
{
"title": "<string>",
"url": "<string>",
"source": "<string>"
}
]
}
],
"social": [
{
"title": "<string>",
"link": "<string>",
"desc": "<string>",
"source": "<string>",
"type": "website",
"date": "<string>",
"dateModified": "<string>",
"image": "<string>",
"snippet": "<string>",
"answer": "<string>",
"extracts": [
"<string>"
],
"contentType": "<string>",
"reader": {},
"contentSafety": {
"rating": "safe",
"safeSearchApplied": true
},
"bang": "<string>",
"queryIndices": [
123
],
"seeAlso": [
{
"title": "<string>",
"url": "<string>",
"source": "<string>"
}
]
}
],
"academic": [
{
"title": "<string>",
"link": "<string>",
"desc": "<string>",
"source": "<string>",
"type": "website",
"date": "<string>",
"dateModified": "<string>",
"image": "<string>",
"snippet": "<string>",
"answer": "<string>",
"extracts": [
"<string>"
],
"contentType": "<string>",
"reader": {},
"contentSafety": {
"rating": "safe",
"safeSearchApplied": true
},
"bang": "<string>",
"queryIndices": [
123
],
"seeAlso": [
{
"title": "<string>",
"url": "<string>",
"source": "<string>"
}
]
}
],
"weather": {
"location": {
"name": "<string>",
"country": "<string>",
"coordinates": {
"latitude": 123,
"longitude": 123
}
},
"temperature": 123,
"units": "metric",
"description": "<string>",
"feelsLike": 123,
"humidity": 123,
"windSpeed": 123,
"windDirection": 123,
"pressure": 123,
"icon": "<string>",
"cloudiness": 123,
"visibility": 123,
"timestamp": 123
},
"calculation": {
"expression": "<string>",
"result": "<string>",
"rawResult": "<unknown>"
}
}{
"error": "Unauthorized",
"message": "Invalid API key"
}{
"error": "Insufficient Credits",
"message": "Your account has insufficient credits. Please add credits to continue."
}{
"error": "Unknown topic",
"message": "No curated news feed exists for topic 'gardening'.",
"valid_topics": [
"technology",
"business",
"finance",
"politics",
"sports",
"health",
"science",
"world",
"entertainment",
"us",
"europe",
"uk",
"asia",
"middle-east",
"africa",
"latin-america",
"australia",
"programming",
"startups",
"media",
"crypto",
"legal",
"top",
"hn-frontpage",
"ai-news",
"tech-news"
]
}{
"error": "Too Many Requests",
"message": "Rate limit of N requests per second exceeded"
}{
"error": "Service unavailable",
"message": "The 'world' news feed is temporarily unavailable. Retry shortly."
}Authorizations
API key from the API Console.
Path Parameters
Topic slug selecting the feed.
technology, business, finance, politics, sports, health, science, world, entertainment, us, europe, uk, asia, middle-east, africa, latin-america, australia, programming, startups, media, crypto, legal, top, hn-frontpage, ai-news, tech-news Query Parameters
Number of results to return.
1 <= x <= 50Bypass the cache and fetch a fresh feed.
Response
Curated news feed
The type of results returned (e.g., Search, News, Weather, Calculator). Determines which optional response sections are present.
Instant answer for the query when one is found — for example a definition, a weather line or a calculation — otherwise an empty string. On news feeds, a short summary of the headlines when available.
Same as results_type. Indicates the category of results.
Your query text (for a news feed, the feed's description).
Array of search results.
Show child attributes
Show child attributes
Search performance metrics. Always included in the response.
Show child attributes
Show child attributes
Spell-corrected query. Present when a misspelling in the original query is detected and corrected — any mode can return it; deep and exhaustive modes run the strongest spell correction.
Related search suggestions. Present on some queries.
Related topics. Present on some queries.
Related topic names for entity answers.
Facts panel for an entity answer.
Show child attributes
Show child attributes
Possible meanings when the query is ambiguous.
Show child attributes
Show child attributes
News feeds only: the pre-written news summary. The same text is in answer.
Show child attributes
Show child attributes
Echo of the safe-search state. Present on cache misses. Use it to confirm your safe parameter was honored.
Show child attributes
Show child attributes
Video results, when the search found any.
Show child attributes
Show child attributes
Image results, when the search found any.
Show child attributes
Show child attributes
News results, when the search found any.
Show child attributes
Show child attributes
Place and business results, when the search found any.
Show child attributes
Show child attributes
People and entity profiles, when the search found any.
Show child attributes
Show child attributes
Social posts, when the search found any.
Show child attributes
Show child attributes
Scholarly papers, when the search found any.
Show child attributes
Show child attributes
Weather data. Present when the query triggers a weather intent.
Show child attributes
Show child attributes
Calculation result. Present when the query triggers a calculation intent.
Show child attributes
Show child attributes

