Run the Search agent
curl --request POST \
--url https://api.messari.io/ai/v1/agent/search \
--header 'Content-Type: application/json' \
--header 'X-Messari-API-Key: <api-key>' \
--data '
{
"query": "What is EigenLayer restaking?"
}
'import requests
url = "https://api.messari.io/ai/v1/agent/search"
payload = { "query": "What is EigenLayer restaking?" }
headers = {
"X-Messari-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Messari-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: 'What is EigenLayer restaking?'})
};
fetch('https://api.messari.io/ai/v1/agent/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.messari.io/ai/v1/agent/search",
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' => 'What is EigenLayer restaking?'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Messari-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.messari.io/ai/v1/agent/search"
payload := strings.NewReader("{\n \"query\": \"What is EigenLayer restaking?\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Messari-API-Key", "<api-key>")
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://api.messari.io/ai/v1/agent/search")
.header("X-Messari-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"What is EigenLayer restaking?\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.messari.io/ai/v1/agent/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Messari-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"What is EigenLayer restaking?\"\n}"
response = http.request(request)
puts response.read_body{
"error": null,
"data": {
"sources": [
{
"domain": "research",
"title": "EigenLayer and Securing New Middleware",
"url": "https://messari.io/report/eigenlayer-and-securing-new-middleware",
"published_at": "2023-02-28T15:30:59Z",
"content": "TITLE:\nEigenLayer and Securing New Middleware\n\nHOOK:\nEigenLayer is a restaking primitive that enables Ethereum stakers to use their staked ETH to secure additional networks, thus effectively securing multiple services with the same initial capital. The team recently released the public version of their whitepaper.\n\nASSET SLUGS:\nethereum, eigenlayer\n\nPUBLISHED:\n2023-02-28T15:30:59.879000Z\n\nCONTENT: …"
},
{
"domain": "research",
"title": "EigenLayer and Securing New Middleware",
"url": "https://messari.io/report/eigenlayer-and-securing-new-middleware",
"published_at": "2023-02-28T15:30:59Z",
"content": "TITLE:\nEigenLayer and Securing New Middleware\n\nHOOK:\nEigenLayer is a restaking primitive that enables Ethereum stakers to use their staked ETH to secure additional networks, thus effectively securing multiple services with the same initial capital. The team recently released the public version of their whitepaper.\n\nASSET SLUGS:\nethereum, eigenlayer\n\nPUBLISHED:\n2023-02-28T15:30:59.879000Z\n\nCONTENT: …"
}
]
},
"metadata": {
"trace_id": "43efbf4c-e3c7-4d64-8892-9e8dc4c7a85a"
}
}{
"data": "<unknown>",
"error": "<string>"
}{
"data": "<unknown>",
"error": "<string>"
}{
"data": "<unknown>",
"error": "<string>"
}{
"data": "<unknown>",
"error": "<string>"
}{
"data": "<unknown>",
"error": "<string>"
}Agents
Run the Search agent
Runs Messari’s Search agent standalone over Messari research and news. Returns the retrieved documents in sources. There is no synthesized answer and no citation numbering: this endpoint retrieves, and the caller writes the answer. Requires an authenticated Enterprise user holding the ai_toolkit_permission API permission. Limited to 30 requests per minute per user.
POST
/
ai
/
v1
/
agent
/
search
Run the Search agent
curl --request POST \
--url https://api.messari.io/ai/v1/agent/search \
--header 'Content-Type: application/json' \
--header 'X-Messari-API-Key: <api-key>' \
--data '
{
"query": "What is EigenLayer restaking?"
}
'import requests
url = "https://api.messari.io/ai/v1/agent/search"
payload = { "query": "What is EigenLayer restaking?" }
headers = {
"X-Messari-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Messari-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: 'What is EigenLayer restaking?'})
};
fetch('https://api.messari.io/ai/v1/agent/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.messari.io/ai/v1/agent/search",
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' => 'What is EigenLayer restaking?'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Messari-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.messari.io/ai/v1/agent/search"
payload := strings.NewReader("{\n \"query\": \"What is EigenLayer restaking?\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Messari-API-Key", "<api-key>")
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://api.messari.io/ai/v1/agent/search")
.header("X-Messari-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"What is EigenLayer restaking?\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.messari.io/ai/v1/agent/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Messari-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"What is EigenLayer restaking?\"\n}"
response = http.request(request)
puts response.read_body{
"error": null,
"data": {
"sources": [
{
"domain": "research",
"title": "EigenLayer and Securing New Middleware",
"url": "https://messari.io/report/eigenlayer-and-securing-new-middleware",
"published_at": "2023-02-28T15:30:59Z",
"content": "TITLE:\nEigenLayer and Securing New Middleware\n\nHOOK:\nEigenLayer is a restaking primitive that enables Ethereum stakers to use their staked ETH to secure additional networks, thus effectively securing multiple services with the same initial capital. The team recently released the public version of their whitepaper.\n\nASSET SLUGS:\nethereum, eigenlayer\n\nPUBLISHED:\n2023-02-28T15:30:59.879000Z\n\nCONTENT: …"
},
{
"domain": "research",
"title": "EigenLayer and Securing New Middleware",
"url": "https://messari.io/report/eigenlayer-and-securing-new-middleware",
"published_at": "2023-02-28T15:30:59Z",
"content": "TITLE:\nEigenLayer and Securing New Middleware\n\nHOOK:\nEigenLayer is a restaking primitive that enables Ethereum stakers to use their staked ETH to secure additional networks, thus effectively securing multiple services with the same initial capital. The team recently released the public version of their whitepaper.\n\nASSET SLUGS:\nethereum, eigenlayer\n\nPUBLISHED:\n2023-02-28T15:30:59.879000Z\n\nCONTENT: …"
}
]
},
"metadata": {
"trace_id": "43efbf4c-e3c7-4d64-8892-9e8dc4c7a85a"
}
}{
"data": "<unknown>",
"error": "<string>"
}{
"data": "<unknown>",
"error": "<string>"
}{
"data": "<unknown>",
"error": "<string>"
}{
"data": "<unknown>",
"error": "<string>"
}{
"data": "<unknown>",
"error": "<string>"
}⌘I

