Google Knowledge
curl --request POST \
--url https://encrata.com/api/agent/google-knowledge \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>"
}
'import requests
url = "https://encrata.com/api/agent/google-knowledge"
payload = { "query": "<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>'})
};
fetch('https://encrata.com/api/agent/google-knowledge', 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://encrata.com/api/agent/google-knowledge",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://encrata.com/api/agent/google-knowledge"
payload := strings.NewReader("{\n \"query\": \"<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))
}HttpResponse<String> response = Unirest.post("https://encrata.com/api/agent/google-knowledge")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://encrata.com/api/agent/google-knowledge")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"query": "Ada Lovelace",
"type": "search",
"credits": 1,
"knowledge_graph": {
"title": "Ada Lovelace",
"type": "Mathematician",
"description": "English mathematician, writer"
},
"enrichment": {
"wikipedia": {
"title": "Ada Lovelace",
"extract": "Augusta Ada King, Countess of Lovelace, was an English mathematician...",
"url": "https://en.wikipedia.org/wiki/Ada_Lovelace"
},
"wikidata": { "id": "Q7259", "label": "Ada Lovelace", "description": "English mathematician" }
}
}
Lookups
Google Knowledge
Resolve a person, company, or topic into a single entity card from Google, Wikipedia, Wikidata, and DuckDuckGo.
POST
/
api
/
agent
/
google-knowledge
Google Knowledge
curl --request POST \
--url https://encrata.com/api/agent/google-knowledge \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>"
}
'import requests
url = "https://encrata.com/api/agent/google-knowledge"
payload = { "query": "<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>'})
};
fetch('https://encrata.com/api/agent/google-knowledge', 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://encrata.com/api/agent/google-knowledge",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://encrata.com/api/agent/google-knowledge"
payload := strings.NewReader("{\n \"query\": \"<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))
}HttpResponse<String> response = Unirest.post("https://encrata.com/api/agent/google-knowledge")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://encrata.com/api/agent/google-knowledge")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"query": "Ada Lovelace",
"type": "search",
"credits": 1,
"knowledge_graph": {
"title": "Ada Lovelace",
"type": "Mathematician",
"description": "English mathematician, writer"
},
"enrichment": {
"wikipedia": {
"title": "Ada Lovelace",
"extract": "Augusta Ada King, Countess of Lovelace, was an English mathematician...",
"url": "https://en.wikipedia.org/wiki/Ada_Lovelace"
},
"wikidata": { "id": "Q7259", "label": "Ada Lovelace", "description": "English mathematician" }
}
}
Authentication
Requires an API key in theAuthorization header.
Authorization: Bearer YOUR_API_KEY
Request
The person, company, or topic to look up.
Response
Returns the standard Google lookup shape with the knowledge sections populated:knowledge_graph, answer_box, and an enrichment object carrying Wikipedia, Wikidata, and DuckDuckGo entities.
Google knowledge panel (title, type, description, website, imageUrl, attributes).
Google answer box (title, answer, snippet, link).
{
"query": "Ada Lovelace",
"type": "search",
"credits": 1,
"knowledge_graph": {
"title": "Ada Lovelace",
"type": "Mathematician",
"description": "English mathematician, writer"
},
"enrichment": {
"wikipedia": {
"title": "Ada Lovelace",
"extract": "Augusta Ada King, Countess of Lovelace, was an English mathematician...",
"url": "https://en.wikipedia.org/wiki/Ada_Lovelace"
},
"wikidata": { "id": "Q7259", "label": "Ada Lovelace", "description": "English mathematician" }
}
}
Credits
1 credit per lookup.⌘I