-
Notifications
You must be signed in to change notification settings - Fork 0
Keywords
Endpoint: POST /api/v1/keywords/budget/estimate
Purpose: Generate comprehensive budget estimates for organic keywords based on SEMrush data analysis. Budgets are calculated using incremental traffic opportunity - the cost of improving from a keyword's current search position to position #1.
Authentication: Required - Bearer Token (JWT)
Base URL: https://uat.services.semify.com/api/v1/keywords/budget/estimate or https://services.semify.com/api/v1/keywords/budget/estimate
| Field | Type | Description |
|---|---|---|
url |
string | Client business domain URL to analyze (e.g., "https://www.example.com") |
| Field | Type | Default | Description |
|---|---|---|---|
categories |
array | [] |
Business categories for filtering (array of strings) |
seeds |
array | [] |
Seed keywords for analysis (array of strings) |
market |
string | "us" |
Country/locale code (e.g., "us", "uk", "ca") |
language |
string | "en" |
Language code (e.g., "en", "es", "fr") |
max_keywords |
integer | 50 |
Maximum number of keywords to return (1-50) |
{
"url": "https://www.example.com",
"categories": ["digital marketing", "seo services"],
"seeds": ["best seo", "digital marketing agency"],
"market": "us",
"language": "en",
"max_keywords": 25
}{
"data": {
"url": "https://www.example.com",
"market": "us",
"language": "en",
"total_keywords": 5,
"keywords": [
{
"keyword": "duct cleaning near me",
"monthly_searches": "60500",
"cpc": "9.93",
"position": "24",
"previous_position": "24",
"position_difference": "0",
"url": "https://www.example.com/residential/duct-cleaning/",
"traffic": "28.37",
"traffic_cost": "47.17",
"competition": "0.680",
"number_of_results": "41500000",
"monthly_trends": ["0.24", "0.20", "0.16", "0.11", "0.67", "0.67", "0.82", "0.55", "0.67", "0.82", "1.00", "1.00"],
"current_trend": 1.0,
"trend_summary": {
"direction": "accelerating",
"strength": "Very High",
"category": "exploding",
"description": "Explosive growth - high opportunity",
"average_trend": 0.5758333333333333,
"trend_strength": 0.89,
"peak_month": 1.0,
"lowest_month": 0.11
},
"budget_estimate": {
"monthly_budget": "400.00",
"quarterly_budget": "1200.00",
"yearly_budget": "4800.00",
"cost_per_acquisition": "0.03",
"value_score": 5,
"value_description": "Premium Value",
"recommendation": "Premium opportunity - high budget with strong upward trend",
"incremental_traffic_metrics": {
"current_traffic": "338.80",
"position_1_traffic_opportunity": "13818.20",
"incremental_traffic_opportunity": "13479.40",
"incremental_traffic_cost": "133850.44",
"current_position_ctr": "0.56%",
"position_1_ctr": "22.84%"
}
}
}
],
"estimated_budget": {
"total_keywords": 5,
"total_monthly_searches": "60830",
"average_cpc": "9.29",
"total_traffic_cost": "60.73",
"estimated_monthly_budget": "21.26",
"estimated_quarterly_budget": "63.77",
"estimated_yearly_budget": "255.07",
"average_competition": "0.484"
},
"debug_info": {}
},
"messages": [
"Budget estimate generated successfully."
],
"pagination": {
"totalPages": 1,
"maxRows": 0,
"offset": 0,
"page": 1,
"totalRecords": 5
},
"error": false
}The budget calculation determines the monthly budget needed to optimize a keyword from its current search position to position #1. The calculation is based on incremental traffic opportunity and does NOT use trend multipliers.
- Incremental Traffic Opportunity: The budget represents the cost of gaining additional traffic by moving from current position to position #1
- Position-Based CTR: Uses industry-standard click-through rates (CTR) based on search position
- No Trend Multipliers: Trend data is used for recommendations only, not budget calculations
- Constraint-Based: All budgets are bounded by minimum ($25) and maximum ($400) limits
constrained_monthly_searches = max(25, monthly_searches)
constrained_cpc = max(2.75, min(60.00, cpc))Constraints:
- Minimum monthly searches: 25
- Minimum CPC: $2.75
- Maximum CPC: $60.00
CTR values are retrieved from position-based lookup table:
current_position_ctr = CTR[current_position]
position_1_ctr = CTR[1] = 0.2284 // Always 22.84%Key CTR Values:
| Position | CTR (%) | Decimal Value |
|---|---|---|
| 1 | 22.84% | 0.2284 |
| 2 | 13.71% | 0.1371 |
| 3 | 9.55% | 0.0955 |
| 4 | 6.71% | 0.0671 |
| 5 | 5.35% | 0.0535 |
| 10 | 3.19% | 0.0319 |
| 20 | 2.70% | 0.0270 |
| 30 | 0.56% | 0.0056 |
| 50 | 0.0224% | 0.000224 |
| 100 | 0.0001% | 0.0000001 |
| 999 (outside top 100) | 0% | 0.0 |
Current traffic = clicks currently received at the keyword's position:
current_traffic = constrained_monthly_searches × current_position_ctrExample:
- Monthly searches: 1,200
- Position: 5 (CTR: 5.35%)
- Current traffic = 1,200 × 0.0535 = 64.2 clicks/month
Traffic opportunity if ranking at position #1:
position_1_traffic_opportunity = constrained_monthly_searches × position_1_ctrExample:
- Monthly searches: 1,200
- Position 1 CTR: 22.84%
- Position 1 opportunity = 1,200 × 0.2284 = 274.08 clicks/month
The additional clicks gained by moving from current position to position #1:
incremental_traffic_opportunity = position_1_traffic_opportunity - current_trafficExample:
- Position 1 opportunity: 274.08 clicks/month
- Current traffic: 64.2 clicks/month
- Incremental opportunity = 274.08 - 64.2 = 209.88 clicks/month
Note: If result is negative, it's set to 0 (shouldn't happen since position 1 has highest CTR).
This is the core budget calculation - the cost of the incremental traffic:
incremental_traffic_cost = incremental_traffic_opportunity × constrained_cpcExample:
- Incremental opportunity: 209.88 clicks/month
- CPC: $3.45
- Incremental traffic cost = 209.88 × $3.45 = $724.09/month
Apply minimum and maximum budget limits:
final_monthly_budget = max(25.00, min(400.00, incremental_traffic_cost))Constraints:
- Minimum budget: $25.00
- Maximum budget: $400.00
Example:
- Base budget: $724.09
- After constraints: min($400, max($25, $724.09)) = $400.00/month
Simple multipliers:
quarterly_budget = monthly_budget × 3
yearly_budget = monthly_budget × 12Example:
- Monthly: $400.00
- Quarterly: $400.00 × 3 = $1,200.00
- Yearly: $400.00 × 12 = $4,800.00
Cost per incremental click/acquisition:
if (incremental_traffic_opportunity > 0) {
cost_per_acquisition = final_monthly_budget / incremental_traffic_opportunity
} else {
cost_per_acquisition = final_monthly_budget / monthly_searches
}Example:
- Final monthly budget: $400.00
- Incremental opportunity: 209.88 clicks
- CPA = $400.00 / 209.88 = $1.91 per click
- Monthly Searches: 1,200
- CPC: $3.45
- Current Position: 5
-
Apply Constraints:
- Constrained searches: 1,200 ✓
- Constrained CPC: $3.45 ✓
-
Get CTR Values:
- Current position (5) CTR: 5.35% (0.0535)
- Position 1 CTR: 22.84% (0.2284)
-
Calculate Traffic:
- Current traffic = 1,200 × 0.0535 = 64.2 clicks/month
- Position 1 opportunity = 1,200 × 0.2284 = 274.08 clicks/month
-
Calculate Incremental:
- Incremental opportunity = 274.08 - 64.2 = 209.88 clicks/month
-
Calculate Base Budget:
- Base budget = 209.88 × $3.45 = $724.09/month
-
Apply Constraints:
- Final budget = min($400, max($25, $724.09)) = $400.00/month
-
Calculate Extended Budgets:
- Quarterly = $400.00 × 3 = $1,200.00
- Yearly = $400.00 × 12 = $4,800.00
-
Calculate CPA:
- CPA = $400.00 / 209.88 = $1.91 per click
{
"monthly_budget": "400.00",
"quarterly_budget": "1,200.00",
"yearly_budget": "4,800.00",
"cost_per_acquisition": "1.91",
"incremental_traffic_metrics": {
"current_traffic": "64.20",
"position_1_traffic_opportunity": "274.08",
"incremental_traffic_opportunity": "209.88",
"incremental_traffic_cost": "724.09",
"current_position_ctr": "5.35%",
"position_1_ctr": "22.84%"
}
}| Field | Type | Description |
|---|---|---|
data |
object | Response data object |
messages |
array | Array of status messages |
pagination |
object | Pagination information |
error |
boolean | Error flag (false on success) |
| Field | Type | Description |
|---|---|---|
url |
string | Requested URL |
market |
string | Market/locale code used |
language |
string | Language code used |
total_keywords |
integer | Total number of keywords returned |
keywords |
array | Array of keyword objects |
estimated_budget |
object | Summary budget estimates |
debug_info |
object | Debug information (empty if no errors) |
| Field | Type | Description |
|---|---|---|
keyword |
string | The keyword phrase |
monthly_searches |
string | Monthly search volume |
cpc |
string | Cost per click |
position |
string | Current search position (1-100, or "999" for outside top 100) |
previous_position |
string | Previous search position |
position_difference |
string | Change in position |
url |
string | Landing page URL |
traffic |
string | Current traffic estimate |
traffic_cost |
string | Traffic cost estimate |
competition |
string | Competition level (0.0-1.0) |
number_of_results |
string | Total search results |
monthly_trends |
array | Array of 12 monthly trend values |
current_trend |
number | Most recent trend value |
trend_summary |
object | Trend analysis summary |
budget_estimate |
object | Budget calculation results |
| Field | Type | Description |
|---|---|---|
monthly_budget |
string | Monthly budget (formatted to 2 decimals) |
quarterly_budget |
string | Quarterly budget (monthly × 3) |
yearly_budget |
string | Yearly budget (monthly × 12) |
cost_per_acquisition |
string | Cost per incremental click |
value_score |
integer | Value score (1-5 scale) |
value_description |
string | Value description (Low Value, Budget-Friendly, Moderate Value, High Value, Premium Value) |
recommendation |
string | Budget recommendation text |
incremental_traffic_metrics |
object | Detailed incremental traffic calculations |
| Field | Type | Description |
|---|---|---|
current_traffic |
string | Current clicks/month at current position |
position_1_traffic_opportunity |
string | Potential clicks/month at position #1 |
incremental_traffic_opportunity |
string | Additional clicks available (position 1 - current) |
incremental_traffic_cost |
string | Base budget before constraints (incremental opportunity × CPC) |
current_position_ctr |
string | CTR at current position (as percentage) |
position_1_ctr |
string | CTR at position #1 (always 22.84%) |
| Field | Type | Description |
|---|---|---|
direction |
string | Trend direction (accelerating, decelerating, stable) |
strength |
string | Trend strength (Very High, High, Moderate, Low, Very Low) |
category |
string | Trend category (exploding, rising, growing, stable, declining, falling, crashing) |
description |
string | Human-readable trend description |
average_trend |
number | Average of all monthly trend values |
trend_strength |
number | Range of variation in trend values |
peak_month |
number | Highest trend value |
lowest_month |
number | Lowest trend value |
| Field | Type | Description |
|---|---|---|
total_keywords |
integer | Total number of keywords |
total_monthly_searches |
string | Sum of all monthly search volumes |
average_cpc |
string | Average CPC across all keywords |
total_traffic_cost |
string | Total traffic cost |
estimated_monthly_budget |
string | Estimated monthly budget (traffic_cost × 0.35) |
estimated_quarterly_budget |
string | Estimated quarterly budget (monthly × 3) |
estimated_yearly_budget |
string | Estimated yearly budget (monthly × 12) |
average_competition |
string | Average competition level |
Keywords are assigned a value score (1-5) based on budget thresholds:
| Score | Description | Budget Range |
|---|---|---|
| 1 | Low Value | ≤ $25.00 |
| 2 | Budget-Friendly | $25.01 - $50.00 |
| 3 | Moderate Value | $50.01 - $100.00 |
| 4 | High Value | $100.01 - $199.99 |
| 5 | Premium Value | ≥ $200.00 |
Recommendations are generated based on budget tiers and trend analysis:
| Tier | Monthly Budget Range |
|---|---|
| High Budget | ≥ $300.00 |
| Medium-High Budget | $200.00 - $299.99 |
| Medium Budget | $100.00 - $199.99 |
| Low-Medium Budget | $50.00 - $99.99 |
| Low Budget | < $50.00 |
| Category | Trend Value | Multiplier (Historical - No Longer Used) |
|---|---|---|
| Strong Upward | ≥ 0.6 | 1.2 (historical) |
| Moderate Growth | ≥ 0.4 | 1.1 (historical) |
| Stable | -0.2 to 0.4 | 1.0 |
| Slight Decline | ≤ -0.2 | 0.9 (historical) |
| Strong Decline | ≤ -0.4 | 0.8 (historical) |
Note: Trend multipliers are no longer applied to budget calculations. Trend data is used only for recommendations.
- Incremental opportunity: 0
- Budget: $25.00 (minimum)
- Reason: No incremental traffic to gain
- Current CTR: 0%
- Incremental opportunity: Full position 1 opportunity
- Budget: Maximum opportunity cost (capped at $400)
- Searches < 25: Constrained to 25
- Budget: May still be calculated but will be minimal
- Budget > $400: Capped at $400
-
Incremental cost: Still calculated and shown in
incremental_traffic_metrics
- CPA calculation: Falls back to monthly searches if incremental opportunity is 0
{
"error": true,
"messages": [
"Please enter a client business domain URL."
],
"status_code": 400
}Common Causes:
- Missing required
urlfield - Invalid URL format
- Invalid parameter types
{
"error": true,
"messages": [
"Authentication required"
],
"status_code": 401
}Common Causes:
- Missing or invalid Bearer token
- Expired token
- Invalid authentication credentials
{
"error": true,
"messages": [
"The keywords budget estimate api is not available."
],
"status_code": 500
}Common Causes:
- API service unavailable
- SEMrush API errors
- Database connection issues
Always run budget estimates before creating accounts or campaigns to understand investment requirements.
Review incremental_traffic_metrics to understand:
- Current traffic potential
- Opportunity for improvement
- Cost efficiency (CPA)
Use value scores (1-5) to prioritize keywords:
- Premium Value (5): High investment, high return potential
- High Value (4): Good balance of cost and opportunity
- Budget-Friendly (2-3): Lower cost entry points
Budget recommendations provide contextual guidance:
- High budget + strong upward trend = Premium opportunity
- High budget + declining trend = Risk warning
- Low budget + high volume = Testing opportunity
All budgets are constrained between $25-$400:
- Budgets below $25 are increased to minimum
- Budgets above $400 are capped at maximum
- Check
incremental_traffic_costin metrics to see unconstrained value
While trends don't affect budget calculations, they provide valuable insights:
- Exploding/Rising trends: Growing market opportunity
- Declining trends: Market may be shrinking
- Use trends for strategic planning, not budget adjustments
Goal: Understand budget requirements for a new client's keyword portfolio.
Process:
- Submit client's website URL
- Review
estimated_budgetsummary for total investment - Analyze individual keyword budgets
- Prioritize based on value scores
- Create budget plan based on recommendations
Goal: Identify which keywords offer the best ROI.
Process:
- Run budget estimate for keyword set
- Sort by
cost_per_acquisition(lower is better) - Filter by
value_score(4-5 for high priority) - Review
incremental_traffic_opportunityfor potential impact - Focus on keywords with high opportunity and reasonable CPA
Goal: Create quarterly/annual budget projections.
Process:
- Run budget estimates for all target keywords
- Sum
monthly_budgetvalues - Multiply by 3 for quarterly, 12 for yearly
- Use
estimated_budgetsummary for quick totals - Adjust based on business priorities
CTR values are based on industry-standard search result click-through rate studies. Position 1 receives the highest CTR (22.84%), with CTR decreasing significantly for lower positions.
The incremental traffic cost approach ensures budgets reflect:
- Real opportunity: Based on actual position improvement potential
-
Transparency: All calculations visible in
incremental_traffic_metrics - Fairness: Position-based, not arbitrary multipliers
Trend data is collected and analyzed but not used in budget calculations. This ensures:
- Budgets are based on current opportunity, not historical trends
- More predictable and transparent pricing
- Focus on actual traffic potential rather than trend speculation
- API response time: Typically 2-10 seconds per request
- Rate limiting: Recommended 1-2 second delay between requests
- Token expiration: Tokens expire after 120 minutes
For additional support or questions:
- Review error messages in response for specific issues
- Verify authentication token is valid and not expired
- Ensure input data meets required format and constraints
- Removed: Trend multipliers from budget calculations
- Added: Incremental traffic metrics in response
- Enhanced: Detailed CTR and traffic calculations
- Improved: Transparent budget calculation methodology
- Used trend multipliers for budget adjustments
- Less detailed traffic metrics
- Trend-based budget modifications
Step 1: Constrain Inputs
constrained_searches = max(25, monthly_searches)
constrained_cpc = max(2.75, min(60.00, cpc))
Step 2: Get CTRs
current_ctr = CTR[current_position]
position_1_ctr = CTR[1] = 0.2284
Step 3: Calculate Traffic
current_traffic = constrained_searches × current_ctr
position_1_opportunity = constrained_searches × position_1_ctr
Step 4: Calculate Incremental
incremental_opportunity = position_1_opportunity - current_traffic
Step 5: Calculate Base Budget
base_budget = incremental_opportunity × constrained_cpc
Step 6: Apply Constraints
monthly_budget = max(25, min(400, base_budget))
Step 7: Extend Budgets
quarterly_budget = monthly_budget × 3
yearly_budget = monthly_budget × 12
Step 8: Calculate CPA
cpa = monthly_budget / incremental_opportunity
Last Updated: November 4 2025
API Version: v1
Endpoint: /api/v1/keywords/budget/estimate