Download a product or launch image
Stream a product logo, launch thumbnail or gallery image, using a url taken from a product or launch returned by the other endpoints. Only Product Hunt image hosts are accepted. HTTP Range requests are supported. This is a GET with query parameters, not a JSON POST, and it bills as one request.
/media Media https://api.fetchlayer.dev/producthunt/media Headers
Authorization string required Bearer token — your FetchLayer API key.
Parameters
url string required Product Hunt image URL, as returned on a product or launch. 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 or launch image
(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/png or image/jpeg.
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/producthunt/media?url=https%3A%2F%2Fph-files.imgix.net%2F....png&filename=granola-logo.png" \
-H "Authorization: Bearer ss-your-key"Response
{
"note": "Binary file streamed back with Content-Type, Content-Length and Accept-Ranges headers."
}