Authentication
All requests use your FetchLayer API key as a Bearer token. There is no AliExpress affiliate or open-platform application to register, no app key and signature to compute, and no AliExpress account to sign in with. Everything returned is published on aliexpress.com and visible to any shopper.
Sending requests
curl -X POST https://api.fetchlayer.dev/aliexpress/search-products \
-H "Authorization: Bearer ss-your-key" \
-H "Content-Type: application/json" \
-d '{"query":"mechanical keyboard","shipTo":"US","currency":"USD","language":"en_US"}'Keep your key secret
Downloading images and videos
The media download endpoint is a GET, and carries the same Bearer header. Because the key travels in a header rather than the URL, a media URL cannot be shared without also sharing the key.
curl -X GET "https://api.fetchlayer.dev/aliexpress/media?url=https%3A%2F%2Fae-pic-a1.aliexpress-media.com%2Fkf%2FS21fa9e98da3547c5a2e840c1917ce9cdI.png&filename=ajazz-nk61.webp" \
-H "Authorization: Bearer ss-your-key" \
-H "Range: bytes=0-65535" \
--output ajazz-nk61.webpAuthentication errors
A missing or invalid key returns HTTP 401.
{
"error": "Invalid API key"
}