RateAds API Overview
Programmatic access to RateAds data
The RateAds API lets your own code read advertisements and reviews, and act as your account, for example to submit a review. You authenticate with an API key you create in your account settings. Keys work only on the endpoints under API Capabilities below. Account endpoints (password, sessions, profile, settings, privacy, data export and deletion) accept only a signed-in token, never a key.
Getting Started
Set up your API access
Create a RateAds Account
The API works with a normal RateAds account. If you don't have one yet, create an account.
Create an API Key
Open Settings → Integrations, name the key and choose its scopes: read for GET requests, write to create, change and delete. The key is shown once, so copy it before you leave the page.
Send the Key With Each Request
Add Authorization: Api-Key <key> to each request to https://www.rateads.us/api/v1/.
Review the Documentation
The API documentation covers scopes, limits and the main endpoints. Every endpoint is listed in the OpenAPI schema at /api/schema/; browse it in Swagger UI at /api/docs/ or in ReDoc at /api/redoc/.
API Capabilities
What you can do with the RateAds API
Advertisements
List, filter and search advertisements with /api/v1/advertisements/ and /api/v1/search/, and see what's trending with /api/v1/discovery/trending/.
Reviews
Read an advertisement's approved reviews with /api/v1/reviews/?advertisement=<id>, and submit reviews with a key that has the write scope.
Your Account
/api/v1/users/me/ returns the account the key belongs to. A key can read it but not change it.
Authentication
Securing your API requests
API Key Authentication
Include the key in the Authorization header of every request:
Authorization: Api-Key YOUR_API_KEYA key without the write scope gets 403 on POST, PUT, PATCH and DELETE. A wrong, revoked or expired key gets 401. Keys can't create or rotate other keys; do that while signed in.
API keys are for member accounts; staff accounts can't use them.
Changing or resetting your password revokes your API keys, and so does signing out of all other sessions. Create new keys afterwards.
Signed in on the site? Requests can also carry a JWT access token as Authorization: Bearer <access token>. You get one from POST /api/auth/login/ and renew it with POST /api/auth/refresh/.
Security Best Practices
- • Never put an API key, your password or an access token in client-side code
- • Use environment variables to store credentials
- • Give each script its own key, with only the scopes it needs
- • Rotate a key you think has leaked, and revoke keys you no longer use
- • Only send credentials over HTTPS
Rate Limits
Understanding API usage limits
Every account has the same limits; there are no paid API plans.
- Each API key: 1,000 requests an hour
- Each account: 5,000 requests a day, counting all of its keys and its signed-in requests
- Without a key or sign-in: 1,000 requests an hour per IP address
Some endpoints have lower limits of their own. Over a limit, requests return a 429 status code with a Retry-After header; wait that many seconds before retrying. See the API documentation.
Example Integration
Quick start code example
Fetching Your Profile (JavaScript)
// RATEADS_API_KEY is a key from Settings -> Integrations.
const fetchMyProfile = async () => {
const response = await fetch(
'https://www.rateads.us/api/v1/users/me/',
{
headers: {
'Authorization': `Api-Key ${process.env.RATEADS_API_KEY}`,
'Accept': 'application/json'
}
}
);
if (!response.ok) {
throw new Error(`API error: ${response.status}`);
}
const data = await response.json();
return data;
};
// Usage
try {
const profile = await fetchMyProfile();
console.log('Signed in as:', profile);
} catch (error) {
console.error('Failed to fetch profile:', error);
}API Support
Get help with your integration
Questions about the RateAds API? Tell us what you're building or what you need from the API.