Run a search without a body
GET
/
api
/
search
/
query
Run a search without a body
curl --request GET \
--url https://api.truscan.co/api/search/queryimport requests
url = "https://api.truscan.co/api/search/query"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.truscan.co/api/search/query', 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.truscan.co/api/search/query",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.truscan.co/api/search/query"
req, _ := http.NewRequest("GET", url, nil)
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.truscan.co/api/search/query")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.truscan.co/api/search/query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"result": {
"id": "<string>",
"query": "<string>",
"tier": "instant",
"total": 123,
"format": "json",
"rendered": "<string>",
"results": [
{
"rank": 123,
"url": "<string>",
"title": "<string>",
"snippet": "<string>",
"domain": "<string>",
"score": 123,
"components": {
"consensus": 123,
"position": 123,
"lexical": 123,
"proximity": 123,
"authority": 123,
"freshness": 123
},
"published_at": "2023-11-07T05:31:56Z",
"content": {
"text": "<string>",
"markdown": "<string>",
"excerpt": "<string>",
"words": 123,
"lang": "<string>",
"author": "<string>",
"site_name": "<string>",
"truncated": true,
"error": "<string>",
"highlights": [
{
"text": "<string>",
"start": 123,
"end": 123,
"score": 123
}
]
}
}
],
"stats": {
"took_ms": 123,
"recall_ms": 123,
"enrich_ms": 123,
"candidates": 123,
"deduped": 123,
"enriched": 123,
"cached": true
}
}
}{
"success": false,
"message": "<string>",
"result": {
"code": "<string>"
}
}{
"success": false,
"message": "<string>",
"result": {
"code": "<string>"
}
}{
"success": false,
"message": "<string>",
"result": {
"code": "<string>"
}
}Query Parameters
Maximum string length:
512Search depth. Deeper tiers widen recall and read more pages, and are priced higher by the billing service.
Available options:
instant, fast, auto, deep, deep_reasoning Required range:
1 <= x <= 50Fetch and extract page bodies. Default true.
Available options:
0, 1, true, false Available options:
json, markdown, text With format=markdown or text, return the rendered document itself instead of the envelope.
Available options:
1 Available options:
any, day, week, month, year Available options:
general, news, science, images, videos, it ⌘I
Run a search without a body
curl --request GET \
--url https://api.truscan.co/api/search/queryimport requests
url = "https://api.truscan.co/api/search/query"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.truscan.co/api/search/query', 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.truscan.co/api/search/query",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.truscan.co/api/search/query"
req, _ := http.NewRequest("GET", url, nil)
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.truscan.co/api/search/query")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.truscan.co/api/search/query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"result": {
"id": "<string>",
"query": "<string>",
"tier": "instant",
"total": 123,
"format": "json",
"rendered": "<string>",
"results": [
{
"rank": 123,
"url": "<string>",
"title": "<string>",
"snippet": "<string>",
"domain": "<string>",
"score": 123,
"components": {
"consensus": 123,
"position": 123,
"lexical": 123,
"proximity": 123,
"authority": 123,
"freshness": 123
},
"published_at": "2023-11-07T05:31:56Z",
"content": {
"text": "<string>",
"markdown": "<string>",
"excerpt": "<string>",
"words": 123,
"lang": "<string>",
"author": "<string>",
"site_name": "<string>",
"truncated": true,
"error": "<string>",
"highlights": [
{
"text": "<string>",
"start": 123,
"end": 123,
"score": 123
}
]
}
}
],
"stats": {
"took_ms": 123,
"recall_ms": 123,
"enrich_ms": 123,
"candidates": 123,
"deduped": 123,
"enriched": 123,
"cached": true
}
}
}{
"success": false,
"message": "<string>",
"result": {
"code": "<string>"
}
}{
"success": false,
"message": "<string>",
"result": {
"code": "<string>"
}
}{
"success": false,
"message": "<string>",
"result": {
"code": "<string>"
}
}