This API returns cross-reference results by article from Database 1, Database 2, or both at once. Responses are cached for 24 hours, and repeated requests served from cache are not billed again.
GET /api/v1/search
Parameters:
| Parameter | Description |
|---|---|
article | Required. The article number to search for. |
source | base1 = Database 1, base2 = Database 2, all = both. Default: all. |
token | Optional query token when authentication is enabled. Header-based auth is recommended for production. |
Current mode:
Authentication required
Recommended production header:
Authorization: Bearer YOUR_TOKEN
Alternative header:
X-API-Key: YOUR_TOKEN
curl "https://cross.alexdrozdov.com/api/v1/search?article=6PK1230&source=all"
Production example with authorization enabled:
curl -H "Authorization: Bearer YOUR_TOKEN" ^
"https://cross.alexdrozdov.com/api/v1/search?article=6PK1230&source=all"
<?php
$url = 'https://cross.alexdrozdov.com/api/v1/search?article=6PK1230&source=all';
$token = 'YOUR_TOKEN';
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Accept: application/json',
'Authorization: Bearer ' . $token,
],
]);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo "HTTP: " . $httpCode . PHP_EOL;
echo $response;
{
"success": true,
"meta": {
"article": "6PK1230",
"normalized_article": "6PK1230",
"source": "all",
"auth_required": false,
"cache": {
"hit": false,
"ttl_hours": 24
},
"result_count": 4
},
"data": {
"base1": {
"DAYCO": [
{ "brand": "DAYCO", "article": "6PK1230" }
]
},
"base2": {
"CONTINENTAL": [
{ "brand": "CONTINENTAL", "article": "6PK1230" }
]
}
}
}
When authentication is enabled, the response also includes token usage information such as the monthly limit and remaining requests.
| HTTP | Meaning |
|---|---|
400 | Missing article, unknown source, invalid token, or monthly limit exceeded. |
404 | Route not found. |
500 | Server or database error. |