Get Started in 30 Seconds

Cache any HTTP/HTTPS URL and get 10x faster responses. Perfect for APIs, Google Sheets, and web resources.

// Get started in 30 seconds
const response = await fetch('https://www.cachethings.com/api/fetch?url=https://httpbin.org/json');
const data = await response.json();
console.log('Cached data:', data);
First request fetches fresh data, second request returns cached in milliseconds

Choose Your Language

All examples below will update to show your selected language

Top Use Cases

📊Google Sheets CSV Caching

Avoid rate limits and speed up sheet access by 10x. Perfect for dashboards and data feeds.

// Cache a Google Sheet CSV export
const sheetId = 'your_sheet_id_here';
const sheetUrl = `https://docs.google.com/spreadsheets/d/${sheetId}/export?format=csv`;
const response = await fetch(`https://www.cachethings.com/api/fetch?url=${encodeURIComponent(sheetUrl)}`);
const csvData = await response.text();

// Parse the CSV data
const rows = csvData.split('\n').map(row => row.split(','));
console.log('Sheet data loaded from cache!', rows);

💡 Pro tip: Great for importing Google Sheets data into apps without hitting API limits

🔗Slow API Response Caching

Speed up external API calls and reduce costs. Weather, news, social media APIs.

// Cache slow API responses  
const weatherUrl = 'https://api.openweathermap.org/data/2.5/weather?q=London&appid=YOUR_KEY';
const response = await fetch(`https://www.cachethings.com/api/fetch?url=${encodeURIComponent(weatherUrl)}`);
const weather = await response.json();

console.log('Weather data:', weather);
console.log('Cache status:', response.headers.get('X-Cache')); // HIT or MISS

💡 Pro tip: Reduces API costs and improves user experience with instant responses

📈Real-time Dashboard Data

Always fresh, always fast. Perfect for metrics, analytics, and live data feeds.

// Perfect for dashboards - always fresh, always fast
const metricsUrl = 'https://api.your-service.com/metrics';
const response = await fetch(`https://www.cachethings.com/api/fetch?url=${encodeURIComponent(metricsUrl)}`);
const metrics = await response.json();

// Your dashboard gets instant responses while cache stays fresh in background
updateDashboard(metrics);

💡 Pro tip: Cache refreshes in background so your dashboard never waits

🧠 How Smart Caching Works
1️⃣

First Request

API → Cache → You
Fresh data, now cached

2️⃣

Next Requests

Cache → You
Instant responses

3️⃣

Smart Refresh

Cache → You + API → Cache
Instant + background update

Result: If you call the same URL regularly, your cache stays perpetually fresh while maintaining lightning-fast response times! ⚡

🔧 API Reference

One endpoint, two parameters, that's it!

Protocol Support: Currently supports HTTP and HTTPS only. Other protocols (FTP, File, etc.) available in premium tier.

GET https://www.cachethings.com/api/fetch

Parameters

urlrequired

The URL to cache (must be URL-encoded). HTTPS will be added automatically if no protocol is specified.

forceoptional

Set to true to bypass cache and get fresh data

Response Headers

X-Cache: HIT - Served from cache (fast!)
X-Cache: MISS - Fresh data, now cached
X-Cache: STALE-WHILE-REVALIDATE - Cached data + background refresh
⚠️Error Handling
Performance Details
🚀Upcoming Features