Sample responses¶
Examples use placeholder IDs and the standard { "data": ... } success shape unless noted. Replace https://api.azscraper.com with your deployment base URL.
Authentication¶
Register — POST /auth/register¶
Success (201)
{
"data": {
"accessToken": "eyJhbG...",
"user": {
"id": "67c1...",
"email": "you@company.com",
"name": "Alex"
}
}
}
Error — email taken (409)
{
"success": false,
"error": {
"code": "EMAIL_ALREADY_EXISTS",
"message": "Email already registered",
"details": []
}
}
Login — POST /auth/login¶
Error — invalid credentials (401)
{
"success": false,
"error": {
"code": "INVALID_CREDENTIALS",
"message": "Invalid credentials",
"details": []
}
}
Projects¶
List — GET /projects¶
{
"data": [
{
"id": "67d1...",
"name": "US catalog watch",
"organizationId": "67c...",
"archived": false,
"createdAt": "2025-03-01T12:00:00.000Z",
"updatedAt": "2025-03-01T12:00:00.000Z"
}
]
}
Crawl jobs¶
Create search job — POST /projects/:projectId/jobs¶
Request body
{
"type": "search",
"targets": ["wireless earbuds", "bluetooth speaker"],
"config": { "lang": "en" }
}
Success (201)
{
"data": {
"id": "67e2...",
"projectId": "67d1...",
"type": "search",
"status": "queued",
"targets": ["wireless earbuds", "bluetooth speaker"],
"creditsReserved": 10,
"createdAt": "2025-03-01T12:05:00.000Z"
}
}
Error — insufficient credits (402)
{
"success": false,
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "Insufficient credits to create job",
"details": []
}
}
Get job — GET /jobs/:id¶
{
"data": {
"id": "67e2...",
"projectId": "67d1...",
"type": "search",
"status": "completed",
"targets": ["wireless earbuds"],
"resultCount": 48,
"startedAt": "2025-03-01T12:05:02.000Z",
"completedAt": "2025-03-01T12:06:18.000Z"
}
}
Results — GET /jobs/:id/results¶
{
"data": {
"items": [
{
"asin": "B08N5KWB9H",
"title": "Example product",
"price": { "amount": 29.99, "currency": "USD" },
"rank": 12
}
],
"pagination": { "page": 1, "pageSize": 50, "total": 48 }
}
}
Credits¶
List packages — GET /private/credits/packages¶
Requires dashboard JWT (private API). Shape may vary slightly by deployment; representative example:
{
"data": [
{
"id": "starter",
"name": "Starter",
"priceCents": 500,
"currency": "USD",
"credits": 50000,
"bonusCredits": 0
}
]
}
Marketing site pricing uses $1 = 10,000 credits for display packages ($20 → 200,000 credits). Live checkout packages come from the billing catalog.
Health¶
GET /health¶
{
"status": "ok",
"info": { "api": { "status": "up" } },
"error": {},
"details": { "api": { "status": "up" } }
}
Validation error example¶
HTTP 400
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "targets must contain at least 1 elements",
"details": []
}
}
For the full route list and curl snippets, see Get data and Authentication. For error code meanings, see Error taxonomy.
Tiếng Việt: Ví dụ phản hồi (VI)