This guide walks you through a complete workflow for discovering creators, fetching their data, and analyzing their content and audience.
Step 1: Find a Creator Profile
Start by fetching a creator’s profile using their platform-specific ID:
// Fetch a Twitch creator profile
const profile = await fetch(
'/platforms/twitch/profiles/484563826',
{
headers: { 'x-api-key': 'YOUR_API_KEY' }
}
).then(r => r.json());
console.log(profile.payload.display_name); // "Streamer 123"
console.log(profile.payload.statistics.followers); // 120000
The profile response includes essential information:
{
"payload": {
"platform_id": "twitch",
"id": "484563826",
"name": "streamer123",
"display_name": "Streamer 123",
"url": "https://twitch.tv/streamer123",
"description": "Twitch streamer",
"profile_image": "https://...",
"banner_image": "https://...",
"language": "en",
"statistics": {
"followers": 120000,
"views_estimated": 4500000
},
"is_partner": false,
"is_affiliate": true,
"is_mature": false,
"updated_at": "2024-07-04T12:00:00.000Z",
"last_active_at": "2024-07-04T10:00:00.000Z"
}
}
Key fields:
statistics: Follower counts, view counts (YouTube) or estimated views (Twitch)
statistics.views_estimated: Estimated total views for Twitch profiles (calculated using our algorithms)
is_partner, is_affiliate, is_mature: Twitch-specific status flags
last_active_at: When the creator last posted content
updated_at: When the profile data was last refreshed
Step 3: Fetch Creator Content
Get recent content from the creator:
// List content by creator
const content = await fetch(
'/platforms/twitch/profiles/484563826/content?limit=10',
{
headers: { 'x-api-key': 'YOUR_API_KEY' }
}
).then(r => r.json());
content.payload.forEach(item => {
console.log(`${item.title}: ${item.statistics.views?.sum || 0} views`);
});
Step 4: Analyze Content Statistics
Content items include detailed statistics:
{
"id": "987654321",
"title": "Awesome Stream",
"type": "stream",
"statistics": {
"viewers": {
"avg": 2345.6,
"max": 6789
},
"watched_minutes": {
"sum": 123456
},
"views": {
"sum": 45678
},
"comments": {
"sum": 900
}
}
}
Statistics to analyze:
statistics.views.sum: Total views
statistics.viewers.avg: Average concurrent viewers
statistics.watched_minutes.sum: Total watch time
Step 5: Get Creator Analysis
For deeper analysis, fetch creator analysis (costs 100 quota units):
const analysis = await fetch(
'/platforms/twitch/profiles/484563826/analysis',
{
headers: { 'x-api-key': 'YOUR_API_KEY' }
}
).then(r => r.json());
// AI-enriched data
console.log(analysis.payload.age_range); // "25-34"
console.log(analysis.payload.primary_language); // "es"
console.log(analysis.payload.interests); // Array of interests
Step 6: Analyze Audience
Get detailed audience demographics (costs 100 quota units):
const audience = await fetch(
'/platforms/twitch/profiles/484563826/audience',
{
headers: { 'x-api-key': 'YOUR_API_KEY' }
}
).then(r => r.json());
// Demographics
console.log(audience.payload.gender_distribution);
console.log(audience.payload.age_ranges);
console.log(audience.payload.countries);
// Brand safety
console.log(audience.payload.brand_safety.overall_risk_level);
console.log(audience.payload.community_health);
Use socials data to find the same creator on other platforms (costs 10 quota units):
const socials = await fetch(
'/platforms/twitch/profiles/484563826/socials',
{
headers: { 'x-api-key': 'YOUR_API_KEY' }
}
).then(r => r.json());
// Find creator on other platforms
const socialProfiles = socials.payload;
socialProfiles.forEach(profile => {
console.log(`${profile.platform_id}: ${profile.id} (${profile.followers} followers)`);
});
Complete Example Workflow
async function analyzeCreator(platform, profileId) {
// 1. Get profile
const profile = await fetchProfile(platform, profileId);
// 2. Get recent content
const content = await fetchContent(platform, profileId, 10);
// 3. Calculate content metrics
const totalViews = content.payload.reduce(
(sum, item) => sum + (item.statistics?.views?.sum || 0),
0
);
// 4. Get advanced insights (if needed)
const advanced = await fetchAdvanced(platform, profileId);
// 5. Get audience analysis (if needed)
const audience = await fetchAudience(platform, profileId);
return {
profile: profile.payload,
contentStats: {
totalItems: content.payload.length,
totalViews
},
insights: advanced.payload.analysis,
audience: audience.payload
};
}
Use Cases
Brand Partnership Discovery
// Find creators matching brand criteria
async function findBrandPartners(criteria) {
// 1. Search or filter creators
// 2. Fetch profiles
// 3. Get audience analysis
// 4. Check brand safety metrics
// 5. Evaluate community health
}
Content Performance Analysis
// Analyze creator's content performance
async function analyzeContentPerformance(platform, profileId) {
// 1. Fetch all content (paginate)
// 2. Calculate average views
// 3. Identify top-performing content
// 4. Analyze trends over time
}
// Find creators with presence on multiple platforms
async function findMultiPlatformCreators(twitchProfileId) {
// 1. Get advanced insights
// 2. Extract social profiles
// 3. Fetch profiles from other platforms
// 4. Compare metrics across platforms
}
Best Practices
Start with basic profile data before fetching expensive advanced insights. Only use advanced/audience endpoints when needed.
- Cache profile data: Profile data doesn’t change frequently; cache it
- Paginate content: Use cursor pagination to fetch all content efficiently
- Batch operations: Use bulk endpoints when fetching multiple creators
- Monitor quota: Advanced endpoints cost 100 quota units each
- Handle missing data: Some creators may not have advanced insights available
Quota Considerations
| Operation | Quota Cost |
|---|
| Get profile | 1 unit |
| List content (10 items) | 10 units |
| Get advanced insights | 100 units |
| Get audience analysis | 100 units |
Total for full analysis: ~212 quota units per creator
Consider caching advanced insights since they’re expensive and don’t change frequently.