API reference
The ListingLens API lets you programmatically submit Amazon listings for analysis and retrieve structured results. Results are stored permanently and retrievable by report ID.
Authentication
Authenticate by passing your API key in the Authorization header as a Bearer token.
Authorization: Bearer ll_live_sk_a1b2c3d4e5f6...ll_live_ are production keys; ll_test_ keys return mocked results without consuming analysis credits.Submit a listing for analysis
Submits an Amazon listing URL for full 4-agent analysis. Returns immediately with a reportId — use this to poll GET /api/results/:id or connect to the SSE stream.
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | required | Full Amazon listing URL including the /dp/ path segment. ASIN is extracted server-side. |
| agents | string[] | optional | Subset of agents to run. Default: all four. Options: visual, reviews, ai_search, benchmark. |
| webhook_url | string | optional | HTTPS URL to POST the completed report to. Useful for async workflows. |
| metadata | object | optional | Arbitrary key-value pairs attached to the report for your internal tracking. |
cURL example
curl -X POST https://api.listinglens.com/v1/analyse \ -H "Authorization: Bearer ll_live_sk_a1b2c3d4e5f6" \ -H "Content-Type: application/json" \ -d '{ "url": "https://www.amazon.com/dp/B08N5WRWNW", "agents": ["visual", "reviews", "ai_search", "benchmark"] }'
Response
{
"reportId": "rpt_abc123xyz",
"status": "running",
"asin": "B08N5WRWNW",
"estimatedSeconds": 90
}Retrieve a completed report
Returns the full structured report for a given reportId. Reports are stored permanently — there is no expiry.
Report object
Agent result object
Subscribe to live agent events
Opens a Server-Sent Events stream that emits real-time agent progress events. The stream closes automatically once synthesis_complete is emitted.
Event types
| Event | Data shape | Description |
|---|---|---|
| agent_start | {"id", "title"} | An agent has begun execution. |
| agent_line | {"id", "line"} | A new log line from a running agent. Stream these to the UI for the typewriter effect. |
| agent_complete | {"id", "score", "summary"} | An agent has finished. Score and summary are available immediately. |
| agent_failed | {"id", "reason"} | An agent timed out or errored. Analysis continues with remaining agents. |
| synthesis_start | {} | All agents done; synthesis layer is running. |
| synthesis_complete | {"reportId", "score", "grade"} | Full report is ready. Fetch from GET /api/results/:id. |
| analysis_failed | {"reason"} | Unrecoverable failure (e.g. invalid ASIN, all agents timed out). |
JavaScript example
// 1. Submit the listing const res = await fetch('https://api.listinglens.com/v1/analyse', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ url: 'https://amazon.com/dp/B08N5WRWNW' }), }); const { reportId } = await res.json(); // 2. Connect to the SSE stream const source = new EventSource(`https://api.listinglens.com/v1/stream/${reportId}`); source.addEventListener('synthesis_complete', async (e) => { const { reportId } = JSON.parse(e.data); source.close(); });
Status codes
Rate limits
Rate limits are applied per API key. When a limit is exceeded, the response includes a Retry-After header.
| Tier | Analyses / min | Analyses / day | Concurrent streams |
|---|---|---|---|
| Free | 10 | 200 | 3 |
| Pro | 60 | 2,000 | 20 |
| Enterprise | custom | custom | custom |