curl --request GET \
--url https://api.trakkr.ai/get-competitor-data \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.trakkr.ai/get-competitor-data', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trakkr.ai/get-competitor-data"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"brand_performance_summary": [
{
"brand_name": "Acme Corporation",
"total_mentions_overall": 150,
"overall_avg_score": 85.5,
"overall_avg_rank": "2.3",
"overall_rank_distribution": [
{
"bucket": "Rank 1",
"percentage": 25.5,
"count": 45
},
{
"bucket": "Ranks 2-3",
"percentage": 35.2,
"count": 62
}
],
"llm_specific_performance_list": [
{
"llm_name": "OpenAI",
"total_mentions": 75,
"avg_score": 88.2,
"avg_rank": "1.8",
"rank_distribution": [
{
"bucket": "Rank 1",
"percentage": 30,
"count": 25
}
]
}
]
},
{
"brand_name": "Competitor A",
"total_mentions_overall": 120,
"overall_avg_score": 78.3,
"overall_avg_rank": "3.1",
"overall_rank_distribution": [
{
"bucket": "Rank 1",
"percentage": 15,
"count": 18
}
],
"llm_specific_performance_list": [
{
"llm_name": "OpenAI",
"total_mentions": 60,
"avg_score": 82.1,
"avg_rank": "2.5"
}
]
}
],
"daily_visibility_data": [
{
"date": "2025-01-15",
"prompts_data": [
{
"prompt_text": "What are the best CRM platforms?",
"llm_breakdown": [
{
"llm_name": "OpenAI",
"visibility_scores": [
{
"brand_name": "Acme Corporation",
"avg_score": 88.5,
"avg_rank": "1.8",
"mention_count": 15,
"date": "2025-01-15"
}
]
}
]
}
]
}
],
"top_spot_ownership": [
{
"prompt_text": "What are the best CRM platforms?",
"top_brand": "Acme Corporation",
"count_of_rank_1_for_top_brand": 25,
"all_rank_1_counts_list": [
{
"brand_name": "Acme Corporation",
"count": 25
},
{
"brand_name": "Competitor A",
"count": 18
}
]
}
],
"primary_brand_cooccurrences": [
{
"competitor_name": "Competitor A",
"cooccurrence_count": 45,
"cooccurrence_rate_percent": 75.5,
"primary_brand_position_above_rate_percent": 60
}
],
"opportunity_prompts": [
{
"prompt_text": "What are the best email marketing tools?",
"primary_brand_rank_info": "Not Ranked",
"highly_ranked_competitors": [
"Mailchimp",
"Constant Contact"
]
}
],
"llm_performance_overview": [
{
"llm_name": "OpenAI",
"primary_brand_metrics": {
"brand_name": "Acme Corporation",
"avg_rank": "1.8",
"avg_score": 88.2,
"total_mentions": 75
},
"competitor_metrics": [
{
"brand_name": "Competitor A",
"avg_rank": "2.5",
"avg_score": 82.1,
"total_mentions": 60
}
]
}
]
}{
"error": "INVALID_PARAMETER",
"timestamp": "2025-01-15T12:30:00Z",
"message": "The 'brand' parameter is required",
"errors": [
"<string>"
],
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"request_id": "req_1234567890"
}{
"error": "UNAUTHORIZED",
"message": "Missing API key",
"errors": [
"API key must be provided in the Authorization header as 'Bearer <api_key>'"
],
"timestamp": "2025-01-15T12:30:00Z",
"request_id": "req_1234567890"
}{
"error": "FORBIDDEN",
"message": "Invalid API key",
"errors": [
"No accounts found for this API key"
],
"timestamp": "2025-01-15T12:30:00Z",
"request_id": "req_1234567890"
}{
"error": "INVALID_PARAMETER",
"timestamp": "2025-01-15T12:30:00Z",
"message": "The 'brand' parameter is required",
"errors": [
"<string>"
],
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"request_id": "req_1234567890"
}{
"error": "RATE_LIMIT_EXCEEDED",
"message": "API rate limit exceeded. Please try again later.",
"timestamp": "2025-01-15T12:30:00Z",
"request_id": "req_1234567890"
}{
"error": "INTERNAL_ERROR",
"message": "An unexpected error occurred",
"errors": [
"An unexpected error occurred: Database connection failed"
],
"timestamp": "2025-01-15T12:30:00Z",
"request_id": "req_1234567890"
}Get competitor data
Retrieve comprehensive competitor analysis data including brand performance summaries, daily visibility data, top spot ownership, co-occurrence analysis, opportunity prompts, and LLM-specific performance overviews.
This endpoint provides detailed competitive intelligence for the last 90 days.
curl --request GET \
--url https://api.trakkr.ai/get-competitor-data \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.trakkr.ai/get-competitor-data', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trakkr.ai/get-competitor-data"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"brand_performance_summary": [
{
"brand_name": "Acme Corporation",
"total_mentions_overall": 150,
"overall_avg_score": 85.5,
"overall_avg_rank": "2.3",
"overall_rank_distribution": [
{
"bucket": "Rank 1",
"percentage": 25.5,
"count": 45
},
{
"bucket": "Ranks 2-3",
"percentage": 35.2,
"count": 62
}
],
"llm_specific_performance_list": [
{
"llm_name": "OpenAI",
"total_mentions": 75,
"avg_score": 88.2,
"avg_rank": "1.8",
"rank_distribution": [
{
"bucket": "Rank 1",
"percentage": 30,
"count": 25
}
]
}
]
},
{
"brand_name": "Competitor A",
"total_mentions_overall": 120,
"overall_avg_score": 78.3,
"overall_avg_rank": "3.1",
"overall_rank_distribution": [
{
"bucket": "Rank 1",
"percentage": 15,
"count": 18
}
],
"llm_specific_performance_list": [
{
"llm_name": "OpenAI",
"total_mentions": 60,
"avg_score": 82.1,
"avg_rank": "2.5"
}
]
}
],
"daily_visibility_data": [
{
"date": "2025-01-15",
"prompts_data": [
{
"prompt_text": "What are the best CRM platforms?",
"llm_breakdown": [
{
"llm_name": "OpenAI",
"visibility_scores": [
{
"brand_name": "Acme Corporation",
"avg_score": 88.5,
"avg_rank": "1.8",
"mention_count": 15,
"date": "2025-01-15"
}
]
}
]
}
]
}
],
"top_spot_ownership": [
{
"prompt_text": "What are the best CRM platforms?",
"top_brand": "Acme Corporation",
"count_of_rank_1_for_top_brand": 25,
"all_rank_1_counts_list": [
{
"brand_name": "Acme Corporation",
"count": 25
},
{
"brand_name": "Competitor A",
"count": 18
}
]
}
],
"primary_brand_cooccurrences": [
{
"competitor_name": "Competitor A",
"cooccurrence_count": 45,
"cooccurrence_rate_percent": 75.5,
"primary_brand_position_above_rate_percent": 60
}
],
"opportunity_prompts": [
{
"prompt_text": "What are the best email marketing tools?",
"primary_brand_rank_info": "Not Ranked",
"highly_ranked_competitors": [
"Mailchimp",
"Constant Contact"
]
}
],
"llm_performance_overview": [
{
"llm_name": "OpenAI",
"primary_brand_metrics": {
"brand_name": "Acme Corporation",
"avg_rank": "1.8",
"avg_score": 88.2,
"total_mentions": 75
},
"competitor_metrics": [
{
"brand_name": "Competitor A",
"avg_rank": "2.5",
"avg_score": 82.1,
"total_mentions": 60
}
]
}
]
}{
"error": "INVALID_PARAMETER",
"timestamp": "2025-01-15T12:30:00Z",
"message": "The 'brand' parameter is required",
"errors": [
"<string>"
],
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"request_id": "req_1234567890"
}{
"error": "UNAUTHORIZED",
"message": "Missing API key",
"errors": [
"API key must be provided in the Authorization header as 'Bearer <api_key>'"
],
"timestamp": "2025-01-15T12:30:00Z",
"request_id": "req_1234567890"
}{
"error": "FORBIDDEN",
"message": "Invalid API key",
"errors": [
"No accounts found for this API key"
],
"timestamp": "2025-01-15T12:30:00Z",
"request_id": "req_1234567890"
}{
"error": "INVALID_PARAMETER",
"timestamp": "2025-01-15T12:30:00Z",
"message": "The 'brand' parameter is required",
"errors": [
"<string>"
],
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"request_id": "req_1234567890"
}{
"error": "RATE_LIMIT_EXCEEDED",
"message": "API rate limit exceeded. Please try again later.",
"timestamp": "2025-01-15T12:30:00Z",
"request_id": "req_1234567890"
}{
"error": "INTERNAL_ERROR",
"message": "An unexpected error occurred",
"errors": [
"An unexpected error occurred: Database connection failed"
],
"timestamp": "2025-01-15T12:30:00Z",
"request_id": "req_1234567890"
}Authorizations
API key authentication. Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Query Parameters
The brand ID (32-character hexadecimal string)
32^[0-9a-fx]{32}$Response
Successful response
Summary of performance for all brands (primary + competitors)
Show child attributes
Show child attributes
Daily visibility data organized by date and prompt
Show child attributes
Show child attributes
Analysis of which brands own the top spot for each prompt
Show child attributes
Show child attributes
Co-occurrence analysis between primary brand and competitors
Show child attributes
Show child attributes
Prompts where competitors rank highly but primary brand doesn't
Show child attributes
Show child attributes
Performance comparison across different LLMs
Show child attributes
Show child attributes
Was this page helpful?