Get one trace span
curl --request GET \
--url https://app.crewai.com/api/v1/automations/{automation_id}/executions/{execution_id}/trace/spans/{span_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.crewai.com/api/v1/automations/{automation_id}/executions/{execution_id}/trace/spans/{span_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.crewai.com/api/v1/automations/{automation_id}/executions/{execution_id}/trace/spans/{span_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://app.crewai.com/api/v1/automations/{automation_id}/executions/{execution_id}/trace/spans/{span_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://app.crewai.com/api/v1/automations/{automation_id}/executions/{execution_id}/trace/spans/{span_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.crewai.com/api/v1/automations/{automation_id}/executions/{execution_id}/trace/spans/{span_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.crewai.com/api/v1/automations/{automation_id}/executions/{execution_id}/trace/spans/{span_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "a1b2c3d4e5f60718",
"parent_id": "0f1e2d3c4b5a6978",
"name": "call llm",
"type": "llm_call",
"status": "ok",
"started_at": "2026-07-07T00:00:01.250000Z",
"finished_at": "2026-07-07T00:00:03.500000Z",
"duration_ms": 2250,
"input_tokens": 812,
"output_tokens": 164,
"status_message": null,
"attributes": {
"gen_ai.request.model": "gpt-4.1"
}
}
}{
"errors": [
{
"type": "https://docs-platform.crewai.com/api/problems/unauthorized",
"code": "unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "Missing or invalid bearer token."
}
]
}{
"errors": [
{
"type": "https://docs-platform.crewai.com/api/problems/not_found",
"code": "not_found",
"title": "Not found",
"status": 404,
"detail": "The requested resource could not be found."
}
]
}Automations
Get one trace span
Returns one span of an Automation execution’s trace with its attributes: the prompts, completions, tool arguments and results it recorded, as OpenTelemetry attributes. A single span can hold a few megabytes.
GET
/
api
/
v1
/
automations
/
{automation_id}
/
executions
/
{execution_id}
/
trace
/
spans
/
{span_id}
Get one trace span
curl --request GET \
--url https://app.crewai.com/api/v1/automations/{automation_id}/executions/{execution_id}/trace/spans/{span_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.crewai.com/api/v1/automations/{automation_id}/executions/{execution_id}/trace/spans/{span_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.crewai.com/api/v1/automations/{automation_id}/executions/{execution_id}/trace/spans/{span_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://app.crewai.com/api/v1/automations/{automation_id}/executions/{execution_id}/trace/spans/{span_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://app.crewai.com/api/v1/automations/{automation_id}/executions/{execution_id}/trace/spans/{span_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.crewai.com/api/v1/automations/{automation_id}/executions/{execution_id}/trace/spans/{span_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.crewai.com/api/v1/automations/{automation_id}/executions/{execution_id}/trace/spans/{span_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "a1b2c3d4e5f60718",
"parent_id": "0f1e2d3c4b5a6978",
"name": "call llm",
"type": "llm_call",
"status": "ok",
"started_at": "2026-07-07T00:00:01.250000Z",
"finished_at": "2026-07-07T00:00:03.500000Z",
"duration_ms": 2250,
"input_tokens": 812,
"output_tokens": 164,
"status_message": null,
"attributes": {
"gen_ai.request.model": "gpt-4.1"
}
}
}{
"errors": [
{
"type": "https://docs-platform.crewai.com/api/problems/unauthorized",
"code": "unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "Missing or invalid bearer token."
}
]
}{
"errors": [
{
"type": "https://docs-platform.crewai.com/api/problems/not_found",
"code": "not_found",
"title": "Not found",
"status": 404,
"detail": "The requested resource could not be found."
}
]
}