API Reference
Targeting
The Targeting API controls how Outfame finds and engages your target audience. Configure targeting sources, apply demographic filters, and use AI suggestions to refine audience quality.
Scopes required —
targeting:writefor mutations,accounts:readfor retrieving configuration.
The TargetingConfig object
{
"account_id": "acc_7Gx2kLm9Qr",
"competitor_accounts": ["competitor1", "competitor2", "competitor3"],
"hashtags": ["fitness", "healthylifestyle", "nutrition", "workout"],
"locations": [
{ "name": "Los Angeles, CA", "radius_km": 50 },
{ "name": "New York, NY", "radius_km": 30 }
],
"interests": ["health", "wellness", "gym", "yoga"],
"filters": {
"age_range": { "min": 18, "max": 44 },
"gender": "all",
"language": "en",
"activity_level": "high",
"min_followers": 100,
"max_followers": 50000,
"min_engagement_rate": 1.5,
"has_profile_picture": true,
"is_business_account": null,
"exclude_private": true
},
"ai_optimization": {
"enabled": true,
"mode": "balanced",
"quality_threshold": 0.7
},
"updated_at": "2026-02-09T11:45:22Z"
}Targeting sources
| Source | Type | Description |
|---|---|---|
competitor_accounts | string[] | Instagram/TikTok handles whose followers match your target audience. Max 20. |
hashtags | string[] | Hashtags your ideal followers use or follow. Max 30. |
locations | object[] | Geographic areas. Each with name (city/region) and radius_km (1-200). Max 10. |
interests | string[] | Interest categories from Outfame's taxonomy. Max 15. |
Filter options
| Filter | Type | Default | Description |
|---|---|---|---|
age_range | object | { min: 13, max: 65 } | Estimated age range of target users. |
gender | string | all | all, male, or female. |
language | string | null | ISO 639-1 language code. null targets all languages. |
activity_level | string | medium | low, medium, high, or very_high. Based on posting frequency and engagement. |
min_followers | integer | 0 | Minimum follower count for target users. |
max_followers | integer | null | Maximum follower count. null for no limit. |
min_engagement_rate | float | 0 | Minimum engagement rate percentage. |
has_profile_picture | boolean | true | Exclude users without profile pictures (likely inactive or bot accounts). |
exclude_private | boolean | false | Skip private accounts. |
Get targeting configuration
GET /v1/targeting/config?account_id=acc_7Gx2kLm9QrRequest
curl https://api.outfame.com/v1/targeting/config?account_id=acc_7Gx2kLm9Qr \
-H "Authorization: Bearer sk_live_your_api_key"Returns the full TargetingConfig object for the specified account.
Update targeting configuration
PUT /v1/targeting/configReplaces the entire targeting configuration for an account. Any fields not included will be reset to defaults. Use this for full reconfiguration. For partial updates, use PATCH /v1/accounts/:id with a targeting_config object.
Request
curl -X PUT https://api.outfame.com/v1/targeting/config \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"account_id": "acc_7Gx2kLm9Qr",
"competitor_accounts": ["newcompetitor1", "newcompetitor2"],
"hashtags": ["travel", "digitalnomad", "remotework"],
"locations": [
{ "name": "Bali, Indonesia", "radius_km": 100 }
],
"interests": ["travel", "remote work", "entrepreneurship"],
"filters": {
"age_range": { "min": 22, "max": 38 },
"language": "en",
"activity_level": "high",
"min_engagement_rate": 2.0
},
"ai_optimization": {
"enabled": true,
"mode": "aggressive",
"quality_threshold": 0.8
}
}'Response 200 OK
Returns the updated TargetingConfig object.
AI targeting suggestions
POST /v1/targeting/suggestionsAnalyzes your account's audience, content, and engagement patterns to generate targeting recommendations. The model uses growth data from 65,000+ accounts to score suggestions.
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
account_id | string | Yes | The account to generate suggestions for. |
goal | string | No | growth (maximize followers), engagement (maximize engagement rate), or balanced (default). |
include_reasoning | boolean | No | Return explanations for each suggestion. Default: false. |
Request
curl -X POST https://api.outfame.com/v1/targeting/suggestions \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"account_id": "acc_7Gx2kLm9Qr",
"goal": "balanced",
"include_reasoning": true
}'Response
{
"account_id": "acc_7Gx2kLm9Qr",
"suggestions": {
"add_competitors": [
{
"username": "suggested_rival",
"relevance_score": 0.94,
"audience_overlap": 0.32,
"reasoning": "High audience overlap with your existing followers. Their followers have 3.2x higher engagement rate than average."
}
],
"add_hashtags": [
{
"tag": "fitnessmotivation",
"relevance_score": 0.89,
"monthly_volume": 2400000,
"reasoning": "Frequently used by your most engaged followers. Medium competition with strong conversion potential."
}
],
"adjust_filters": [
{
"filter": "activity_level",
"current": "medium",
"recommended": "high",
"impact_estimate": "+15% engagement rate",
"reasoning": "Your best-converting followers have high activity levels. Narrowing this filter will improve audience quality."
}
],
"remove_suggestions": [
{
"type": "hashtag",
"value": "followforfollow",
"reasoning": "Low-quality audience. Users from this hashtag have 80% higher unfollow rate."
}
]
},
"estimated_impact": {
"growth_rate_change": "+23%",
"engagement_rate_change": "+0.8%",
"audience_quality_change": "+12%"
},
"confidence": 0.87,
"generated_at": "2026-02-09T14:30:00Z"
}AI optimization modes
| Mode | Description | Best for |
|---|---|---|
conservative | Minimal AI adjustments. Sticks closely to your manual configuration. | Accounts with very specific, curated audiences. |
balanced | AI refines targeting within your defined parameters. Default mode. | Most accounts. Good balance of growth and quality. |
aggressive | AI actively explores new audience segments and adjusts filters for maximum growth. | New accounts or accounts looking to scale quickly. |
Error codes
| Status | Code | Description |
|---|---|---|
400 | too_many_competitors | Maximum 20 competitor accounts allowed. |
400 | too_many_hashtags | Maximum 30 hashtags allowed. |
400 | invalid_location | Location could not be resolved. Provide a valid city, region, or country name. |
400 | invalid_radius | Radius must be between 1 and 200 km. |
422 | insufficient_data | Account has insufficient data for AI suggestions. Requires at least 7 days of activity. |