Image Resizer API
Pricing
from $3.39 / 1,000 image processeds
Image Resizer API
Resize, crop, pad, and convert images by URL, base64, or key-value-store key. E-commerce, social, website, and WhatsApp presets. Batch up to 100 images per run.
Image Resizer API
Pricing
from $3.39 / 1,000 image processeds
Resize, crop, pad, and convert images by URL, base64, or key-value-store key. E-commerce, social, website, and WhatsApp presets. Batch up to 100 images per run.
You can access the Image Resizer API programmatically from your own applications by using the Apify API. You can also choose the language preference from below. To use the Apify API, you’ll need an Apify account and your API token, found in API & Integrations in Apify Console.
1from apify_client import ApifyClient2
3# Initialize the ApifyClient with your Apify API token4# Replace '<YOUR_API_TOKEN>' with your token.5client = ApifyClient("<YOUR_API_TOKEN>")6
7# Prepare the Actor input8run_input = {9 "images": [10 {11 "url": "https://placehold.co/1200x800.jpg?text=sample-1",12 "id": "sample-image-1",13 },14 {15 "url": "https://placehold.co/1280x840.jpg?text=sample-2",16 "id": "sample-image-2",17 },18 {19 "url": "https://placehold.co/1360x880.jpg?text=sample-3",20 "id": "sample-image-3",21 },22 {23 "url": "https://placehold.co/1440x920.jpg?text=sample-4",24 "id": "sample-image-4",25 },26 {27 "url": "https://placehold.co/1520x960.jpg?text=sample-5",28 "id": "sample-image-5",29 },30 ],31 "width": 800,32 "height": 600,33 "backgroundColor": "#FFFFFF",34 "quality": 80,35}36
37# Run the Actor and wait for it to finish38run = client.actor("parsebird/image-resizer-api").call(run_input=run_input)39
40# Fetch and print Actor results from the run's dataset (if there are any)41print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")42for item in client.dataset(run.default_dataset_id).iterate_items():43 print(item)44
45# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-startThe Apify API client for Python is the official library that allows you to use Image Resizer API API in Python, providing convenience functions and automatic retries on errors.
Install the apify-client
$pip install apify-clientOther API clients include: