cURL Examples
Complete cURL examples for using the PageSight API.
Basic Request
The simplest way to make a request to the API.
Loading code...
Request with Specific Categories
Extract specific data categories from a webpage.
Loading code...
Request TOON Format
Get response in TOON format instead of JSON.
Loading code...
Custom Cache Duration (Pro Only)
Set cache duration to 30 minutes. Minimum is 5 minutes for Pro users.
Loading code...
Cache Revalidation (Pro Only)
Force a fresh scrape by bypassing the cache.
Loading code...
Save Response to File
Save the API response directly to a file.
Loading code...
Verbose Output
See detailed request and response information including headers.
Loading code...
Tips & Best Practices
✅ Do
• URL encode special characters in URLs
• Store API keys in environment variables
• Use verbose mode (-v) for debugging
• Check response headers for rate limit info
❌ Don't
• Don't commit API keys to version control
• Don't make requests without proper error handling
• Don't ignore rate limit headers
• Don't use invalid URL formats
PageSight