Authentication
The Trinity Data Feed API uses Bearer token authentication. Include your API key in the Authorization header of every request.
Getting Your API Key
API keys are provisioned upon subscription. You'll receive yours via email within 5 minutes of activation. Keep your API key secure—treat it like a password.
Making Authenticated Requests
Include the Authorization header with every API call:
Copy
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.trinitydata.io/v1/health
Replace YOUR_API_KEY with your actual API key provided in your subscription confirmation email.
Rate Limits by Tier
Rate limit information is returned in response headers:
Copy
X-RateLimit-Limit: 10000
X-RateLimit-Remaining: 9950
X-RateLimit-Reset: 1712870400
Real-Time Sentiment Analysis
Get AI-powered sentiment analysis for any ticker symbol, brand, or topic. Composite scoring, confidence metrics, and platform-level breakdowns for nuanced market intelligence.
Parameters
| Parameter |
Type |
Required |
Description |
query |
string |
Yes |
Stock ticker (e.g., NVDA, BTC) or topic name |
platforms |
string |
No |
Comma-separated list: twitter, reddit, tiktok, youtube. Default: all |
Example Request
Copy
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.trinitydata.io/v1/sentiment?query=NVIDIA&platforms=twitter,reddit"
Example Response
Copy
{
"query": "NVIDIA",
"composite_score": 0.72,
"confidence": 0.94,
"trending_direction": "up",
"platform_breakdown": [
{
"platform": "twitter",
"score": 0.75,
"sample_size": 8432
}
]
}
Response Fields
| Field |
Type |
Description |
query |
string |
The query that was analyzed |
composite_score |
number |
Weighted sentiment (-1.0 to 1.0, where 1.0 is most positive) |
confidence |
number |
Model confidence (0.0 to 1.0) |
trending_direction |
string |
Sentiment momentum: up, down, or stable |
platform_breakdown |
array |
Per-platform sentiment scores |
Competitive Intelligence
Track share of voice, sentiment, and mention volume across your brand and competitors. Perfect for marketing strategy, competitive positioning, and brand health monitoring.
Parameters
| Parameter |
Type |
Required |
Description |
brand |
string |
Yes |
Your brand or company name |
competitors |
string |
No |
Comma-separated list of competitor names (e.g., "Apple,Microsoft") |
Example Request
Copy
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.trinitydata.io/v1/competitive-intel?brand=Tesla&competitors=Ford,GM"
Example Response
Copy
{
"brand": "Tesla",
"share_of_voice": 48.3,
"sentiment": 0.68,
"competitor_comparison": [
{
"name": "Ford",
"mentions": 23450,
"sentiment": 0.42,
"share": 28.5
}
]
}
Response Fields
| Field |
Type |
Description |
brand |
string |
Your brand name |
share_of_voice |
number |
Percentage of total mentions vs competitors |
sentiment |
number |
Brand sentiment score (-1.0 to 1.0) |
competitor_comparison |
array |
Competitive metrics for each competitor |
Content Opportunity Research
Identify high-potential content topics, recommended formats, and keyword opportunities. Data-driven insights for content strategy and SEO planning.
Parameters
| Parameter |
Type |
Required |
Description |
topic |
string |
Yes |
Content topic or keyword to research |
platform |
string |
No |
Filter by platform: twitter, youtube, tiktok, blog. Default: all |
Example Request
Copy
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.trinitydata.io/v1/content-research?topic=AI+productivity&platform=youtube"
Example Response
Copy
{
"opportunities": [
{
"title": "Top AI Tools for 2026",
"platform": "youtube",
"search_volume": 42000,
"competition": "high",
"engagement_potential": 8.7,
"recommended_format": "video_tutorial",
"keywords": ["AI tools", "productivity"]
}
]
}
Response Fields
| Field |
Type |
Description |
title |
string |
Suggested content title |
platform |
string |
Recommended platform for this content |
search_volume |
integer |
Estimated monthly search volume |
competition |
string |
Competitive level: low, medium, high |
engagement_potential |
number |
Expected engagement score (0-10 scale) |
recommended_format |
string |
Best format: blog_post, video_tutorial, infographic, etc. |
keywords |
array |
High-value keywords to target |
Error Codes & Handling
The Trinity Data Feed API uses standard HTTP status codes. Here's how to handle common errors:
200 OK
Request successful. Data is in the response body.
400 Bad Request
Invalid parameters or malformed request. Check query string and body.
401 Unauthorized
Missing or invalid API key. Verify your Authorization header.
403 Forbidden
API key is valid but doesn't have access to this endpoint. Check your subscription tier.
429 Too Many Requests
Rate limit exceeded. Wait before retrying. Check X-RateLimit-Reset header.
500 Server Error
Internal server error. We've been notified. Try again in a few minutes.
Error Response Format
When an error occurs, the response includes an error object:
Copy
{
"error": {
"code": "INVALID_PARAMETER",
"message": "Required parameter 'query' is missing",
"status": 400
}
}
Client Libraries
We're building first-class SDKs to make integration even faster. Coming soon to your favorite language:
Official SDKs — Coming Soon
Python
Copy
from trinity import DataFeed
feed = DataFeed(api_key="YOUR_API_KEY")
# Fetch trending topics
trends = feed.trends(platform="twitter", limit=10)
# Get sentiment
sentiment = feed.sentiment(query="NVIDIA")
# Market pulse
pulse = feed.market_pulse(tickers=["NVDA", "TSLA"])
Node.js
Copy
const { DataFeed } = require('trinity-data-feed');
const feed = new DataFeed({ apiKey: 'YOUR_API_KEY' });
// Fetch trends
const trends = await feed.trends({ platform: 'twitter', limit: 10 });
// Get sentiment
const sentiment = await feed.sentiment({ query: 'NVIDIA' });
// Market pulse
const pulse = await feed.marketPulse({ tickers: ['NVDA', 'TSLA'] });
Go
Copy
import "github.com/trinity/data-feed"
client := datafeed.NewClient("YOUR_API_KEY")
// Fetch trends
trends, err := client.Trends(ctx, &datafeed.TrendsOptions{
Platform: "twitter",
Limit: 10,
})
// Get sentiment
sentiment, err := client.Sentiment(ctx, "NVIDIA")
SDKs are in active development. Join our developer community for updates and beta access.