Embeddable Widget
Add Trump Golf Stats to Your Website
Journalists, bloggers, and website owners can embed our Trump golf tracker on their sites for free. The widget pulls live data from our API and displays current statistics with attribution.
Widget Preview
Embed Code
Copy and paste this code anywhere in your HTML:
<!-- Trump Golf Tracker Widget -->
<div id="trump-golf-widget"></div>
<script>
(function() {
fetch('https://istrumpgolfing.today/api/stats')
.then(res => res.json())
.then(data => {
const widget = document.getElementById('trump-golf-widget');
widget.innerHTML = `
<div style="border: 2px solid #ffa500; border-radius: 10px; padding: 20px; max-width: 400px; font-family: Arial, sans-serif; background: #1a1a1a; color: #fff;">
<h3 style="margin: 0 0 15px 0; color: #ffa500; font-size: 1.3rem;">Trump Golf Tracker</h3>
<p style="margin: 10px 0; font-size: 1.1rem;">
<strong>${data.totalGolfDays}</strong> golf days (${data.percentageGolfed}%)
</p>
<p style="margin: 10px 0; color: #ccc;">
Estimated cost: <strong style="color: #ffa500;">~$${data.estimatedTotalCost.toLocaleString()}</strong>
</p>
<p style="margin: 15px 0 0 0; font-size: 0.85rem;">
<a href="https://istrumpgolfing.today" target="_blank" style="color: #ffa500; text-decoration: none;">
View full tracker →
</a>
</p>
</div>
`;
})
.catch(err => console.error('Trump Golf Widget Error:', err));
})();
</script>Using Our API
For more advanced integrations, you can use our public JSON API:
GET https://istrumpgolfing.today/api/statsAPI Response Format
{
"termStart": "2025-01-20",
"currentDate": "2025-11-09",
"daysSinceStart": 293,
"totalGolfDays": 0,
"percentageGolfed": "0.0",
"estimatedTotalCost": 0,
"golfDaysByLocation": {},
"recentGolfDays": [],
"metadata": {
"dataVersion": "2.0",
"lastUpdated": "2025-11-09T...",
"attribution": "Is Trump Golfing Today?",
"website": "https://istrumpgolfing.today"
}
}Terms of Use
- Free to use: No API key or registration required
- Attribution required: Keep the "View full tracker" link in the widget
- No modifications: Don't alter the data or misrepresent its source
- Rate limits: API responses are cached for 1 hour. Please don't hammer our servers
- No warranty: Data provided as-is. Verify important information independently
Support & Questions
For technical support, custom integrations, or questions, email us at [email protected]