100 free credits. No credit card required. Get a key

Bing image search API

Bing Images for a query with full-size URL, thumbnail, host page, size and format, and Bing’s size, type, aspect, color, face, license and time filters.

GET /v1/bing/imagesBeta1 credit per callRefunded on failure
import os, requests

res = requests.get(
    "https://api.groundsocial.dev/v1/bing/images?query=mountain&size=large&aspect=wide",
    headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()
Response
200 · 1 credit
{
"query": "mountain",
"value": [
{
"name": "Mountain Ranges Covered in Snow · Free Stock Photo",
"contentUrl": "https://images.pexels.com/photos/714258/pexels-photo-714258.jpeg?cs=srgb&dl=mountain-ranges-covered-in-snow-714258.jpg&f…",
"thumbnailUrl": "https://ts3.mm.bing.net/th?id=OIP.fa_S7cQ6EC1acIe8UupsAAHaE8&pid=15.1",
"hostPageUrl": "https://www.pexels.com/photo/mountain-ranges-covered-in-snow-714258/",
"hostPageDomain": "www.pexels.com",
"width": 3972,
"height": 2648,
"description": "Mountain Ranges Covered in Snow · Free Stock Photo"
},
{
"name": "[4500+] Mountain Scenery Wallpapers | Wallpapers.com",
"contentUrl": "https://wallpapers.com/images/hd/mountain-scenery-qli7w0b0sohvnzog.jpg",
"thumbnailUrl": "https://ts3.mm.bing.net/th?id=OIP.tmjblg4Eo1IUomWc08xpRwHaEo&pid=15.1",
"hostPageUrl": "https://wallpapers.com/mountain-scenery",
"hostPageDomain": "wallpapers.com",
"width": 1920,
"height": 1200,
"description": "[4500+] Mountain Scenery Wallpapers | Wallpapers.com"
},
"… 33 more"
],
"next_cursor": "35"
}

Parameters

NameTypeDescription
queryquery · requiredstring
marketquerystringBing market, e.g. en-US, de-DE (default en-US).
countryquerystring
languagequerystring
safe_searchquery"strict" | "moderate" | "off"One of strict, moderate, off.
time_rangequery"any" | "day" | "week" | "month" | "year"One of any, day, week, month, year.
sizequery"small" | "medium" | "large" | "wallpaper"One of small, medium, large, wallpaper.
typequery"photo" | "clipart" | "linedrawing" | "animatedgif" | "transparent"One of photo, clipart, linedrawing, animatedgif, transparent.
aspectquery"square" | "wide" | "tall"One of square, wide, tall.
colorquery"color" | "bw" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "purple" | "pink" | "brown" | "black" | "gray" | "white"One of color, bw, red, orange, yellow, green, teal, blue, purple, pink, brown, black, gray, white.
facequery"face" | "portrait"One of face, portrait.
licensequery"creative_commons"One of creative_commons.
limitqueryinteger
cursorquerystring
Status codes
StatusMeaning
200Images.
400Invalid input. Nothing was charged.
401Missing or invalid API key.
402Not enough credits, a spend cap was reached, or payment is required.
403The target is private, or the account is suspended.
404Bing has nothing for that search.
429Too many requests. Wait for Retry-After seconds.
503Bing is temporarily unavailable. Retryable; nothing was charged.

Every error has code, message, hint and retryable. All error codes

Questions

Paging?

Pass next_cursor as cursor.

Bing is a trademark of Microsoft Corporation. We are not affiliated with or endorsed by Microsoft.