> For the complete documentation index, see [llms.txt](https://docs.serphouse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.serphouse.com/bing-apis/bing-search-api.md).

# Bing Search API

Access real-time web search data from Bing, delivering relevant search results from a wide range of websites and online sources.

{% hint style="danger" %}
Requires authentication
{% endhint %}

<mark style="color:green;">`POST`</mark> `https://api.serphouse.com/bing-web`

#### Path Parameters

| Name         | Type   | Description                          |
| ------------ | ------ | ------------------------------------ |
| responseType | String | responseType can be 'html' or 'json' |

#### Headers

| Name                                            | Type   | Description              |
| ----------------------------------------------- | ------ | ------------------------ |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer \<YOUR\_API\_KEY> |
| Content-Type<mark style="color:red;">\*</mark>  | String | application/json         |

#### Request Body

<table><thead><tr><th>Name</th><th>Type</th><th width="222">Description</th></tr></thead><tbody><tr><td>q<mark style="color:red;">*</mark></td><td>string</td><td>Search phrase that you want to search</td></tr><tr><td>lang<mark style="color:red;">*</mark></td><td>string</td><td>You can set language for e.g. <code>en-IN</code> for english <code>fr-FR</code> for french.<br>Get the list of available languages by making a separate request to the <a href="/pages/T3o6bzC5LzinD9qIGamk">List of Language</a></td></tr><tr><td>device<mark style="color:red;">*</mark></td><td>string</td><td>Device can be <code>desktop</code> To extract desktop result <code>mobile</code> To extract mobile result</td></tr><tr><td>loc<mark style="color:red;">*</mark></td><td>string</td><td>Optional field if you specify <code>loc_id</code><br><strong>You must choose one of the fields: <code>loc_id</code> or <code>loc</code></strong><br>You can receive the list of available locations of search engines with their loc_id by making a separate request to the  <a href="/pages/jHif4hVWEf1ax1cYtvip">List of Locations</a></td></tr><tr><td>loc_id<mark style="color:red;">*</mark></td><td>integer</td><td>Optional field if you specify <code>loc</code><br><strong>you must choose one of the fields: <code>loc_id</code> or <code>loc</code></strong><br>You can receive the list of available locations of search engines with their loc_id by making a separate request to the<br><a href="/pages/jHif4hVWEf1ax1cYtvip">List of Locations</a> </td></tr><tr><td>page</td><td>integer</td><td>Give specific page to get the result of that page number. By default it will get you first page.</td></tr><tr><td>date_range</td><td>String</td><td><p>Sometimes you may want to only find information published during a specific time frame.</p><p>Parameter values can be comma seprated date range <code>YYYY-MM-DD,YYYY-MM-DD</code> OR</p><p><code>d</code> Past 24 hours</p><p><code>w</code> Past week</p><p><code>m</code> Past month</p><p><code>y</code> Past year</p></td></tr><tr><td>no_trace</td><td>string | integer</td><td>Enterprise only. Enables NoTrace mode. Accepted values: <code>0</code>, <code>1</code>, <code>true</code>, and <code>false</code>. When enabled (<code>1</code> or <code>true</code>), search parameters, files, and metadata are not stored on our servers.</td></tr></tbody></table>

{% tabs %}
{% tab title="200: OK" %}

```json
{
    "status": "error",
    "msg": "Please try again",
    "error": ""
}
```

{% endtab %}

{% tab title="200: OK" %}

```json
{
    "status": "success",
    "msg": "Completed",
    "results": {
        "search_metadata": {
            "id": 245725463,
            "status": "success",
            "created_at": "2026-06-17T09:48:27.000000Z",
            "processed_at": "2026-06-17 09:48:27"
        },
        "search_parameters": {
            "domain": "bing.com",
            "lang": "en-US",
            "country": "US",
            "location": "United States",
            "q": "Coffee",
            "device": "desktop",
            "url": "https://www.bing.com/search?q=Coffee&form=QBLH&cc=US&setlang=en-US&count=100",
            "page": "1",
            "num": 10,
            "ie": "UTF-8"
        },
        "results": {
            "search_information": [
                {
                    "total_results": "198,000"
                }
            ],
            "ads": [
                {
                    "position": 1,
                    "block_position": "top",
                    "title": "Premium Coffee Awaits You | Your Bean Paradise Here!",
                    "link": "https://www.bing.com/aclk?ld=e8o885gsiKtAM02Vc2F34kejVUCUxCcf4BIWPXjxtAO3w0FQGXdXuzN7B19cWI68BD0MYVQJxga998-TkcQfnlH0M1FmLAgzSW4ZkhH3UZ4WLYrsqyov2eO2SOphWtW-g8AiOff-9NqEYD5K4eJ1YiIcTaZ9DZdC_HS1veg43puYN01aSSJpp8XVPjM4cURM-FOFD55B967I5_8sXEFgrRVILRb7g&amp;u=aHR0cHMlM2ElMmYlMmZ3d3cuZ2VudWluZW9yaWdpbi5jb20lM2Ztc2Nsa2lkJTNkNGFmNTEwMWI4OTc0MWUzYmM1MWI3YTI5ZTQxMzYwMTA&amp;rlid=4af5101b89741e3bc51b7a29e4136010&amp;ntb=1",
                    "displayed_link": "https://www.genuineorigin.com",
                    "description": "Sponsored  Shop now for premium green coffee beans from the finest coffee origins worldwide! Shop online for green coffee from 20 origins. Get Free Delivery to your roastery\nTypes: Organic Green Coffees, Micro-lots, Decaf, Roastery Essentials\n"
                },
                {
                    "position": 2,
                    "block_position": "top",
                    "title": "Buy Coffee on Amazon.com | Amazon®  Official Site",
                    "link": "https://www.bing.com/aclk?ld=e8hN1bUMI8cilfcOA_eVL3uDVUCUwQc-sobLEcX997ICWVlCKRE--Mwv7HxEIMag52kykTBs1hYxuaSc50Iu8b3xuUF_ViDJdZdLMeiq6l9ggTJq5-GP4VVe85ItoqHDbfEKPzUDxfsY5CKeQkbGxisr-6OnsDBlo6nfYfm-4labt_InLxgSZl1g3NxJHM9Ndv7EZOaQ-UAivmgsENdTVAYze_19w&amp;u=aHR0cHMlM2ElMmYlMmZ3d3cuYW1hem9uLmNvbSUyZnMlMmYlM2ZpZSUzZFVURjglMjZrZXl3b3JkcyUzZGNvZmZlZSUyNmluZGV4JTNkYXBzJTI2dGFnJTNkbWgwYi0yMCUyNnJlZiUzZHBkX3NsXzZpbmlpbnNmdV9lJTI2YWRncnBpZCUzZDEzNDY5MDQzMDIwODY2NzElMjZodmFkaWQlM2Q4NDE4MTgwMjg5MTYyNiUyNmh2bmV0dyUzZG8lMjZodnFtdCUzZGUlMjZodmJtdCUzZGJlJTI2aHZkZXYlM2RjJTI2aHZsb2NpbnQlM2QlMjZodmxvY3BoeSUzZDQ1OTQwJTI2aHZ0YXJnaWQlM2Rrd2QtODQxODI3MjQ0Mjk5NTglM2Fsb2MtMTkwJTI2aHlkYWRjciUzZDI2MDMxXzEzNzUxMjU2JTI2bWNpZCUzZDZjY2E2MDAyOGQ4NTNmMzg4Y2M0MzFjZWMyNjdhNzQzJTI2bXNjbGtpZCUzZGNiNjAyNmM3ZDllNTFkMGU3NDIwNGNmNWI0ODIxNjc1&amp;rlid=cb6026c7d9e51d0e74204cf5b4821675&amp;ntb=1",
                    "displayed_link": "https://www.amazon.com › Shop › coffee",
                    "description": "Sponsored  Delight your senses with our premium coffee selection. Elevate your daily routine. Order now and enjoy the convenience of cafe-quality coffee, delivered to your door.\n"
                },
                {
                    "position": 3,
                    "block_position": "bottom",
                    "title": "Coffee made easy | Take your pick of pods",
                    "link": "https://www.bing.com/aclk?ld=e89CBl8TSJioE4kKT0vNm6jTVUCUzLc9iRsFSgjsRz0RGu1L4tqKsk_5cWOBRt8E6CiZy40MmhhfX_elgikIEXAueoUfGVWzhiZLGJtLkOwZT4ZU23ggfOQTCS6UmDziCEGyzL14Ba_5kjYK41kv9-uSkn7uwlTcbV8Bkx0SPTXw6hgvw5REoA9ftr0jU3Fn6UHn6obFs8PQpmOPgA1hVrH_YhtsI&amp;u=aHR0cHMlM2ElMmYlMmZ3d3cuY29mZmVlaG91c2VleHByZXNzLmNvbSUyZmMlMmZjb2ZmZWUtcG9kcy5odG1sJTNmUGVyX1BhZ2UlM2QxMiUyNlNvcnRfQnklM2RkaXNwX29yZGVyJTI2YnJhbmQlM2RCYXJvbmV0JTI2X3ZzcmVmZG9tJTNkYWR3b3JkcyUyNm1zY2xraWQlM2RmN2M5MTM5ZWJkZjgxYzA1NmQyNTc5YWNkMDlmM2Y2NSUyNnV0bV9zb3VyY2UlM2RiaW5nJTI2dXRtX21lZGl1bSUzZGNwYyUyNnV0bV9jYW1wYWlnbiUzZCoqTFAlMjUyMEJyYW5kcyUyNTIwLSUyNTIwQSUyNnV0bV90ZXJtJTNkY29mZmVlJTI1MjBpbiUyNTIwcG9kcyUyNnV0bV9jb250ZW50JTNkKkJhcm9uZXQlMjUyMENvZmZlZSUyNTIwUG9k&amp;rlid=f7c9139ebdf81c056d2579acd09f3f65&amp;ntb=1",
                    "displayed_link": "https://www.coffeehouseexpress.com › Baronet_Pods",
                    "description": "Sponsored  For More Than 60 Years We Have Served Customers With The Best Coffee And Tea Products. We Are A One Stop Shop For Your Home, Office, Or Hospitality Coffee Supplies. Shop Now!\n"
                },
                {
                    "position": 4,
                    "block_position": "bottom",
                    "title": "Java Coffee - Dark Roast Coffee Pods",
                    "link": "https://www.bing.com/aclk?ld=e8T6NO97yWY_QM1hXlJL2B2jVUCUzIij9M9Ysmgs9etYqk_QGd6QWP5VyeUAmzhRpK2LxB2aeLVO2y05Bf9MOwnE9otNI20489tDi9Vyzhh-3ik08eRMxY_Rvmbs5qBt9nBK7c6M4E6GBy44hwgpNXte1cbNQ3Tagz0U3NWWoNDH9ptW0HKeYbvXn9_SpfQgX3M7lakC5qMoPd0U_fkjYfzOGiCFY&amp;u=aHR0cHMlM2ElMmYlMmZ3d3cua3JvZ2VyLmNvbSUyZnAlMmZqYXZhLWZhY3RvcnktZXh0cmEtYm9sZC1kb3VibGUtY2FmZmluYXRlZC1jb2ZmZWUtcG9kcy1kYS1ib21iLTQwLWNvdW50JTJmMDA4MTA2ODMwMjA4MiUzZmdjbGlkJTNkNjFjYTlkZDQzNmJjMTY2OWY1NmNmN2U2NWJkYjc1NzMlMjZnY2xzcmMlM2QzcC5kcyUyNiUyNmNpZCUzZHBzLnBhaS5tc19jb3JldGV4dF9wJTNhYXdhcl8yMDI2MDAwMF9yJTNhMF90JTNhZW50X2IlM2FhbGxfZSUzYTBfZiUzYUZZMjQuMDFfc2VhcmNoX2VudF9zYWxlcy5uaF9hbGxlbnQubmFfY29yZXRleHRfa3JvZ2VyLnQxX2JfZHNhX2FsbF9hY3FfZXZnbl9hbGxfYWxsX3Jldl9yb2FzX3NmX2JldmVyYWdlcyUyNm1zY2xraWQlM2Q2MWNhOWRkNDM2YmMxNjY5ZjU2Y2Y3ZTY1YmRiNzU3Mw&amp;rlid=61ca9dd436bc1669f56cf7e65bdb7573&amp;ntb=1",
                    "displayed_link": "https://www.kroger.com",
                    "description": "Sponsored  Explore juice, coffee, tea, sodas, nutrition drinks, water &amp; more at Kroger®. Get the app &amp; save $20 on your first pickup or delivery order of $75+. Shop now!\nAmenities: Curbside Pickup, Delivery, Browse Available Items, Low Prices, Weekly Deal\n"
                },
                {
                    "position": 5,
                    "block_position": "bottom",
                    "title": "Nespresso | Up to 40% Off Vertuo Machines",
                    "link": "https://www.bing.com/aclk?ld=e87fo8umSqrXzlqT_6-2jFmzVUCUwSTLxKDwcgq8OKuRrQi_Lf_HyhBIx_ib5gvPre9uJexA3FnNfOT7zeW_sjJ0kiS91q-MMMKQI2ILUzwZqJ7O3TjvBHG0FDUIa_0AodvNrpEWOL853ca2PXbVMgGq-li5CMM7uf_fjFsemXm7SBvozuYXlmn0-iCS0OdkorOCyTtx7urmVo_fNKFBJbgktbAoE&amp;u=aHR0cHMlM2ElMmYlMmZ3d3cubmVzcHJlc3NvLmNvbSUyZnVzJTJmZW4lMmZ2ZXJ0dW8tY29mZmVlLW1hY2hpbmVzJTNmZ2NsaWQlM2RlY2NiMTU3NmQxN2UxMWY0NDNiMDdmNDRiYzE5NTM4NiUyNmdjbHNyYyUzZDNwLmRzJTI2bXNjbGtpZCUzZGVjY2IxNTc2ZDE3ZTExZjQ0M2IwN2Y0NGJjMTk1Mzg2&amp;rlid=eccb1576d17e11f443b07f44bc195386&amp;ntb=1",
                    "displayed_link": "https://www.nespresso.com",
                    "description": "Sponsored  Brew All Your Iced Coffee Faves with Up to 40% on Select Vertuo Machines &amp; Pop+ from $99. Become Your Own Barista and Create the Perfect Coffee From the Comfort of Your Home.\n"
                }
            ],
            "organic": [
                {
                    "position": 1,
                    "title": "Coffee - Wikipedia",
                    "link": "https://www.bing.com/ck/a?!&&p=b002a445a2c24ebd670a3d138665b32c039ce02273175ba04951b627d8d4c6deJmltdHM9MTc4MTY1NDQwMA&ptn=3&ver=2&hsh=4&fclid=0ef1ad5e-fd75-64cd-3a8c-ba25fcad6507&u=a1aHR0cHM6Ly9lbi53aWtpcGVkaWEub3JnL3dpa2kvQ29mZmVl&ntb=1",
                    "displayed_link": "https://en.wikipedia.org › wiki › Coffee",
                    "snippet": "Coffee is a beverage brewed from roasted, ground coffee beans. Darkly colored, bitter, and slightly acidic, coffee has a stimulating effect on humans, primarily due to its caffeine content, but …"
                },
                {
                    "position": 2,
                    "title": "THE 10 BEST Cafés in Quezon City (Updated 2026) - Tripadvisor",
                    "link": "https://www.bing.com/ck/a?!&&p=13a7df794e3051fc1795b82d5702854fe9325f4647e979449bcc609a48a447f5JmltdHM9MTc4MTY1NDQwMA&ptn=3&ver=2&hsh=4&fclid=0ef1ad5e-fd75-64cd-3a8c-ba25fcad6507&u=a1aHR0cHM6Ly93d3cudHJpcGFkdmlzb3IuY29tL1Jlc3RhdXJhbnRzLWcyOTg1NzQtYzgtUXVlem9uX0NpdHlfTWV0cm9fTWFuaWxhX0x1em9uLmh0bWw&ntb=1",
                    "displayed_link": "https://www.tripadvisor.com",
                    "snippet": "Best Cafés in Quezon City, Metro Manila: Find Tripadvisor traveller reviews of Quezon City Cafés and search by price, location, and more."
                },
                {
                    "position": 3,
                    "title": "Home - ZUS Coffee",
                    "link": "https://www.bing.com/ck/a?!&&p=0aeed0cdccaec3d53b69bd29bbfa072bab94c7f9fd70476269a5a205bbb995e8JmltdHM9MTc4MTY1NDQwMA&ptn=3&ver=2&hsh=4&fclid=0ef1ad5e-fd75-64cd-3a8c-ba25fcad6507&u=a1aHR0cHM6Ly96dXNjb2ZmZWUucGgv&ntb=1",
                    "displayed_link": "https://zuscoffee.ph",
                    "snippet": "We believe that premium coffee should be accessible to everyone, and we’re committed to delivering exceptional quality at an affordable price. Handa ka na ba for the ultimate kape experience? Fuel …"
                },
                {
                    "position": 4,
                    "title": "The Best 10 Coffee &amp; Tea near Quezon City, Manila, Metro Manila",
                    "link": "https://www.bing.com/ck/a?!&&p=91118f3c872038a340b2a5431da4810edaac5b0f73a5b2e050579b2908fca777JmltdHM9MTc4MTY1NDQwMA&ptn=3&ver=2&hsh=4&fclid=0ef1ad5e-fd75-64cd-3a8c-ba25fcad6507&u=a1aHR0cHM6Ly93d3cueWVscC5jb20vc2VhcmNoP2NmbHQ9Y29mZmVlJmZpbmRfbG9jPVF1ZXpvbitDaXR5JTJDK01hbmlsYSUyQytNZXRybytNYW5pbGEmbXNvY2tpZD0wZWYxYWQ1ZWZkNzU2NGNkM2E4Y2JhMjVmY2FkNjUwNw&ntb=1",
                    "displayed_link": "https://www.yelp.com › search",
                    "snippet": "Best Coffee &amp; Tea in Quezon City, Manila, Metro Manila, Philippines - Last Updated June 2026 - The Hideout Cafe, Craft Coffee Revolution, Antonio's Coffee and Bibingka, Habitual Coffee, Cool Beans …"
                },
                {
                    "position": 5,
                    "title": "Best Coffee &amp; Cafes near Quezon City, Manila, Metro Manila ... - Yelp",
                    "link": "https://www.bing.com/ck/a?!&&p=d3181fbee99cffd0bd673206fa1ccb6874cd16616a8d6910a97db4f7b7f407b7JmltdHM9MTc4MTY1NDQwMA&ptn=3&ver=2&hsh=4&fclid=0ef1ad5e-fd75-64cd-3a8c-ba25fcad6507&u=a1aHR0cHM6Ly93d3cueWVscC5jb20vc2VhcmNoP2ZpbmRfZGVzYz1Db2ZmZWUrJTI2K0NhZmVzJmZpbmRfbG9jPVF1ZXpvbitDaXR5JTJDK01hbmlsYSUyQytNZXRybytNYW5pbGEmbXNvY2tpZD0wZWYxYWQ1ZWZkNzU2NGNkM2E4Y2JhMjVmY2FkNjUwNw&ntb=1",
                    "displayed_link": "https://www.yelp.com › search",
                    "snippet": "We Ranked the Top 10 Best Coffee &amp; Cafes near Quezon City, Manila, Metro Manila, Philippines - Last Updated June 2026 - Yelp - The Hideout Cafe, Cafe I'm Here, Figaro Coffee"
                },
                {
                    "position": 6,
                    "title": "23 Best Cafes in Manila for Coffee, Brunch, &amp; Dessert",
                    "link": "https://www.bing.com/ck/a?!&&p=16b735649ba7ae12ed55c41d2b64cdfc75f787cece3bafeb45906d97dfc4f48eJmltdHM9MTc4MTY1NDQwMA&ptn=3&ver=2&hsh=4&fclid=0ef1ad5e-fd75-64cd-3a8c-ba25fcad6507&u=a1aHR0cHM6Ly93d3cudHJpcHppbGxhLnBoL2Jlc3QtY2FmZXMtbWV0cm8tbWFuaWxhLzg5ODY&ntb=1",
                    "displayed_link": "https://www.tripzilla.ph › best-cafes-metro-manila",
                    "snippet": "Sep 14, 2025 &nbsp;· If you’re a coffee lover, definitely make a beeline for Metro Manila. The Philippines’ capital region has quite the burgeoning coffee scene, after all. From hipster coffee shops to trendy …"
                },
                {
                    "position": 7,
                    "title": "15+ Best Cafes in Quezon City for Your Perfect Coffee Break",
                    "link": "https://www.bing.com/ck/a?!&&p=9d99c0f5f6116d5718da23f43a396dbd48f7ac57f4c11f5107a7e1038b79f935JmltdHM9MTc4MTY1NDQwMA&ptn=3&ver=2&hsh=4&fclid=0ef1ad5e-fd75-64cd-3a8c-ba25fcad6507&u=a1aHR0cHM6Ly93d3cub3ZlcmhlcmVtYW5pbGEuY29tL2Jlc3QtY2FmZXMtaW4tcXVlem9uLWNpdHkv&ntb=1",
                    "displayed_link": "https://www.overheremanila.com › best-cafes-in-quezon-city",
                    "snippet": "Jul 15, 2025 &nbsp;· Need a good cup of coffee and a cozy place to escape the chaos of Manila? Quezon City has plenty of great cafés to choose from. From remote work spots with strong Wi-Fi to cafés with …"
                },
                {
                    "position": 8,
                    "title": "7 Healthiest Ways to Drink Coffee for Maximum Benefits, According to …",
                    "link": "https://www.bing.com/ck/a?!&&p=a4711602784e38bb5bac309eb4e47bc6a723638c3cee80fb2c49d65edced1de9JmltdHM9MTc4MTY1NDQwMA&ptn=3&ver=2&hsh=4&fclid=0ef1ad5e-fd75-64cd-3a8c-ba25fcad6507&u=a1aHR0cHM6Ly93d3cudmVyeXdlbGxoZWFsdGguY29tL2hlYWx0aGllc3Qtd2F5cy10by1kcmluay15b3VyLWNvZmZlZS0xMTkzNzI4OA&ntb=1",
                    "displayed_link": "https://www.verywellhealth.com",
                    "snippet": "Apr 7, 2026 &nbsp;· What you add to your coffee could have potential health perks. Coffee can be more than just a comforting morning ritual—it’s packed with antioxidants and can even provide potential health …"
                },
                {
                    "position": 9,
                    "title": "High Grounds Cafe | Quezon City - Facebook",
                    "link": "https://www.bing.com/ck/a?!&&p=e9bf2395b0752169e9d912d67455bd007edc91956c187242b7014d6524aa3a33JmltdHM9MTc4MTY1NDQwMA&ptn=3&ver=2&hsh=4&fclid=0ef1ad5e-fd75-64cd-3a8c-ba25fcad6507&u=a1aHR0cHM6Ly93d3cuZmFjZWJvb2suY29tL2hpZ2hncm91bmRzb2ZmaWNpYWwv&ntb=1",
                    "displayed_link": "https://www.facebook.com › highgroundsofficial",
                    "snippet": "Serving you til 4am every Fridays and Saturdays! See. Cafe. Grounds! Which one would you try? 🤤. Grounds! Which one would you try? …"
                },
                {
                    "position": 10,
                    "title": "The 10 Best Cafés in Quezon City - Tripadvisor",
                    "link": "https://www.bing.com/ck/a?!&&p=495a6e2542fa90ac108b4922e54c02b3734bc09eb5897cc9a43fbebc63bd67f7JmltdHM9MTc4MTY1NDQwMA&ptn=3&ver=2&hsh=4&fclid=0ef1ad5e-fd75-64cd-3a8c-ba25fcad6507&u=a1aHR0cHM6Ly93d3cudHJpcGFkdmlzb3IuY29tLnBoL1Jlc3RhdXJhbnRzLWcyOTg1NzQtYzgtUXVlem9uX0NpdHlfTWV0cm9fTWFuaWxhX0x1em9uLmh0bWw&ntb=1",
                    "displayed_link": "https://www.tripadvisor.com.ph",
                    "snippet": "Best Cafés in Quezon City, Metro Manila: Find Tripadvisor traveller reviews of Quezon City Cafés and search by price, location, and more."
                }
            ]
        }
    }
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```json
{
    "status": "error",
    "msg": "validation_error",
    "error": {
        "q": [
            "The q field is required."
        ]
    }
}
```

{% endtab %}

{% tab title="402: Payment Required" %}

```json
{
    "status": "error",
    "msg": "Your SERPHouse account has either run out of available credits (try upgrading your Plan), or there is a payment problem.",
    "error": ""
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```json
{
    "status": "error",
    "msg": "Missing required fields.",
    "error": ""
}
```

{% endtab %}

{% tab title="401: Unauthorized" %}

```json
{
    "status": "error",
    "msg": "Unauthenticated"
}
```

{% endtab %}
{% endtabs %}

## Example request:

{% tabs %}
{% tab title="BASH" %}

<pre class="language-bash"><code class="lang-bash">curl --location --request <a data-footnote-ref href="#user-content-fn-1">POST </a>'https://api.serphouse.com/bing-web' \
--header 'Authorization: Bearer &#x3C;YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "data": {
        "q": "Coffee",
        "lang": "en-US", 
        "device": "desktop",
        "loc": "United States"
    }
}'
</code></pre>

{% endtab %}

{% tab title="RUBY" %}

```ruby
require "uri"
require "json"
require "net/http"

url = URI("https://api.serphouse.com/bing-web")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Bearer <YOUR_API_KEY>"
request.body = JSON.dump({
  "data": {
    "q": "Coffee",
    "lang": "en-US",
    "device": "desktop",
    "loc": "United States"
  }
})

response = https.request(request)
puts response.read_body
```

{% endtab %}

{% tab title="PYTHON" %}

```python
import requests
import json

url = "https://api.serphouse.com/bing-web"

payload = json.dumps({
  "data": {
    "q": "Coffee",
    "lang": "en-US",
    "device": "desktop",
    "loc": "United States"
  }
})
headers = {
  'Authorization': 'Bearer <YOUR_API_KEY>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

```

{% endtab %}

{% tab title="NODE.JS" %}

```javascript
var axios = require('axios');
var data = JSON.stringify({
  "data": {
    "q": "Coffee",
    "lang": "en-US",
    "device": "desktop",
    "loc": "United States"
  }
});

var config = {
  method: 'post',
  url: 'https://api.serphouse.com/bing-web',
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': 'Bearer <YOUR_API_KEY>'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

```

{% endtab %}

{% tab title="JAVA" %}

```java

OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");

JSONObject jsonObject = new JSONObject();
JSONObject dataObject = new JSONObject();
dataObject.put("q", "Coffee");
dataObject.put("lang", "en-US");
dataObject.put("device", "desktop");
dataObject.put("loc", "United States");
jsonObject.put("data", dataObject);

String bodyJson = jsonObject.toString();
RequestBody body = RequestBody.create(mediaType,bodyJson);

Request request = new Request.Builder()
        .url("https://api.serphouse.com/bing-web")
        .method("POST", body)
        .addHeader("Content-Type", "application/json")
        .addHeader("Authorization", "Bearer <YOUR_API_KEY>")
        .build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());git
```

{% endtab %}

{% tab title="JAVASCRIPT" %}

```javascript
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <YOUR_API_KEY>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "data": {
    "q": "Coffee",
    "lang": "en-US",
    "device": "desktop",
    "loc": "United States"
  }
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://api.serphouse.com/bing-web", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
```

{% endtab %}

{% tab title="GO" %}

```go
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://api.serphouse.com/bing-web"
  method := "POST"

  payload := strings.NewReader(`{
    "data": {
        "q": "Coffee",
        "lang": "en-US",
        "device": "desktop", 
        "loc": "United States"
    }
}`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Content-Type", "application/json")
  req.Header.Add("Authorization", "Bearer <YOUR_API_KEY>")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
```

{% endtab %}

{% tab title="C#/.NET" %}

```csharp
var client = new RestClient("https://api.serphouse.com/bing-web");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "Bearer <YOUR_API_KEY>");
var body = @"{
	""data"": {
			""q"": ""Coffee"",
			""lang"": ""en-US"",
			""device"": ""desktop"",
			""loc"": ""United States""
	 }
}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
```

{% endtab %}
{% endtabs %}

[^1]:
