curl --request POST \
--url https://api.eu.linqalpha.com/v1/analytics/sse \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"query": "Analyze AAPL earnings trend over the past 4 quarters"
}
'import requests
url = "https://api.eu.linqalpha.com/v1/analytics/sse"
payload = { "query": "Analyze AAPL earnings trend over the past 4 quarters" }
headers = {
"X-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-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: 'Analyze AAPL earnings trend over the past 4 quarters'})
};
fetch('https://api.eu.linqalpha.com/v1/analytics/sse', 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.eu.linqalpha.com/v1/analytics/sse",
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' => 'Analyze AAPL earnings trend over the past 4 quarters'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-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.eu.linqalpha.com/v1/analytics/sse"
payload := strings.NewReader("{\n \"query\": \"Analyze AAPL earnings trend over the past 4 quarters\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-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.eu.linqalpha.com/v1/analytics/sse")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"Analyze AAPL earnings trend over the past 4 quarters\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eu.linqalpha.com/v1/analytics/sse")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"Analyze AAPL earnings trend over the past 4 quarters\"\n}"
response = http.request(request)
puts response.read_bodyAnalytics
Legacy in the EU region. This endpoint is kept for backward compatibility and is not recommended for new EU integrations. Use Analytics V2 (POST /v2/analytics/sse) instead.
Generate an agentic analytics response via Server-Sent Events. This endpoint leverages multi-step reasoning with tool use to deliver deeper, more comprehensive answers compared to the standard search & generate endpoints.
The response stream includes message echo, thinking processes, tool calls with results, and the final answer.
Note: Unlike /v1/search or /v2/chat/sse, this endpoint does not accept separate filter parameters (e.g., stock_ids, tickers, external_types, upload_period). Instead, include all filtering context directly in the query field. For example: "Analyze AAPL earnings trend from Q1 2024 to Q4 2025".
Event Flow
conversation -> conversation_id for this session
message -> echo of user query
status: start -> stream begins
+-- AGENTIC LOOP (repeats) ----------------------------+
| tool_use_block -> 1-N parallel tool calls (batch)|
| tool_result_block -> results for each call |
| status: keep_alive -> heartbeat (if >15s gap) |
| think (x N) -> reasoning tokens |
+------------------------------------------------------+
think (x N) -> extended reasoning / draft
answer -> single chunk final answer
status: finish -> stream ends
curl --request POST \
--url https://api.eu.linqalpha.com/v1/analytics/sse \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"query": "Analyze AAPL earnings trend over the past 4 quarters"
}
'import requests
url = "https://api.eu.linqalpha.com/v1/analytics/sse"
payload = { "query": "Analyze AAPL earnings trend over the past 4 quarters" }
headers = {
"X-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-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: 'Analyze AAPL earnings trend over the past 4 quarters'})
};
fetch('https://api.eu.linqalpha.com/v1/analytics/sse', 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.eu.linqalpha.com/v1/analytics/sse",
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' => 'Analyze AAPL earnings trend over the past 4 quarters'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-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.eu.linqalpha.com/v1/analytics/sse"
payload := strings.NewReader("{\n \"query\": \"Analyze AAPL earnings trend over the past 4 quarters\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-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.eu.linqalpha.com/v1/analytics/sse")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"Analyze AAPL earnings trend over the past 4 quarters\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eu.linqalpha.com/v1/analytics/sse")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"Analyze AAPL earnings trend over the past 4 quarters\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Body
The analytics query to process. Include ticker symbols, date ranges, and any other filtering context directly in the query text (e.g., "Compare MSFT and GOOG revenue growth from 2023 to 2025").
Existing conversation ID to continue a multi-turn conversation. Omit or set to null for a new conversation.
Organization ID. Required for platform API keys to identify the target organization.
"123e4567-e89b-12d3-a456-426614174000"
User ID. Required together with user_email for platform API keys to identify the specific user.
"user-123"
User email. Required together with user_id for platform API keys to identify the specific user.
"john.doe@example.com"
Response
SSE stream of analytics events. Each event is sent as data: {json}\n\n. The stream contains multiple event types in sequence. See the Event Flow section above for the typical ordering.