02/20/2026 · 8 min read
Privacy-compliant Instagram feed on your website
Deutsche VersionDirect Instagram embeds often load third-party scripts on page view. A cleaner alternative is a server-side pipeline: fetch posts via API, process media locally, and deliver your own static feed data. This gives you stronger control over privacy, caching, and performance.
Recommended architecture
- Python script on VPS or Raspberry Pi (small STRATO VPS can be enough).
- Instagram API access with token refresh automation.
- Download media and convert images to WebP server-side.
- Create `feed.json` with caption, likes, views, permalink, timestamp, media URL.
- Upload files via FTP using a dedicated user with limited permissions.
- Website reads JSON dynamically and renders feed cards without direct Instagram embeds.
Why this is more privacy-focused
- No direct Instagram widget script on the frontend.
- Fewer direct visitor-to-Meta requests when loading your pages.
- You decide which fields are exposed and for how long data is cached.
Suggested JSON structure
{
"updated_at": "2026-02-20T08:00:00Z",
"items": [
{
"id": "123",
"caption": "Example caption...",
"likes": 120,
"views": 1450,
"permalink": "https://www.instagram.com/p/...",
"timestamp": "2026-02-19T16:30:00Z",
"image": "/instagram/feed/123.webp"
}
]
} 24h automation with crontab
Run the Python script every 24 hours with `crontab`: fetch data, refresh token, optimize media, write JSON, upload via FTP. After setup, your website feed updates automatically with minimal maintenance.
This is a technical implementation guide, not legal advice. For production use, align privacy policy details and legal basis with qualified professionals.
Back to blog