Integrate MarketBot's AI-powered marketing capabilities into your applications with our comprehensive REST API.
MarketBot provides a RESTful API that allows you to programmatically access all our AI-powered marketing features.
All API requests require authentication using session cookies or API keys.
All endpoints are relative to your MarketBot instance base URL.
All API responses are returned in JSON format with consistent structure.
Complete reference for all available API endpoints.
/api/domainsdomain_urlThe domain URL to analyze
industryIndustry category
target_audienceTarget audience description
/api/domains/api/domains/[id]idDomain ID
/api/domains/[id]/analysisidDomain ID
/api/domains/[id]/analysisidDomain ID
/api/campaigns/api/campaignstitleCampaign title
contentCampaign content
platformTarget platform
/api/campaignsidCampaign ID
statusNew status
/api/payments/historyPractical examples showing how to use the MarketBot API.
const response = await fetch('/api/domains', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
credentials: 'include',
body: JSON.stringify({
domain_url: 'https://example.com',
industry: 'Technology',
target_audience: 'Developers and tech professionals'
})
});
const domain = await response.json();
console.log('Domain created:', domain);const response = await fetch('/api/domains/123/analysis', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
credentials: 'include'
});
const result = await response.json();
console.log('Analysis started:', result);const response = await fetch('/api/domains/123/analysis', {
method: 'GET',
headers: {
'Content-Type': 'application/json',
},
credentials: 'include'
});
const analysis = await response.json();
console.log('Analysis results:', analysis);Sample API responses to help you understand the data structure.
{
"success": true,
"analysis": {
"semrush_data": {
"domain_authority": 45,
"monthly_visitors": 12500,
"organic_keywords": 234,
"backlinks": 1567
},
"pagespeed_data": {
"mobile_score": 85,
"desktop_score": 92,
"core_web_vitals": {
"lcp": 2.1,
"fid": 0.8,
"cls": 0.05
}
},
"analysis": {
"summary": "Strong technical foundation with room for content improvement",
"strengths": ["Fast loading times", "Good mobile optimization"],
"weaknesses": ["Limited content depth", "Missing meta descriptions"],
"fixes": ["Add more detailed content", "Optimize meta tags"]
},
"marketing_goals": [
"Increase organic traffic by 25%",
"Improve keyword rankings",
"Enhance user engagement"
],
"action_calendar": [
{
"task_name": "Create SEO-optimized blog post",
"description": "Write comprehensive article about industry trends",
"date": "2025-01-15",
"priority": "high",
"category": "content"
}
]
}
}Understanding how to handle API errors and status codes.
Start building with MarketBot's API today. Get access to AI-powered marketing capabilities in your applications.