Ví dụ phản hồi¶
Thay https://api.azscraper.com bằng base URL triển khai của bạn.
Tạo job search — POST /projects/:projectId/jobs¶
Body
Thành công (201)
{
"data": {
"id": "67e2...",
"projectId": "67d1...",
"type": "search",
"status": "queued",
"targets": ["tai nghe bluetooth"],
"creditsReserved": 5,
"createdAt": "2025-03-01T12:05:00.000Z"
}
}
Lỗi — thiếu credits (402)
{
"success": false,
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "Insufficient credits to create job",
"details": []
}
}
Lấy job — GET /jobs/:id¶
{
"data": {
"id": "67e2...",
"status": "completed",
"type": "search",
"resultCount": 48,
"completedAt": "2025-03-01T12:06:18.000Z"
}
}
Health — GET /health¶
{
"status": "ok",
"info": { "api": { "status": "up" } },
"error": {},
"details": { "api": { "status": "up" } }
}
Xem thêm curl và bảng endpoint trong Get data (EN).
English: Sample responses