API Documentation
Integrate RivalScraper into your workflow. Manage competitors, fetch alerts, and trigger scans programmatically.
Authentication
All API requests require a Bearer token. Generate one from Settings → Browser Extension & API.
Authorization: Bearer YOUR_TOKENInclude this header in every request. Tokens do not expire but can be regenerated (which invalidates the previous one).
Plan Requirements
API token access requires an Operator plan or above. Scout and Free plan users will receive a 403 error when using Bearer token authentication.
Rate Limits
API requests are rate-limited per user on a sliding 1-hour window. Limits vary by plan:
| Plan | Requests / hour |
|---|---|
| Operator | 100 |
| Command | 500 |
Every response includes standard rate-limit headers:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 97
X-RateLimit-Reset: 1709312400When the limit is exceeded, you'll receive a 429 response with a Retry-After header indicating seconds to wait.
Competitors
/api/competitorsList all your tracked competitors with their tracking configurations.
Example Request
curl -H "Authorization: Bearer YOUR_TOKEN" \
https://rivalscraper.com/api/competitorsExample Response
[
{
"id": "uuid",
"name": "Competitor Store",
"url": "https://example.com",
"platform": "shopify",
"created_at": "2025-01-01T00:00:00Z",
"tracking_configs": [...]
}
]/api/competitorsAdd a new competitor to track. Requires name and URL. Platform is auto-detected if not provided.
Example Request
curl -X POST \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"Acme Store","url":"https://acme.com","platform":"shopify"}' \
https://rivalscraper.com/api/competitorsExample Response
{
"id": "uuid",
"name": "Acme Store",
"url": "https://acme.com",
"platform": "shopify",
"created_at": "2025-01-01T00:00:00Z"
}/api/competitors?id=UUIDRemove a competitor and all associated data (snapshots, alerts, products).
Example Request
curl -X DELETE \
-H "Authorization: Bearer YOUR_TOKEN" \
"https://rivalscraper.com/api/competitors?id=COMPETITOR_UUID"Example Response
{ "success": true }Alerts
/api/alertsFetch your alerts. Supports query params: read (true/false), limit, offset.
Example Request
curl -H "Authorization: Bearer YOUR_TOKEN" \
"https://rivalscraper.com/api/alerts?read=false&limit=20"Example Response
[
{
"id": "uuid",
"type": "price_change",
"message": "Price dropped from $49 to $39",
"read": false,
"created_at": "2025-01-01T12:00:00Z",
"competitor_id": "uuid"
}
]/api/alertsMark alerts as read. Pass an array of alert IDs.
Example Request
curl -X PATCH \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"ids":["uuid1","uuid2"]}' \
https://rivalscraper.com/api/alertsExample Response
{ "updated": 2 }Briefs
/api/briefsFetch your AI-generated intelligence briefs. Available on Operator and Command plans.
Example Request
curl -H "Authorization: Bearer YOUR_TOKEN" \
https://rivalscraper.com/api/briefsExample Response
[
{
"id": "uuid",
"content": "## Daily Brief\n\n- Competitor A dropped prices...",
"period": "daily",
"generated_at": "2025-01-01T07:00:00Z"
}
]Scrape
/api/scrapeTrigger a manual scan for a competitor. Costs 1 scan credit. Returns scraped data.
Example Request
curl -X POST \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"competitorId":"COMPETITOR_UUID"}' \
https://rivalscraper.com/api/scrapeExample Response
{
"success": true,
"products": 42,
"snapshots": 42,
"alerts": 3
}Discover
/api/discoverUse AI to discover competitors based on a query. Returns a list of potential competitors with relevance scores.
Example Request
curl -X POST \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"query":"organic skincare brands in Europe"}' \
https://rivalscraper.com/api/discoverExample Response
{
"results": [
{
"name": "Brand Name",
"url": "https://example.com",
"platform": "shopify",
"relevance": 0.92,
"reason": "Direct competitor in organic skincare"
}
]
}Analyze URL
/api/analyze-urlAnalyze a URL to detect the e-commerce platform and extract store metadata before adding as a competitor.
Example Request
curl -X POST \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"url":"https://example-store.com"}' \
https://rivalscraper.com/api/analyze-urlExample Response
{
"platform": "shopify",
"name": "Example Store",
"description": "An online store selling...",
"products_detected": true
}Products
/api/competitors/:id/productsList all tracked products for a competitor. Supports pagination with limit (max 500) and offset.
Example Request
curl -H "Authorization: Bearer YOUR_TOKEN" \
"https://rivalscraper.com/api/competitors/COMPETITOR_UUID/products?limit=50&offset=0"Example Response
{
"data": [
{
"id": "uuid",
"product_url": "https://example.com/product-1",
"product_name": "Product One",
"latest_price": 29.99,
"currency": "USD",
"in_stock": true,
"variant_count": 3,
"created_at": "2025-01-01T00:00:00Z"
}
],
"total": 142,
"limit": 50,
"offset": 0
}Price History
/api/competitors/:id/pricesFetch price snapshots for a competitor. History depth depends on your plan (7d Scout, 30d Operator, unlimited Command). Supports limit (max 1000), offset, and days filter.
Example Request
curl -H "Authorization: Bearer YOUR_TOKEN" \
"https://rivalscraper.com/api/competitors/COMPETITOR_UUID/prices?days=30&limit=100"Example Response
{
"data": [
{
"id": "uuid",
"product_url": "https://example.com/product-1",
"product_name": "Product One",
"price": 29.99,
"currency": "USD",
"captured_at": "2025-01-15T12:00:00Z"
}
],
"total": 850,
"limit": 100,
"offset": 0
}