API Basics
Data Tools
★  Browser Bot
★  HTML Clean
★  HTML Extract
★  URL Info
Security and Networking

Image Resize

Resize an image and output as either JPEG or PNG.

This API uses a high-grade and adaptive image scaling algorithm and will preserve the aspect ratio of the original image. You can also convert many image formats automatically, we currently support source images in these formats: GIF, ICO, JPEG, PNG, TIFF.

End Point

Test API
API Request
image-urlyesstringThe URL or Base64 encoded Data URL for the source image (you can also upload an image file directly in which case this field is ignored)
widthyesintegerThe width to resize to (in px)
heightnointegerThe height to resize to (in px). If you don't set this field then the height will be automatic based on the requested width and image aspect ratio
formatnostringpngThe output image format, can be either png or jpg
resize-modenostringscaleThe resize mode to use, we support 3 main resizing modes:
  • scale
    Resize to within the width and height specified while preserving aspect ratio. In this mode the width or height will be automatically adjusted to fit the aspect ratio
  • pad
    Resize to exactly the width and height specified while preserving aspect ratio and pad any space left over. Any padded space will be filled in with the 'bg-color' value
  • crop
    Resize to exactly the width and height specified while preserving aspect ratio and crop any space which fall outside the area. The cropping window is centered on the original image
bg-colornostringtransparentThe image background color in hexadecimal notation (e.g. #0000ff). For PNG output the special value of 'transparent' can also be used. For JPG output the default is black (#000000)
API Response
API Performance
Avg Latency60msAverage RTT for requests within the same data center/region
Max Rate3/secondMaximum inbound request rate. Exceeding this will result in request blocking/throttling
Max Concurrency50Maximum concurrent/simultaneous requests. Exceeding this will result in error code 06 [TOO MANY CONNECTIONS]
Daily Limits
Free TierTier 1Tier 2Tier 3