Answer a question with citations
POST
/
api
/
answer
Answer a question with citations
curl --request POST \
--url https://api.truscan.co/api/answer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"tier": "instant",
"sources": 10,
"passages": 5,
"format": "json",
"site": "<string>",
"lang": "<string>"
}
'import requests
url = "https://api.truscan.co/api/answer"
payload = {
"query": "<string>",
"tier": "instant",
"sources": 10,
"passages": 5,
"format": "json",
"site": "<string>",
"lang": "<string>"
}
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: '<string>',
tier: 'instant',
sources: 10,
passages: 5,
format: 'json',
site: '<string>',
lang: '<string>'
})
};
fetch('https://api.truscan.co/api/answer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truscan.co/api/answer"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"tier\": \"instant\",\n \"sources\": 10,\n \"passages\": 5,\n \"format\": \"json\",\n \"site\": \"<string>\",\n \"lang\": \"<string>\"\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))
}{
"success": true,
"message": "Answered from 2 sources.",
"result": {
"id": "ans_8d3ddecc038c10d9",
"query": "why is TLS certificate pinning discouraged in mobile apps now",
"answer": "Originally, certificate pinning was designed to prevent monster-in-the-middle (MITM) attacks by associating a hostname with a specific TLS certificate. [2]\n\nThe cost-benefit equation has changed: the risk of a rogue certificate is now quite low, whereas the risk of your own app breaking due to pinning is comparatively higher. [1]",
"passages": [
{
"text": "Originally, certificate pinning was designed to prevent monster-in-the-middle (MITM) attacks by associating a hostname with a specific TLS certificate.",
"source": 2,
"score": 0.7412
},
{
"text": "The cost-benefit equation has changed: the risk of a rogue certificate is now quite low, whereas the risk of your own app breaking due to pinning is comparatively higher.",
"source": 1,
"score": 0.6903
}
],
"sources": [
{
"n": 1,
"url": "https://blog.cloudflare.com/why-certificate-pinning-is-outdated/",
"title": "Avoiding downtime: modern alternatives to outdated certificate pinning practices",
"domain": "blog.cloudflare.com",
"score": 0.614
},
{
"n": 2,
"url": "https://www.sans.org/blog/tls-ssl-failures-and-some-thoughts-on-cert-pinning-part-1",
"title": "TLS/SSL failures and some thoughts on cert pinning",
"domain": "sans.org",
"author": "Jake Williams",
"score": 0.552
}
],
"format": "json",
"usage": {
"answers": 1,
"search_requests": 1,
"pages_read": 9
},
"stats": {
"took_ms": 13095,
"search_ms": 12940,
"sources_read": 9,
"considered": 25,
"cached": false
}
}
}{
"success": false,
"message": "<string>",
"result": {
"code": "<string>"
}
}{
"success": false,
"message": "<string>",
"result": {
"code": "<string>"
}
}{
"success": false,
"message": "<string>",
"result": {
"code": "<string>"
}
}{
"success": false,
"message": "<string>",
"result": {
"code": "<string>"
}
}{
"success": false,
"message": "<string>",
"result": {
"code": "<string>"
}
}Authorizations
An API key, sent as Authorization: Bearer enc_…. A dashboard session cookie works on the same route.
Body
application/json
The question. q is accepted as an alias.
Maximum string length:
512Search depth behind the answer. Instant reads up to 10 pages, deep 50, deep reasoning 100, so a deeper tier has more to quote from.
Available options:
instant, deep, deep_reasoning How many ranked results the answer may quote from.
Required range:
1 <= x <= 50How many quotes the answer carries. Past a dozen it stops reading as an answer and starts reading as the search results again.
Required range:
1 <= x <= 12Available options:
json, markdown, text Restrict to one domain.
Available options:
any, day, week, month, year Available options:
general, news, science, images, videos, it Last modified on September 21, 2026
⌘I
Answer a question with citations
curl --request POST \
--url https://api.truscan.co/api/answer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"tier": "instant",
"sources": 10,
"passages": 5,
"format": "json",
"site": "<string>",
"lang": "<string>"
}
'import requests
url = "https://api.truscan.co/api/answer"
payload = {
"query": "<string>",
"tier": "instant",
"sources": 10,
"passages": 5,
"format": "json",
"site": "<string>",
"lang": "<string>"
}
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: '<string>',
tier: 'instant',
sources: 10,
passages: 5,
format: 'json',
site: '<string>',
lang: '<string>'
})
};
fetch('https://api.truscan.co/api/answer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truscan.co/api/answer"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"tier\": \"instant\",\n \"sources\": 10,\n \"passages\": 5,\n \"format\": \"json\",\n \"site\": \"<string>\",\n \"lang\": \"<string>\"\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))
}{
"success": true,
"message": "Answered from 2 sources.",
"result": {
"id": "ans_8d3ddecc038c10d9",
"query": "why is TLS certificate pinning discouraged in mobile apps now",
"answer": "Originally, certificate pinning was designed to prevent monster-in-the-middle (MITM) attacks by associating a hostname with a specific TLS certificate. [2]\n\nThe cost-benefit equation has changed: the risk of a rogue certificate is now quite low, whereas the risk of your own app breaking due to pinning is comparatively higher. [1]",
"passages": [
{
"text": "Originally, certificate pinning was designed to prevent monster-in-the-middle (MITM) attacks by associating a hostname with a specific TLS certificate.",
"source": 2,
"score": 0.7412
},
{
"text": "The cost-benefit equation has changed: the risk of a rogue certificate is now quite low, whereas the risk of your own app breaking due to pinning is comparatively higher.",
"source": 1,
"score": 0.6903
}
],
"sources": [
{
"n": 1,
"url": "https://blog.cloudflare.com/why-certificate-pinning-is-outdated/",
"title": "Avoiding downtime: modern alternatives to outdated certificate pinning practices",
"domain": "blog.cloudflare.com",
"score": 0.614
},
{
"n": 2,
"url": "https://www.sans.org/blog/tls-ssl-failures-and-some-thoughts-on-cert-pinning-part-1",
"title": "TLS/SSL failures and some thoughts on cert pinning",
"domain": "sans.org",
"author": "Jake Williams",
"score": 0.552
}
],
"format": "json",
"usage": {
"answers": 1,
"search_requests": 1,
"pages_read": 9
},
"stats": {
"took_ms": 13095,
"search_ms": 12940,
"sources_read": 9,
"considered": 25,
"cached": false
}
}
}{
"success": false,
"message": "<string>",
"result": {
"code": "<string>"
}
}{
"success": false,
"message": "<string>",
"result": {
"code": "<string>"
}
}{
"success": false,
"message": "<string>",
"result": {
"code": "<string>"
}
}{
"success": false,
"message": "<string>",
"result": {
"code": "<string>"
}
}{
"success": false,
"message": "<string>",
"result": {
"code": "<string>"
}
}