Download a product image or video
Stream a product image, variant image, review photo or product video, using a url taken from a result. Only AliExpress’s own image and video hosts are accepted. HTTP Range requests are supported, so a video can be fetched in pieces. This is a GET with query parameters, not a JSON POST, and it bills as one request. The file is served in whatever format AliExpress stores — an image URL ending in .png can come back as image/webp, so trust Content-Type rather than the extension.
/media Utility https://api.fetchlayer.dev/aliexpress/media Headers
Authorization string required Bearer token — your FetchLayer API key.
Parameters
url string required Product image, review photo or video URL, as returned on a result. Passed as a query parameter.
filename string optional Content-Disposition filename to serve the file as (max 200 characters).
Range string optional Standard HTTP Range request header, for example bytes=0-65535. Sent as a header, not a query parameter.
Response Fields
media
Download a product image or video
(body) binary The file itself. 200 for the whole file, 206 for a requested byte range.
Content-Type header Media type of the file, e.g. image/webp, image/jpeg or video/mp4.
Content-Range header Byte range served, on a 206 response.
Accept-Ranges header Present when the file supports range requests.
Request
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"Response
{
"note": "Binary file streamed back with Content-Type, Content-Length and Accept-Ranges headers."
}