Authentication
Every endpoint requires two headers from RapidAPI. RapidAPI acts as a gateway — it verifies your identity, enforces your subscription limits, and routes requests to the backend.
Required Headers
| Header | Value |
|---|---|
x-rapidapi-key | Your personal API key |
x-rapidapi-host | fast-news-with-previews.p.rapidapi.com |
Both are available on the API's RapidAPI page under the Endpoints tab. When using RapidAPI's built-in test console or SDK, these headers are included automatically.
Example
curl -X GET "https://fast-news-with-previews.p.rapidapi.com/health" \
-H "x-rapidapi-key: YOUR_RAPIDAPI_KEY" \
-H "x-rapidapi-host: fast-news-with-previews.p.rapidapi.com"
Common Issues
| Error | Cause | Fix |
|---|---|---|
401 Unauthorized | Missing authentication header | Include both x-rapidapi-key and x-rapidapi-host headers |
403 Forbidden | Request not sent through RapidAPI | Call https://fast-news-with-previews.p.rapidapi.com, not a direct backend URL |
Notes
- Rate limiting is handled by RapidAPI's gateway based on your subscription plan, not by the API itself
- Transmit your API key exactly as provided — no extra spaces, line breaks, or encoding changes