Bing Images API

Our Bing Images API allows you to scrape SERP results from Bing Images. The API is accessed through the following endpoint: /search?engine=bing_images.

A user may query the following: https://serpapi.com/search?engine=bing_images utilizing a GET request. Head to the playground for a live and interactive demo.

API Parameters

Search Query

q

Required

Parameter defines the search query. You can use anything that you would use in a regular Bing Images search.

Geographic Location

mkt

Optional

The market where the results come from (e.g. en-US). Typically, mkt is the country where the user is making the request from. However, it could be a different country if the user is not located in a country where Bing Images API delivers results. The market must be in the form <language code>-<country code>. For example, en-US. The string is case insensitive. For a list of possible market values, see Market Codes.

NOTE: If known, you are encouraged to always specify the market. Specifying the market helps Bing route the request and return an appropriate and optimal response. If you specify a market that is not listed in Market Codes, Bing Images API uses a best fit market code based on an internal mapping that is subject to change.

This parameter and the cc query parameter are mutually exclusive—do not specify both.

Localization

cc

Optional

Parameter defines the country to search from. It follows the 2-character ISO_3166-1 format. (e.g., us for United States, de for Germany, gb for United Kingdom, etc.).

Pagination

first

Optional

Parameter controls the offset of the organic results. This parameter defaults to 1. (e.g., first=10 will move the 10th organic result to the first position).

count

Optional

Parameter controls the number of results per page. This parameter is only a suggestion and might not reflect the returned results.

Advanced Bing Images Parameters

imagesize

Optional

Parameter is used for filtering images by size. It can be set to:

small - Small
medium - Medium
large - Large
wallpaper - Extra Large

color2

Optional

Parameter is used for filtering images by color. It can be set to:

color - Color Only
bw - Black & white
FGcls_RED - Red
FGcls_ORGANGE - Orange
FGcls_YELLOW - Yellow
FGcls_GREEN - Green
FGcls_TEAL - Teal
FGcls_BLUE - Blue
FGcls_PURPLE - Purple
FGcls_PINK - Pink
FGcls_BROWN - Brown
FGcls_BLACK - Black
FGcls_GRAY - Gray
FGcls_WHITE - White

photo

Optional

Parameter is used for filtering images by image type. It can be set to:

photo - Photo
clipart - Clipart
linedrawing - Line Drawing
animatedgif - Animated GIF
transparent - Transparent

aspect

Optional

Parameter is used for filtering images by layout. It can be set to:

square - Square
wide - Wide
tall - Tall

face

Optional

Parameter is used for filtering images by people. It can be set to:

face - Faces Only
portrait - Head & Shoulders

age

Optional

Parameter is used for filtering images by date. It can be set to:

lt1440 - Past 24 hours
lt10080 - Past week
lt43200 - Past month
lt525600 - Past year

license

Optional

Parameter is used for filtering images by license. It can be set to:

Type-Any - All Creative Commons
L1 - Public Domain
L2_L3_L4_L5_L6_L7 - Free to share and use
L2_L3_L4 - Free to share and use commercially
L2_L3_L5_L6 - Free to modify, share and use
L2_L3 - Free to modify, share, and use commercially

Serpapi Parameters

engine

Required

Set parameter to bing_images to use the Bing Images API engine.

device

Optional

Parameter defines the device to use to get the results. It can be set to desktop (default) to use a regular browser, tablet to use a tablet browser (currently using iPads), or mobile to use a mobile browser (currently using iPhones).

no_cache

Optional

Parameter will force SerpApi to fetch the Bing Images results even if a cached version is already present. A cache is served only if the query and all parameters are exactly the same. Cache expires after 1h. Cached searches are free, and are not counted towards your searches per month. It can be set to false (default) to allow results from the cache, or true to disallow results from the cache. no_cache and async parameters should not be used together.

async

Optional

Parameter defines the way you want to submit your search to SerpApi. It can be set to false (default) to open an HTTP connection and keep it open until you got your search results, or true to just submit your search to SerpApi and retrieve them later. In this case, you'll need to use our Searches Archive API to retrieve your results. async and no_cache parameters should not be used together. async should not be used on accounts with Ludicrous Speed enabled.

api_key

Required

Parameter defines the SerpApi private key to use.

output

Optional

Parameter defines the final output you want. It can be set to json (default) to get a structured JSON of the results, or html to get the raw html retrieved.

API Results

JSON Results

JSON output includes structured data for "Images Results", "Related Searches", "Suggested Searches", "Refined Searches", and "Shopping Results".

A search status is accessible through search_metadata.status. It flows this way: Processing -> Success || Error. If a search has failed, error will contain an error message. search_metadata.id is the search ID inside SerpApi.

HTML Results

HTML output is useful to debug JSON results or support features not supported yet by SerpApi.
HTML output gives you the raw HTML results from Bing Images.

API Examples

JSON structure overview

{
  ...
  "images_results": [
    {
      "thumbnail": "String - URL to the image thumbnail",
      "position": "Integer - Position of the image result",
      "title": "String - Title of the image result",
      "link": "String - URL to the image result",
      "size": "String - Size of the image result",
      "original": "String - URL to the original upload of the image result",
      "source": "String - Source URL of the website containing the image result",
      "domain": "String - Domain of the website containing the image result",
      "description": "String - Description of the image result",
      "badges": "String - Badges of the image result",
    }
  ],
  "related_searches": [
    {
      "thumbnail": "String - URL to the related search thumbnail",
      "link": "String - URL to the related search",
      "name": "String - Related query (e.g. `Drip Coffee`)",
      "serpapi_link": "String - URL to SerpApi Bing Images Scraper API"
    }
  ],
  "suggested_searches": [
    {
      "thumbnail": "String - URL to the suggested search thumbnail",
      "link": "String - URL to the suggested search",
      "name": "String - Suggested query (e.g. `Coffee Mug`)",
      "serpapi_link": "String - URL to SerpApi Bing Images Scraper API"
    }
  ],
  "refined_searches": [
    {
      "thumbnail": "String - URL to the refined search thumbnail",
      "link": "String - URL to the refined search",
      "name": "String - Refined query (e.g. `Drip`)",
      "serpapi_link": "String - URL to SerpApi Bing Images Scraper API"
    }
  ],
  "shopping_results": [
    {
      "position": "Integer - Position of the item result",
      "link": "String - URL to the item",
      "price": "String - Price to the item",
      "list_price": "String - List price to the item",
      "title": "String - Title of the item result",
      "seller": "String - Seller's name of the item result",
      "thumbnail": "String - URL to the item thumbnail",
      "badges": "String - Badges of the item",
      "shipping": "String - Shipping method of the item",
      "rating": "Integer - Rating of the item",
      "reviews": "Integer - Reviews of the item",
      "reviews_source": "String - Reviews source of the item",
    }
  ],
  ...
}

Example results for coffee

Images results can contain thumbnail, link, title, original, source, size, domain, description, badgesand position.

Example results for coffee

JSON Example

  {
    "search_metadata": {
      "id": "6357afff94489355d5b29581",
      "status": "Success",
      "json_endpoint": "https://serpapi.com/searches/a9d4ef3b55be6672/6357afff94489355d5b29581.json",
      "created_at": "2022-10-25 09:44:31 UTC",
      "processed_at": "2022-10-25 09:44:31 UTC",
      "bing_images_url": "https://www.bing.com/images/search?q=coffee",
      "raw_html_file": "https://serpapi.com/searches/a9d4ef3b55be6672/6357afff94489355d5b29581.html",
      "total_time_taken": 2.74
    },
    "search_parameters": {
      "engine": "bing_images",
      "q": "coffee",
      "device": "desktop"
    },
    "images_results": [
      {
        "thumbnail": "https://tse4.mm.bing.net/th/id/OIP.kg4U-Xs8bC2Yds7btpaG5QHaHa?w=161&h=180&c=7&r=0&o=5&pid=1.7",
        "link": "<Link to the image>",
        "title": "Coffee ★ - Coffee photo (38175763) - f…",
        "size": "2048 x 2048 · jpeg",
        "source": "http://fr.fanpop.com/clubs/coffee/images/38175763/title/coffee-photo",
        "domain": "fr.fanpop.com",
        "original": "http://images6.fanpop.com/image/photos/38100000/-Coffee-coffee-38175763-2048-2048.jpg",
        "position": 1
      },
      {
        "thumbnail": "https://tse2.mm.bing.net/th/id/OIP.8rurpMYrhTkrdnABbdHoUAHaEo?w=258&h=180&c=7&r=0&o=5&pid=1.7",
        "link": "<Link to the image>",
        "title": "Coffee - Coffee Wallpaper (13874569) - Fanpop",
        "size": "1920 x 1200 · jpeg",
        "source": "http://www.fanpop.com/clubs/coffee/images/13874569/title/coffee-wallpaper",
        "domain": "fanpop.com",
        "original": "http://images2.fanpop.com/image/photos/13800000/Coffee-coffee-13874569-1920-1200.jpg",
        "description": "coffee fanpop cafe 1920",
        "position": 2
      },
      {
        "thumbnail": "https://tse1.mm.bing.net/th/id/OIP.eP1-HmBq611zm6bpgU2UWAHaD8?w=302&h=180&c=7&r=0&o=5&pid=1.7",
        "link": "<Link to the image>",
        "title": "Coffee | Fact# 31631 | FactRepublic.com",
        "size": "620 x 330 · jpeg",
        "source": "https://factrepublic.com/facts/31631/",
        "domain": "factrepublic.com",
        "original": "https://i0.wp.com/factrepublic.com/wp-content/uploads/2020/06/8.Coffee.jpg",
        "description": "factrepublic",
        "position": 3
      },
      ...
    ],
    "suggested_searches": [
      {
        "thumbnail": "https://tse1.mm.bing.net/th?q=Coffee+Styles&w=42&h=42&c=7&rs=1&p=0&o=5&pid=1.7&mkt=en-US&cc=US&setlang=en&adlt=moderate&t=1",
        "link": "https://www.bing.com/images/search?q=Coffee+Styles&FORM=RESTAB",
        "serpapi_link": "https://serpapi.com/search.json?device=desktop&engine=bing_images&q=Coffee+Styles",
        "name": "Coffee Styles"
      },
      {
        "thumbnail": "https://tse3.mm.bing.net/th?q=Italian+Coffee&w=42&h=42&c=7&rs=1&p=0&o=5&pid=1.7&mkt=en-US&cc=US&setlang=en&adlt=moderate&t=1",
        "link": "https://www.bing.com/images/search?q=Italian+Coffee&FORM=RESTAB",
        "serpapi_link": "https://serpapi.com/search.json?device=desktop&engine=bing_images&q=Italian+Coffee",
        "name": "Italian Coffee"
      },
      {
        "thumbnail": "https://tse4.mm.bing.net/th?q=Coffee+Mug&w=42&h=42&c=7&rs=1&p=0&o=5&pid=1.7&mkt=en-US&cc=US&setlang=en&adlt=moderate&t=1",
        "link": "https://www.bing.com/images/search?q=Coffee+Mug&FORM=RESTAB",
        "serpapi_link": "https://serpapi.com/search.json?device=desktop&engine=bing_images&q=Coffee+Mug",
        "name": "Coffee Mug"
      },
      ...
    ],
    "serpapi_pagination": {
      "next": "https://serpapi.com/search.json?count=35&device=desktop&engine=bing_images&first=36&q=coffee",
      "current": "https://serpapi.com/search.json?device=desktop&engine=bing_images&q=coffee"
    }
  }

Example results for macbook

Some search result might contain shopping_results and related_searches

Example results for macbook

JSON Example

  {
    "search_metadata": {
      "id": "6357b2bc94489355d5b29582",
      "status": "Success",
      "json_endpoint": "https://serpapi.com/searches/2014577a11af2730/6357b2bc94489355d5b29582.json",
      "created_at": "2022-10-25 09:56:12 UTC",
      "processed_at": "2022-10-25 09:56:12 UTC",
      "bing_images_url": "https://www.bing.com/images/search?q=macbook",
      "raw_html_file": "https://serpapi.com/searches/2014577a11af2730/6357b2bc94489355d5b29582.html",
      "total_time_taken": 2.46
    },
    "search_parameters": {
      "engine": "bing_images",
      "q": "macbook",
      "device": "desktop"
    },
    "images_results": [
      {
        "thumbnail": "https://serpapi.com/searches/6357b2bc94489355d5b29582/images/0ed2e92a3b29f18f007fd69172bea2472acbadcec9ef3f78f08b4d0d939395f6.gif",
        "link": "<Link to the image>",
        "title": "Apple: Končíme s opravami MacBooků z let 2013 a 2014, jsou zastaralé – Letem světe…",
        "size": "2016 x 1512 · jpeg",
        "source": "https://www.letemsvetemapplem.eu/2020/05/13/apple-koncime-s-opravami-macbooku-z-let-2013-a-2014-jsou-zastarale/",
        "domain": "letemsvetemapplem.eu",
        "original": "https://www.letemsvetemapplem.eu/wp-content/uploads/2020/05/macbook-2013.jpg",
        "position": 1
      },
      {
        "thumbnail": "https://serpapi.com/searches/6357b2bc94489355d5b29582/images/0ed2e92a3b29f18f744e816940abcce58b9a3293e151813309d009f90574ef5e.gif",
        "link": "<Link to the image>",
        "title": "Top Laptop: January 2011",
        "size": "400 x 319 · jpeg",
        "source": "http://top-laptop789.blogspot.com/2011_01_01_archive.html",
        "domain": "top-laptop789.blogspot.com",
        "original": "http://1.bp.blogspot.com/_iFwJ86zvGY4/TSwwOgJNxpI/AAAAAAAAAAc/vExe_nkjjnE/s400/apple_macbook.jpg",
        "description": "macbook apple january tuesday",
        "position": 2
      },
      {
        "thumbnail": "https://serpapi.com/searches/6357b2bc94489355d5b29582/images/0ed2e92a3b29f18f05ef4a8ce56ac5a7a80bc1b3eb6c94bef4b39093a01ae1b4.gif",
        "link": "<Link to the image>",
        "title": "MacBook",
        "size": "500 x 500 · jpeg",
        "source": "https://artem.myshopunity.com/220/d_seo_module/macbook",
        "domain": "artem.myshopunity.com",
        "original": "https://artem.myshopunity.com/220/d_seo_module/image/cache/catalog/demo/macbook_1-500x500.jpg",
        "description": "macbook",
        "position": 3
      },
      ...
    ],
    "suggested_searches": [
      {
        "thumbnail": "https://tse4.mm.bing.net/th?q=Black+MacBook&w=42&h=42&c=7&rs=1&p=0&o=5&pid=1.7&mkt=en-US&cc=US&setlang=en&adlt=moderate&t=1",
        "link": "https://www.bing.com/images/search?q=Black+MacBook&FORM=RESTAB",
        "serpapi_link": "https://serpapi.com/search.json?device=desktop&engine=bing_images&q=Black+MacBook",
        "name": "Black MacBook"
      },
      {
        "thumbnail": "https://tse3.mm.bing.net/th?q=New+Apple+MacBook+Air&w=42&h=42&c=7&rs=1&p=0&o=5&pid=1.7&mkt=en-US&cc=US&setlang=en&adlt=moderate&t=1",
        "link": "https://www.bing.com/images/search?q=New+Apple+MacBook+Air&FORM=RESTAB",
        "serpapi_link": "https://serpapi.com/search.json?device=desktop&engine=bing_images&q=New+Apple+MacBook+Air",
        "name": "New Apple MacBook Air"
      },
      {
        "thumbnail": "https://tse1.mm.bing.net/th?q=Laptop+Apple+MacBook&w=42&h=42&c=7&rs=1&p=0&o=5&pid=1.7&mkt=en-US&cc=US&setlang=en&adlt=moderate&t=1",
        "link": "https://www.bing.com/images/search?q=Laptop+Apple+MacBook&FORM=RESTAB",
        "serpapi_link": "https://serpapi.com/search.json?device=desktop&engine=bing_images&q=Laptop+Apple+MacBook",
        "name": "Laptop Apple MacBook"
      },
      ...
    ],
    "shopping_results": [
      {
        "thumbnail": "https://tse2.mm.bing.net/th?id=OP.ttYCLJ2%2f3mVc2Q474C474&w=160&h=160&rs=1&o=5&pid=21.1",
        "link": "<Link to the item>",
        "price": "$692.99",
        "title": "Macbook Air 13 (2020) Good",
        "seller": "ItsWorthMore.com",
        "views": "Refurbished",
        "position": 1
      },
      {
        "thumbnail": "https://tse1.mm.bing.net/th/id/OP.Tt0fVG1DzlfPiw474C474?w=160&h=160&rs=1&o=5&pid=21.1",
        "link": "<Link to the item>",
        "price": "$1,039.99",
        "title": "Macbook Air 13 (2022) Excellent",
        "seller": "ItsWorthMore.com",
        "views": "Refurbished",
        "position": 2
      },
      {
        "thumbnail": "https://tse4.mm.bing.net/th?id=OP.F%2f0ep5IdjJKOPA474C474&w=200&h=160&rs=1&o=5&pid=21.1",
        "link": "<Link to the item>",
        "price": "$149.00",
        "title": "Used Apple A Grade Macbook Pro 13.3-Inch Laptop (Glossy) 2.4Ghz Dual Core i5 (Late 2011) Md313ll/A 320 GB HD 4 GB Memory 1280X800 Display Macos Sierra",
        "seller": "Walmart",
        "shipping": "Free shipping",
        "position": 3
      },
      ...
    ],
    "serpapi_pagination": {
      "next": "https://serpapi.com/search.json?count=35&device=desktop&engine=bing_images&first=36&q=macbook",
      "current": "https://serpapi.com/search.json?device=desktop&engine=bing_images&q=macbook"
    }
  }