Documentation > Endpoints
Endpoints Check the URLs you need to scan websites, compress, convert and download
1. Crawler Currently optimizeImages has a crawler that allows you to obtain up to 50 images from a website efficiently and quickly with a single endpoint, it also allows you to optimize these files obtained through the crawler with the compression paths.
POST
Parameters:
  • Website: string - Website to scan, ex: https://www.artify.co
Response: The response of the scanner endpoint is an array with the data of the images that includes name, size in bytes and url to download the image. Information: The size of the images downloaded by the crawler will be reflected in the bandwidth consumption of your plan.
2. Compression OptimizeImages allows you to compress images in 3 different ways that are by uploading a file, through a URL or a crawler image that is still available on the server.
2.1 File Compression: To optimize files you must make a POST request encoded as "multipart/form-data" to make this request and upload the file in the "file" parameter.
POST
Parameters:
  • file: binary - File to optimize
  • convertionFormats: string - JSON Array of convertion formats, ex: ["avif", "webp"]
  • compressionFormats: string - Formats available to compress, ex: ["png", "jpg", "svg", "gif"]
  • optimizationLevel: string - Compression level, ex: recommended
2.2 Crawler Compression: This endpoint allows you to optimize and convert images previously obtained in the scanner, therefore before using this endpoint it is necessary to do an analysis using the crawler endpoint since the images will remain on the server for a duration of 3 hours, which will allow the conversion and compression.
POST
Parameters:
  • website: string - Website URL, ex: https://www.artify.co
  • convertionFormats: array - Array of convertion formats, ex: ["avif", "webp"]
  • compressionFormats: array - Formats available to compress, ex: ["png", "jpg", "svg", "gif"]
  • optimizationLevel: string - Compression level, ex: recommended
2.3 URL Compression: This endpoint allows you to compress and convert with just the URL of an image.
POST
Parameters:
  • URL: string - image URL to use, ex: https://www.artify.co
  • convertionFormats: array - Array of convertion formats, ex: ["avif", "webp"]
  • compressionFormats: array - Formats available to compress, ex: ["png", "jpg", "svg", "gif"]
  • optimizationLevel: string - Compression level, ex: recommended
Body response: You will have all the information of the compressed file in an object as a response, which includes information of the file such as name, extension, compression data such as bytes, compressed percentage, original size, compressed size, difference between bytes and download url.
2.4 Zip download: This endpoint allows you to download a ZIP with multiple images that you have optimized.
POST
Parameters:
  • images: array - image data to compress ex: [{name: "tree_267376982.jpg", file: "2302fc14-88fd-43d3-a1db-bfcccda9a616-recommended.jpg"}]