# Bing Images Api (`scrapier/bing-images-api`) Actor

🖼️ Bing Images API (bing-images-api) delivers fast Bing Image Search for developers—find high‑quality images with thumbnails, direct URLs & metadata. 🔎 Filter by size, color, type, license, freshness + SafeSearch. ⚙️ Ideal for apps, CMS, e‑commerce, and SEO workflows.

- **URL**: https://apify.com/scrapier/bing-images-api.md
- **Developed by:** [Scrapier](https://apify.com/scrapier) (community)
- **Categories:** Automation, AI, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$24.99/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period.You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#rental-actors

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Bing Images API

A robust Apify Actor for scraping images from Bing Images search results. This actor supports bulk query processing, intelligent proxy fallback, and real-time data saving.

### Why Choose Us?

- **Bulk Processing**: Process multiple search queries in a single run
- **Intelligent Proxy Management**: Automatic fallback from datacenter to residential proxies
- **Live Data Saving**: Results are saved incrementally to prevent data loss
- **Comprehensive Error Handling**: Robust retry logic with exponential backoff
- **Detailed Logging**: Real-time progress updates and status information

### Key Features

- ✅ **Multiple Query Support**: Process multiple search queries simultaneously
- ✅ **Proxy Fallback**: Automatic fallback from no proxy → datacenter → residential
- ✅ **Live Saving**: Data saved immediately as it's scraped
- ✅ **Retry Logic**: Up to 3 retry attempts with exponential backoff
- ✅ **Rate Limiting**: Built-in delays to respect Bing's servers
- ✅ **Rich Metadata**: Extract thumbnails, original images, sources, domains, and more

### Input

#### JSON Example

```json
{
  "queries": ["Coffee", "Nature", "Technology"],
  "maxImages": 100,
  "countryCode": "US",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
````

#### Input Fields

- **queries** (required, array): List of search queries to scrape images for
  - Example: `["Coffee", "Nature", "Technology"]`

- **maxImages** (optional, integer): Maximum number of images to scrape per query
  - Default: `100`
  - Range: 1-1000

- **countryCode** (optional, string): Country code for localized search results
  - Default: `"US"`
  - Examples: `"US"`, `"GB"`, `"JP"`, `"FR"`

- **proxyConfiguration** (optional, object): Proxy configuration settings
  - **useApifyProxy** (boolean): Enable Apify proxy
    - Default: `false` (no proxy)
    - If enabled, uses datacenter proxy with automatic fallback to residential

### Output

#### JSON Example

```json
{
  "query": "Coffee",
  "position": 1,
  "thumbnail": "https://i.pinimg.com/150x150/...",
  "original": "https://example.com/image.jpg",
  "link": "https://www.bing.com/images/search?view=detailV2&...",
  "title": "Coffee Cup",
  "description": "A beautiful coffee cup",
  "source": "https://example.com/article",
  "domain": "example.com",
  "size": "1920×1080",
  "success": true
}
```

#### Output Fields

- **query**: The search query this image was found for
- **position**: Position of the image in search results (1-based)
- **thumbnail**: URL to the thumbnail image
- **original**: URL to the original full-size image
- **link**: Bing detail page link for this image
- **title**: Title of the image
- **description**: Description or alt text of the image
- **source**: Source website URL where the image is hosted
- **domain**: Domain name of the source website
- **size**: Image dimensions (width×height) if available
- **success**: Whether the image was successfully scraped

### 🚀 How to Use the Actor (via Apify Console)

1. Log in at https://console.apify.com and go to **Actors**
2. Find your actor (bing-images-api) and click it
3. Configure inputs:
   - Enter your search queries (one per line or as JSON array)
   - Set maximum images per query
   - Choose country code
   - Configure proxy settings if needed
4. Click **Start** to run the actor
5. Monitor logs in real time to see progress
6. Access results in the **OUTPUT** tab
7. Export results to JSON or CSV

### Best Use Cases

- **Market Research**: Collect images for product analysis
- **Content Creation**: Gather visual assets for projects
- **SEO Research**: Analyze image search trends
- **Data Collection**: Build image datasets for machine learning
- **Competitive Analysis**: Monitor visual content in your industry

### Frequently Asked Questions

**Q: How many images can I scrape per query?**\
A: You can scrape up to 1000 images per query, but the default is 100 for faster processing.

**Q: What happens if Bing blocks my requests?**\
A: The actor automatically falls back to residential proxies and retries up to 3 times.

**Q: Can I scrape images without a proxy?**\
A: Yes, by default the actor uses no proxy. However, using a proxy is recommended for better reliability.

**Q: How long does it take to scrape 100 images?**\
A: Typically 1-3 minutes depending on network conditions and proxy usage.

**Q: Are the images downloaded?**\
A: No, the actor only extracts image URLs and metadata. You can download images separately using the URLs provided.

### Support and Feedback

For issues, questions, or feedback, please contact support through the Apify platform.

***

### Cautions

- Data is collected only from **publicly available sources**
- Respect Bing's Terms of Service and rate limits
- The end user is responsible for ensuring legal compliance (copyright, privacy, data protection, etc.)
- Do not use scraped images without proper licensing or permission

# Actor input Schema

## `queries` (type: `array`):

📋 List of search queries to scrape images from Bing.

💡 Examples: \['Coffee', 'Nature', 'Technology', 'Cats', 'Mountains']

✨ You can add multiple queries to scrape in one run!

## `maxImages` (type: `integer`):

🎯 Set the maximum number of images to scrape for each query.

📈 Range: 1-1000 images
💡 Default: 20 images (recommended for faster results)

⚡ Tip: Lower values = faster scraping, Higher values = more comprehensive results

## `countryCode` (type: `string`):

🌐 Set the country code for localized search results.

📍 Examples:
• 🇺🇸 US - United States
• 🇬🇧 GB - United Kingdom
• 🇯🇵 JP - Japan
• 🇫🇷 FR - France
• 🇩🇪 DE - Germany

💡 Default: US (United States)

## `proxyConfiguration` (type: `object`):

🛡️ Configure proxy settings for enhanced reliability and bypassing restrictions.

🔄 Smart Fallback System:
1️⃣ No proxy (default) - Direct connection
2️⃣ Datacenter proxy - If configured
3️⃣ Residential proxy - Automatic fallback if blocked

✅ The actor automatically switches to residential proxy if requests are blocked.

💡 Recommended: Enable proxy for better success rates!

## Actor input object example

```json
{
  "queries": [
    "Coffee"
  ],
  "maxImages": 20,
  "countryCode": "US",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "queries": [
        "Coffee"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapier/bing-images-api").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "queries": ["Coffee"],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapier/bing-images-api").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "queries": [
    "Coffee"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call scrapier/bing-images-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scrapier/bing-images-api",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Bing Images Api",
        "description": "🖼️ Bing Images API (bing-images-api) delivers fast Bing Image Search for developers—find high‑quality images with thumbnails, direct URLs & metadata. 🔎 Filter by size, color, type, license, freshness + SafeSearch. ⚙️ Ideal for apps, CMS, e‑commerce, and SEO workflows.",
        "version": "0.1",
        "x-build-id": "Oy8y783ZQih3rFKwa"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scrapier~bing-images-api/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scrapier-bing-images-api",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/scrapier~bing-images-api/runs": {
            "post": {
                "operationId": "runs-sync-scrapier-bing-images-api",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/scrapier~bing-images-api/run-sync": {
            "post": {
                "operationId": "run-sync-scrapier-bing-images-api",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "queries"
                ],
                "properties": {
                    "queries": {
                        "title": "🔍 Search Queries",
                        "type": "array",
                        "description": "📋 List of search queries to scrape images from Bing.\n\n💡 Examples: ['Coffee', 'Nature', 'Technology', 'Cats', 'Mountains']\n\n✨ You can add multiple queries to scrape in one run!",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxImages": {
                        "title": "📊 Maximum Images per Query",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "🎯 Set the maximum number of images to scrape for each query.\n\n📈 Range: 1-1000 images\n💡 Default: 20 images (recommended for faster results)\n\n⚡ Tip: Lower values = faster scraping, Higher values = more comprehensive results",
                        "default": 20
                    },
                    "countryCode": {
                        "title": "🌍 Country Code",
                        "type": "string",
                        "description": "🌐 Set the country code for localized search results.\n\n📍 Examples:\n• 🇺🇸 US - United States\n• 🇬🇧 GB - United Kingdom\n• 🇯🇵 JP - Japan\n• 🇫🇷 FR - France\n• 🇩🇪 DE - Germany\n\n💡 Default: US (United States)",
                        "default": "US"
                    },
                    "proxyConfiguration": {
                        "title": "🔒 Proxy Configuration",
                        "type": "object",
                        "description": "🛡️ Configure proxy settings for enhanced reliability and bypassing restrictions.\n\n🔄 Smart Fallback System:\n1️⃣ No proxy (default) - Direct connection\n2️⃣ Datacenter proxy - If configured\n3️⃣ Residential proxy - Automatic fallback if blocked\n\n✅ The actor automatically switches to residential proxy if requests are blocked.\n\n💡 Recommended: Enable proxy for better success rates!"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
