curl --request GET \
--url https://api.andiai.com/api/v1/search \
--header 'x-api-key: <api-key>'import requests
url = "https://api.andiai.com/api/v1/search"
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/search', 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/search",
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/search"
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/search")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.andiai.com/api/v1/search")
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": "Missing required parameter: q",
"message": "The q parameter is required"
}{
"error": "Unauthorized",
"message": "Invalid API key"
}{
"error": "Insufficient Credits",
"message": "Your account has insufficient credits. Please add credits to continue."
}{
"error": "Too Many Requests",
"message": "Rate limit of N requests per second exceeded"
}{
"error": "Internal server error",
"message": "Unknown error"
}Search the web
Performs a web search and returns structured results. Search effort is set automatically per query by default (searchMode=auto), with fixed modes (low-cost, fast, balanced, deep, exhaustive) available for manual control. Supports domain and date filtering, query operators, and multiple output formats.
curl --request GET \
--url https://api.andiai.com/api/v1/search \
--header 'x-api-key: <api-key>'import requests
url = "https://api.andiai.com/api/v1/search"
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/search', 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/search",
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/search"
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/search")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.andiai.com/api/v1/search")
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": "Missing required parameter: q",
"message": "The q parameter is required"
}{
"error": "Unauthorized",
"message": "Invalid API key"
}{
"error": "Insufficient Credits",
"message": "Your account has insufficient credits. Please add credits to continue."
}{
"error": "Too Many Requests",
"message": "Rate limit of N requests per second exceeded"
}{
"error": "Internal server error",
"message": "Unknown error"
}Authorizations
API key from the API Console.
Query Parameters
Search query string. Supports query operators when parseOperators is enabled. You can also pass a JSON array of up to 5 queries for multi-query searches (e.g., ["query one", "query two"]).
Maximum number of results to return.
1 <= x <= 100Number of results to skip for pagination.
x >= 0Search effort control. auto (default) sets the effort per query automatically — simple lookups resolve fast, complex questions get deeper treatment. The fixed modes pin an effort level: low-cost caps the work done per request for budget-constrained callers. fast returns results in about 1.2 seconds. balanced is everyday web search, about 3–4 seconds. deep searches from multiple angles with spell correction, about 6.5 seconds. exhaustive is Andi's most thorough mode: more sources and more time, up to about 15 seconds; for a question with several parts or steps it searches each part. Deeper modes add query expansion, follow-up searches fanned out from initial results, and stronger reranking. Requests are billed on outcome-based pricing (see metrics.cost_dollars).
auto, low-cost, fast, balanced, deep, exhaustive Thoroughness dial, independent of searchMode: low favors speed, medium is balanced, high searches from multiple angles with spell correction, max gives the most complete results and also searches each part of a question that has several parts or steps — the same tiers as pinning searchMode to fast, balanced, deep, and exhaustive respectively. An explicit searchMode always wins over effort. With the default auto mode, an explicit effort pins its equivalent mode. Omit for the adaptive default. Invalid values return a 400 listing the valid tiers.
low, medium, high, max Semantic reranker size hint. small is the lightest and fastest; medium and above apply stronger relevance scoring but need a deeper searchMode and may be clamped by the request's time and cost budget (for example, xl needs deep or exhaustive). auto (default) selects a tier automatically based on the query and search mode.
auto, small, medium, large, xl Force a specific search intent. When not set, the API auto-detects intent from the query. Accepts common aliases like search, news, video, images, weather, wiki, code, recipe, place, time, and others. Set none to disable intent detection entirely; auto is equivalent to omitting the parameter.
Response format. json returns a JSON object. context returns results as markdown text, suitable for passing to language models.
json, context Level of metadata to include. basic includes standard search metrics. full includes extended metadata with content type details and reader data on results.
basic, full Include text extracts from result pages in the response. Defaults to true when format=context. Also returned by default with metadata=full.
Include each result's full page text, in reader.markdown (or reader.content when the page has no markdown version). Adds time and cost; deeper modes allow more time.
Deprecated alias of content. Retained for backward compatibility; use content instead.
Maximum number of characters of enriched content to return per result. Only applies when content (or its deprecated alias enrichContent) is true.
Target time in milliseconds for ranked results (1000–30000). It is a target, not a hard ceiling. Omit it for the mode's normal speed; a larger value (e.g. 30000) lets slower sources run longer, so deep/exhaustive searches can take close to that long. The search may run a little past it when it needs a moment more to return a useful page. Requested page text (content/extracts) is fetched afterward, on top of the target. Values below 1000 are raised to 1000; values above 30000 are lowered to 30000; 0, empty or non-numeric values are ignored. With searchMode=auto (the default), a timeout steps the resolved mode down to the richest one that fits it. An explicit searchMode is always honored.
1000 <= x <= 30000Safe search filtering level. off disables filtering, moderate filters most explicit content, strict applies maximum filtering.
off, moderate, strict Two-letter ISO 3166-1 country code to localize results.
Two-letter ISO 3166-1 country code to restrict results to sources from this country. Unlike country, which biases results by locale, sourceCountry excludes results from other countries.
Preferred language for results, as an ISO 639-1 code.
Unit system for weather and calculation results. Defaults based on the country parameter — imperial for US, metric for all other countries.
metric, imperial Bypass cached results and fetch fresh data.
Relative date range filter for results.
day, week, month, year, 24h, 7d, 30d, 90d, 1y Filter results published on or after this date. Format: YYYY-MM-DD.
Filter results published on or before this date. Format: YYYY-MM-DD.
Comma-separated list of domains to restrict results to. Supports wildcards (*.example.com).
Comma-separated list of domains to exclude from results. Supports wildcards.
Comma-separated terms that must appear in results.
Comma-separated terms to exclude from results.
Parse query operators (like site:, filetype:, intitle:) from the query string. When disabled, the query is treated as literal text.
Field name for result URLs. Use url to receive the URL field as url instead of the default link. Only affects the /search endpoint.
link, url Field naming for image results. long (default) uses full field names. short uses abbreviated field names.
short, long Filter results by file type.
Filter results to pages with this term in the title.
Filter results to pages with this term in the URL.
Filter results to pages with this term in the body text.
Response
Search results. JSON by default; LLM-ready markdown with YAML frontmatter when format=context.
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

