Fetch a stored search by id
GET
/
api
/
search
/
searches
/
{id}
Fetch a stored search by id
curl --request GET \
--url https://api.truscan.co/api/search/searches/{id}import requests
url = "https://api.truscan.co/api/search/searches/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.truscan.co/api/search/searches/{id}', 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/searches/{id}",
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/searches/{id}"
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/searches/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.truscan.co/api/search/searches/{id}")
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>"
}
}⌘I
Fetch a stored search by id
curl --request GET \
--url https://api.truscan.co/api/search/searches/{id}import requests
url = "https://api.truscan.co/api/search/searches/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.truscan.co/api/search/searches/{id}', 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/searches/{id}",
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/searches/{id}"
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/searches/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.truscan.co/api/search/searches/{id}")
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>"
}
}