Extract article text
Use extract=1 and format=text to request readable text, then pass the result to your application’s summarization or indexing workflow. Inspect the response first: login walls, upstream access restrictions, and pages that require browser rendering can prevent useful extraction.
// Production plan: extract readable text for an AI workflow.
const params = new URLSearchParams({
key: 'YOUR_API_KEY',
url: 'https://example.com/article',
extract: '1',
format: 'text',
});
const response = await fetch('https://corsproxy.io/?' + params);
if (!response.ok) {
throw new Error('HTTP ' + response.status + ': ' + await response.text());
}
const articleText = await response.text();
// Send this text to your own backend for summarization or indexing.
console.log(articleText); Explore content extraction and read the extraction options.
Use feeds for updates
RSS and Atom feeds are useful sources for news and podcast discovery. Fetch raw XML in the browser, or use Production to convert it to JSON. Conversion preserves the feed’s structure, so parse RSS and Atom entries according to their formats.
Read the RSS & Feeds examples.
Reuse responses your app requests often
For repeated reads of the same public source, Production’s caching controls let you choose a suitable freshness window. Keep that window short enough for your application’s update needs.
Keep model credentials in your backend
A CORS proxy does not hide provider tokens sent by browser code. Store model API secrets on your server and call the provider from there. CORSPROXY is the content retrieval step, rather than a credential vault or a model gateway.
Handle retrieval failures before sending content to a model
Check the HTTP status, content type, and returned text before continuing. Treat an upstream access-denied page as an error instead of indexing or summarizing it. Read the upstream 403 guide.
