Bing video search API
Videos across hosts for a query: title, URL, thumbnail, duration, views, upload date, host and creator.
GET /v1/bing/videosBeta2 credits per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/bing/videos?query=coffee",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 2 credits{ "query": "coffee", "value": [ { "name": "Coffee Is Complicated. Here's What Actually Matters.", "contentUrl": "https://www.youtube.com/watch?v=uyljs-E2VhY", "thumbnailUrl": "https://th.bing.com/th/id/OVP.e0CaBybqwuNpP-4SADRK2wHgFo?w=354&h=199&c=7&rs=1&qlt=70&o=7&pid=2.1&rm=3", "duration": "27:47", "viewCount": "507.4K views", "datePublished": "2 weeks ago", "publisher": "YouTube", "creator": "Ethan Chlebowski" }, { "name": "Coffee and what it does to your body - BBC World Service", "contentUrl": "https://www.youtube.com/watch?v=62wEk02YKs0", "thumbnailUrl": "https://th.bing.com/th/id/OVP.ftKhyyb5vzSvdsAcvRE7UQHgFo?w=354&h=199&c=7&rs=1&qlt=70&o=7&pid=2.1&rm=3", "duration": "06:18", "viewCount": "4.5M views", "datePublished": "May 16, 2024", "publisher": "YouTube", "creator": "BBC World Service" }, "… 28 more" ]}Parameters
| Name | Type | Description |
|---|---|---|
queryquery · required | string | |
marketquery | string | Bing market, e.g. en-US, de-DE (default en-US). |
countryquery | string | |
languagequery | string | |
safe_searchquery | "strict" | "moderate" | "off" | One of strict, moderate, off. |
limitquery | integer |
Status codes
| Status | Meaning |
|---|---|
200 | Videos. |
400 | Invalid input. Nothing was charged. |
401 | Missing or invalid API key. |
402 | Not enough credits, a spend cap was reached, or payment is required. |
403 | The target is private, or the account is suspended. |
404 | Bing has nothing for that search. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | Bing is temporarily unavailable. Retryable; nothing was charged. |
Every error has code, message, hint and retryable. All error codes
Questions
Only YouTube?
No: every host Bing indexes.
Bing is a trademark of Microsoft Corporation. We are not affiliated with or endorsed by Microsoft.