SpecScout API Documentation (v1)
Welcome to the SpecScout API. This documentation provides detailed information about endpoints, parameters, and responses to help you integrate automated product data extraction into your e-commerce platform.
Authentication
Authentication is handled via API keys. A client must provide a valid API key with each request to protected endpoints.
Header: Authorization: Bearer <API_KEY>
Health Check Public
Checks the operational status of the API.
Response (200 OK)
{
"status": "ready"
}
Users
Registers a new user. Does not require authentication.
Request Body
email(string, required)password(string, required, min 8 chars)full_name(string, optional)
Response (201 Created)
{
"id": "550e84...",
"email": "user@example.com",
"full_name": "John Doe",
"is_active": true,
"created_at": "..."
}
Updates a user's information.
Authorization: Same user or superuser.
Request Body
{
"email": "new@example.com",
"password": "new_password",
"full_name": "Jane Doe"
}
Deletes a user. Returns 204 No Content.
API Keys
Creates a new API key. Important: The raw token is returned only once.
Response (201 Created)
{
"token": "sp_user_a1b2c3... (SAVE THIS!)",
"key": {
"key_id": "sp_user_...",
"created_at": "...",
"revoked": false
}
}
Lists all keys for a user (without secrets).
Specifications
Best Practices: Garbage In -> Garbage Out
Each specification must be defined precisely. Use options where possible to ensure data comparability. Set tolerance > 0.1 for string matching.
Request Object
{
"name": "CPU Type",
"description": "The processor type of the device",
"instance": "str", // "float", "int", "str", "bool", "list"
"unit": "", // e.g. "kg", "GB"
"tolerance": 0.15, // 0-1 (decimal)
"options": null, // Array of allowed strings
"sub_values": []
}
Note: Use options for filters (e.g. material: ["aluminum", "plastic"]).
/api/v1/specifications
List all specs
/api/v1/specifications/{id}
Get single spec
Categories
Categories group specifications in a hierarchical structure.
{
"name": "Electronics/IT-Devices/Laptops",
"top_category": "IT-Devices" // UUID of parent or null
}
Every category name must be unique.
Associates a specification with a category.
Search
CORE SERVICEPerforms the core SpecScout service: searches the web for product specifications based on a query.
Query Parameters
- product_name Required. E.g. "MacBook Pro 16 M3 Max"
- brand Optional but use highly recommended. E.g. "Apple".
- category Name of a predefined category (see category creation) to indicate which specifications to look for.
- required_specs Optional. JSON array of spec objects. Use to add additional specifications to look for.
Success Response (200 OK)
{
"status": "ok",
"specs": [
{
"name": "Processor",
"value": "Apple M3 Max",
"potential_values": [
{
"value": "Apple M3 Max",
"source": "apple.com",
"confidence": 0.95
}
],
"sources": ["https://www.apple.com/..."]
}
],
"not_found": [],
"errors": []
}
Example Request & Response
This example demonstrates a standard JSON request to the /api/v1/search endpoint and the corresponding structured JSON response.
{
"product_name": "iPhone 12 Pro",
"brand": "Apple",
"category": "Electronics/IT-Devices/Smartphones",
"user_id": "03dcb9a1-4d71-40a7-a04a-9a4b93d2b62e",
"api-key": "sp_user_c64e2c071c4135d5.iKTBaTZFW-QNKUO7NPuhM..."
}
Ready to get structured data?
Get API Key