Bing Search API

Bing Search API uses /api/v1/search?engine=bing API endpoint to scrape real-time results.

API Parameters

Search Query

  • Name
    q
    Required
    Required
    Description

    Parameter defines the query you want to search. You can use anything that you would use in a regular Bing search. e.g. feed:, site:, AND, OR and more.

Device

  • Name
    device
    Required
    Optional
    Description

    The default parameter desktop defines the search on a desktop device. The mobile parameter defines the search on a mobile device. The tablet parameter defines the search on a tablet device.

Geographic Location

  • Name
    location
    Required
    Optional
    Description

    Parameter defines from where you want the search to originate. If several locations match the location requested, we'll pick the most popular one.
    For example - location=New York would select New York,United States or location=London would select London TV Region,England,United Kingdom.
    Head to the Locations API if you need more precise control.

  • Name
    market_code
    Required
    Optional
    Description

    Defines the country for search results. Format is language-country, like en-US. For a list of market values, check the full list of supported Bing market_code codes.

    Note: the market_code parameter can't be used together with country_code parameter.

  • Name
    lat
    Required
    Optional
    Description

    Parameter defines the latitude of the location you want to use for the search.

  • Name
    lon
    Required
    Optional
    Description

    Parameter defines the longitude of the location you want to use for the search.

Localization

  • Name
    country_code
    Required
    Optional
    Description

    Specifies the country for the search results if market_code is not specified. Check the full list of supported Bing coutry_code countries.

    Note: the country_code parameter can't be used together with market_code parameter.

  • Name
    language
    Required
    Optional
    Description

    Sets the language for user interface text. Use 2-letter (ISO 639-1) or 4-letter codes ('-'). Defaults to en (English) if unspecified or unsupported. Check the full list of supported Bing language languages.

Filters

  • Name
    filters
    Required
    Optional
    Description

    This parameter allows to use various filters to restrict search results. It supports a wide range of filtering options, including date-based:

    • ex1%3a"ez1" - data from the past 24 hours.
    • ex1%3a"ez2" - data from the past week.
    • ex1%3a"ez3" - data from the past month.
    Note: Exact values for complex filters can be constructed by performing a search on Bing and then copying the value of the filters parameter.

Pagination

  • Name
    num
    Required
    Optional
    Description

    This parameter specifies the number of results to display per page. Maximum number - 50. Use in combination with the page parameter to implement pagination functionality.

  • Name
    page
    Required
    Optional
    Description

    This parameter indicates which page of results to return. By default, it is set to 1. Use in combination with the num parameter to implement pagination.

Engine

  • Name
    engine
    Required
    Required
    Description

    Parameter defines an engine that will be used to retrieve real-time data. It must be set to bing.

API key

  • Name
    api_key
    Required
    Required
    Description

    The api_key authenticates your requests. Use it as a query parameter (https://www.searchapi.io/api/v1/search?api_key=YOUR_API_KEY) or in the Authorization header (Bearer YOUR_API_KEY).

API Examples

Full Response

Full Response
GET
https://www.searchapi.io/api/v1/search?engine=bing&location=10003%2CNew+York%2CUnited+States&q=Restaurants+near+me
Request
import requests

url = "https://www.searchapi.io/api/v1/search"
params = {
  "engine": "bing",
  "q": "Restaurants near me",
  "location": "10003,New York,United States"
}

response = requests.get(url, params = params)
print(response.text)
Response
{
  "search_metadata": {
    "id": "search_lLDb6vP7p7aJueKoA5jqWZw2",
    "status": "Success",
    "created_at": "2024-02-05T13:17:49Z",
    "request_time_taken": 1.59,
    "parsing_time_taken": 0.1,
    "total_time_taken": 1.69,
    "request_url": "https://www.bing.com/search?form=QBRE&q=Restaurants+near+me&lq=0&count=10&rdr=1",
    "html_url": "https://www.searchapi.io/api/v1/searches/search_lLDb6vP7p7aJueKoA5jqWZw2.html",
    "json_url": "https://www.searchapi.io/api/v1/searches/search_lLDb6vP7p7aJueKoA5jqWZw2"
  },
  "search_parameters": {
    "engine": "bing",
    "q": "Restaurants near me",
    "device": "desktop",
    "location": "10003,New York,United States",
    "location_used": "10003,New York,United States"
  },
  "search_information": {
    "query_displayed": "Restaurants near me",
    "page": 1,
    "detected_location": "New York, New York",
    "detected_latitude": "40.73225402832031",
    "detected_longtitude": "-73.98741149902344"
  },
  "ads": [
    {
      "position": 1,
      "block_position": "middle",
      "title": "Panera Bread | Visit Your Local Cafe Today",
      "tracking_link": "https://www.bing.com/aclk?",
      "source": "panerabread.com",
      "displayed_link": "https://www.panerabread.com",
      "snippet": "Sandwiches, soup, salad & more. Find classic flavors you love at a Panera near you. You'll find all the dishes you crave and options for everyone in the family at Panera.",
      "sitelinks": {
        "inline": [
          {
            "title": "$1 Delivery From Panera",
            "tracking_link": "https://www.bing.com/aclk?"
          },
          ...
        ]
      },
      "assets": {
        "extensions": [
          "Order in the App · Positively Good Food · Order Online · Quality Ingredients"
        ]
      }
    },
    ...
  ],
  "organic_results": [
    {
      "position": 1,
      "title": "Book the best restaurants nearby | OpenTable",
      "source": "OpenTable",
      "link": "https://www.opentable.com/nearby",
      "domain": "www.opentable.com",
      "displayed_link": "https://www.opentable.com/nearby",
      "snippet": "Restaurants near you. OpenTable connects you with the right restaurant for any craving or occasion. Share your location with us and we’ll put together a delicious list …",
      "snippet_highlighted_words": ["Restaurants near", "restaurant"],
      "rich_snippet": {
        "detected_extensions": {
          "questions": [
            {
              "question": "What dining occasions can I find?",
              "link": "https://www.opentable.com/nearby",
              "answer": "You can find a la carte dining, set menus, happy hours, ticketed events and much more."
            },
            ...
          ]
        }
      },
      "date": "4 days ago",
      "explore_futher": [
        {
          "title": "List Of All Restaurants Near Me",
          "link": "https://near-me.store/en/list-of-all-restaurants-near-me",
          "domain": "near-me.store"
        },
        ...
      ],
      "cached_page_link": "https://cc.bingj.com/cache.aspx?Restaurants%20near%20me&d=5039044971212218&w=jsySTeOKjMLzfnFVaSSkSuEm0H0Usm1b",
      "favicon": "https://www.bing.com/th?id=ODLS.ce021d77-7e29-4145-aa6d-3a59ce63d39e&w=32&h=32&qlt=90&pcl=fffffa&o=6&pid=1.2"
    }
    ...
  ],
  "local_map": {
    "link": "https://www.bing.com/maps?&mepi=34~Restaurant~Pole~Map_Image&ty=17&q=restaurants%20near%20me&ss=filter.entitylisttype%3A%22Restaurant%22&cacheid=9930aad9-9a5b-4448-bf8a-ef571e11c7ef&segment=Restaurant&mb=40.736885~-73.991325~40.728252~-73.983856&ppois=40.730926513671875_-73.99024963378906_IPPUDO%20NY%20East%20village_YN618x401896293~40.73222351074219_-73.98821258544922_Han%20Dynasty_YN873x128887742~40.72923278808594_-73.98451232910156_Momofuku%20Noodle%20Bar_YN618x43720538~40.731746673583984_-73.98390197753906_Artichoke%20Pizza_YN618x162106270~40.729637145996094_-73.98793029785156_Sobaya_YN618x33177190~&v=2&sV=1&FORM=MPSRPL",
    "gps_coordinates": {
      "latitude": "40.732569",
      "longitude": "-73.987591"
    },
    "image": "https://www.bing.com/maps/geoplat/REST/v1/Imagery/Map/RoadVibrant/40.732569,-73.987591/14?ms=200,277&ml=Basemap,LandCover,Landmarks,OsmBuildings&key=AnTcaqBi2ypp0xI-OZNi4W_ik2KhjgpqioTAtXLC8GzkMBQRMlyxvxyTnd5b73im&c=en-US&fmt=png&od=2&shading=hill&logo=n&da=ro&ppsc=dpss,rstp&pp=40.730927,-73.99025;S575;IPPUDO+NY+East+village&pp=40.732224,-73.988213;S575;Han+Dynasty&pp=40.729233,-73.984512;S575;Momofuku+Noodle+Bar&pp=40.731747,-73.983902;S575;Artichoke+Pizza&pp=40.729637,-73.98793;S575;Sobaya&pp=40.730606,-73.98587;S575;Cacio+e+Pepe&pp=40.732433,-73.987556;S575;The+Penny+Farthing&pp=40.728252,-73.988129;S575;Pommes+Frites&pp=40.730598,-73.986496;S575;Kanoyama&pp=40.736885,-73.991325;S575;Union+Square+Cafe&pp=40.732746,-73.985207;S575;The+Winslow&pp=40.732964,-73.986275;S575;Bite&pp=40.733662,-73.989586;S575;Dos+Toros+Taqueria&pp=40.73035,-73.983856;S575;Motorino"
  },
  "local_results": [
    {
      "position": 1,
      "id": "YN618x401896293",
      "title": "IPPUDO NY East village",
      "link": "https://www.bing.com/search?q=IPPUDO+NY+East+village+New+York&filters=segment%3a%22Restaurant%22+local_ypid%3a%22YN618x401896293%22+cacheid%3a%229930aad9-9a5b-4448-bf8a-ef571e11c7ef%22+cq%3a%22restaurants+near+me%22+ufn%3a%22IPPUDO+NY+East+village+New+York%22&FORM=SNAPCR",
      "rating": 4.5,
      "reviews": 4900,
      "reviews_source": "Facebook",
      "price": "$$",
      "price_description": "Cheap",
      "type": "Japanese East Village",
      "extensions": [
        "Delivery",
        "Takeout",
        "Good for ramen noodles, spicy ramen, excellent ramen"
      ],
      "gps_coordinates": {
        "latitude": "40.730926513671875",
        "longitude": "-73.99024963378906"
      },
      "thumbnail": "https://www.bing.com/th?id=OLC.D8jkwv4UOSS%2foQ480x360&w=200&h=200&c=7&rs=1&qlt=80&o=6&cdv=1&pid=Local"
    },
    ...
  ],
  "related_searches": [
    {
      "query": "restaurant restaurants near my location",
      "link": "https://www.bing.com/search?q=restaurant+restaurants+near+my+location&FORM=QSRE1"
    },
    ...
  ],
  "pagination": {
    "current": 1,
    "next": "https://www.bing.com/search?lq=0&count=10&rdr=1&q=Restaurants+near+me&FPIG=649846703F8146F1B80F208F3F33472B&first=11&FORM=PORE",
    "other_pages": {
      "2": "https://www.bing.com/search?lq=0&count=10&rdr=1&q=Restaurants+near+me&FPIG=649846703F8146F1B80F208F3F33472B&first=11&FORM=PERE",
      "3": "https://www.bing.com/search?lq=0&count=10&rdr=1&q=Restaurants+near+me&FPIG=649846703F8146F1B80F208F3F33472B&first=21&FORM=PERE1",
      "4": "https://www.bing.com/search?lq=0&count=10&rdr=1&q=Restaurants+near+me&FPIG=649846703F8146F1B80F208F3F33472B&first=31&FORM=PERE2",
      "5": "https://www.bing.com/search?lq=0&count=10&rdr=1&q=Restaurants+near+me&FPIG=649846703F8146F1B80F208F3F33472B&first=41&FORM=PERE3"
    }
  }
}

Organic Results

Organic Results
GET
https://www.searchapi.io/api/v1/search?engine=bing&location=New+York&q=Apple
Request
import requests

url = "https://www.searchapi.io/api/v1/search"
params = {
  "engine": "bing",
  "q": "Apple",
  "location": "New York"
}

response = requests.get(url, params = params)
print(response.text)
Response
{
  "organic_results": [
    {
      "position": 1,
      "title": "Apple",
      "source": "Apple",
      "link": "https://www.apple.com/",
      "domain": "www.apple.com",
      "displayed_link": "https://www.apple.com",
      "snippet": "Apple Store Apple Store. Find a Store; Genius Bar; Today at Apple; Apple Camp; Apple Store App; Certified Refurbished; Apple Trade In; Financing; Carrier Deals at Apple; …",
      "sitelinks": {
        "expanded": [
          {
            "title": "Support",
            "link": "https://support.apple.com/",
            "snippet": "Some counterfeit and third party power adapters and batterie…"
          },
          {
            "title": "Apple TV",
            "link": "https://www.apple.com/apple-tv-plus/",
            "snippet": "That all depends on which offer you choose. (1) If you buy a…"
          },
          {
            "title": "iPhone",
            "link": "https://www.apple.com/iphone/",
            "snippet": "Apple Footer * Pricing for iPhone 15 and iPhone 15 Plus inclu…"
          },
          {
            "title": "iTunes",
            "link": "https://www.apple.com/itunes/",
            "snippet": "Download the latest macOS for an all‑new entertainment exp…"
          },
          {
            "title": "Mac",
            "link": "https://www.apple.com/mac/",
            "snippet": "Apple Footer * Monthly pricing is available when you select A…"
          },
          {
            "title": "iPad",
            "link": "https://www.apple.com/ipad/",
            "snippet": "USB‑C to Apple Pencil Adapter required to work with iPad (1…"
          }
        ]
      },
      "cached_page_link": "https://cc.bingj.com/cache.aspx?Apple&d=4626564896986713&w=w9Yh0oyjdbw363dfiQa7FqhKB7DP5Ymk",
      "favicon": "https://www.bing.com/th?id=ODLS.39da22a0-9d13-45b0-a8d6-19146873a815&w=32&h=32&qlt=90&pcl=fffffa&o=6&pid=1.2"
    },
    ...
  ]
}

Ads

Ads
GET
https://www.searchapi.io/api/v1/search?engine=bing&location=New+York&q=VPN
Request
import requests

url = "https://www.searchapi.io/api/v1/search"
params = {
  "engine": "bing",
  "q": "VPN",
  "location": "New York"
}

response = requests.get(url, params = params)
print(response.text)
Response
{
  "ads": [
    {
      "position": 1,
      "block_position": "top",
      "title": "Top 10 VPN Providers for 2024 | Updated 5 Minutes Ago",
      "tracking_link": "https://www.bing.com/aclk?...",
      "displayed_link": "https://www.vpncenter.com/Best-VPN",
      "snippet": "Save up to 83% on Best VPNs for Your Devices. Get the Best VPN Now! Stay Secure & Private Online With the Best VPN. Compare & Find the Best VPN Today!",
      "sitelinks": {
        "inline": [
          {
            "title": "Best VPN For Windows",
            "tracking_link": "https://www.bing.com/aclk?..."
          },
          ...
        ]
      }
    },
    ...
  ]
}

Local Results

Local Results
GET
https://www.searchapi.io/api/v1/search?engine=bing&location=New+York%2CUnited+States&q=Best+restaurants+near+me
Request
import requests

url = "https://www.searchapi.io/api/v1/search"
params = {
  "engine": "bing",
  "q": "Best restaurants near me",
  "location": "New York,United States"
}

response = requests.get(url, params = params)
print(response.text)
Response
{
  "local_map": {
    "link": "https://www.bing.com/maps?&mepi=34~Restaurant~Pole~Map_Image&ty=17&q=best%20restaurants%20near%20me&ss=filter.entitylisttype%3A%22Restaurant%22&cacheid=e29b91fe-486b-4ee0-ae4c-ca7901feef13&segment=Restaurant&mb=43.317375~-74.265068~43.059063~-74.104546&ppois=43.21641540527344_-74.18236541748047_Sport%20Island%20Pub%20%26%20Restaurant_YN639x11260746~43.225711822509766_-74.17435455322266_Klippel%27s%20Kozy%20Korner%20Cafe_YN639x11260775~43.2255744934082_-74.17149353027344_Timeless%20Tavern_YN873x10258760997675004689~43.22585678100586_-74.17159271240234_The%20Local%20Dining%20and%20Spirits_YN873x17776251114920988513~43.18353271484375_-74.20072174072266_Northampton%20Diner_YN639x401948689~&v=2&sV=1&FORM=MPSRPL",
    "gps_coordinates": {
      "latitude": "43.188219",
      "longitude": "-74.184807"
    },
    "image": "https://www.bing.com/maps/geoplat/REST/v1/Imagery/Map/RoadVibrant/43.188219,-74.184807/9?ms=200,277&ml=Basemap,LandCover,Landmarks,OsmBuildings&key=AnTcaqBi2ypp0xI-OZNi4W_ik2KhjgpqioTAtXLC8GzkMBQRMlyxvxyTnd5b73im&c=en-US&fmt=png&od=2&shading=hill&logo=n&da=ro&ppsc=dpss,rstp&pp=43.216415,-74.182365;S575;Sport+Island+Pub+%26+Res...&pp=43.225712,-74.174355;S575;Klippel%27s+Kozy+Korner+...&pp=43.225574,-74.171494;S575;Timeless+Tavern&pp=43.225857,-74.171593;S575;The+Local+Dining+and+S...&pp=43.183533,-74.200722;S575;Northampton+Diner&pp=43.317375,-74.257065;S575;Cristiano%27s+Pizza&pp=43.16489,-74.108459;S575;I-Go-Inn-Restaurant+%26+Bar&pp=43.148598,-74.223785;S575;Lanzi%27s+On+The+Lake+Re...&pp=43.217339,-74.104546;S575;Four+Corners+Diner&pp=43.103672,-74.26474;S575;Mayfield+Grill&pp=43.105148,-74.265068;S575;MISTER+PIZZA&pp=43.070591,-74.217117;S575;Lakeside+Tavern+%26+Marina&pp=43.059063,-74.196106;S575;Pizza+Supreme&pp=43.1026,-74.26371;S575;Nanny+%26+Pops+Small+Tow..."
  },
  "local_results": [
    {
      "position": 1,
      "id": "YN639x11260746",
      "title": "Sport Island Pub & Restaurant",
      "link": "https://www.bing.com/search?q=Sport+Island+Pub+%26+Restaurant+Northville&filters=segment%3a%22Restaurant%22+local_ypid%3a%22YN639x11260746%22+cacheid%3a%22e29b91fe-486b-4ee0-ae4c-ca7901feef13%22+cq%3a%22best+restaurants+near+me%22+ufn%3a%22Sport+Island+Pub++Restaurant+Northville%22&FORM=SNAPCR",
      "rating": 3.5,
      "rating_source": "Tripadvisor",
      "reviews": 77,
      "price": "$$",
      "price_description": "Cheap",
      "type": "American, Bar, Pub",
      "extensions": [
        "Delivery",
        "Takeout",
        "Good for fries, crab cake blt, blt"
      ],
      "gps_coordinates": {
        "latitude": "43.21641540527344",
        "longitude": "-74.18236541748047"
      },
      "thumbnail": "https://www.bing.com/th?id=OLC.QiQ4un070LK97w480x360&w=200&h=200&c=7&rs=1&qlt=80&o=6&cdv=1&pid=Local"
    },
    ...
  ]
}
Related Questions
GET
https://www.searchapi.io/api/v1/search?engine=bing&q=What+is+GPT-4%3F
Request
import requests

url = "https://www.searchapi.io/api/v1/search"
params = {
  "engine": "bing",
  "q": "What is GPT-4?"
}

response = requests.get(url, params = params)
print(response.text)
Response
{
  "related_questions": [
    {
      "question": "What does GPT 4 mean?",
      "snippet": "GPT stands for Generative Pre-trained Transformer (GPT), a type of language model that uses deep learning to generate human-like, conversational text. What can GPT-4 do? Since GPT-4 is a large multimodal model (emphasis on multimodal), it is able to accept both text and image inputs and output human-like text.",
      "source": {
        "title": "What is GPT-4? Here's everything you need to know | ZDNET",
        "answer": "https://www.bing.com/ck/a?!&&p=a93eae11872bbd05JmltdHM9MTcwNDkzMTIwMCZpZ3VpZD0xODEzOWFjOC00NWFiLTZlOGUtMmI3NC04ZWNiNDQ5YjZmZDImaW5zaWQ9NTU2OQ&ptn=3&ver=2&hsh=3&fclid=18139ac8-45ab-6e8e-2b74-8ecb449b6fd2&psq=What+is+GPT-4%3f&u=a1aHR0cHM6Ly93d3cuemRuZXQuY29tL2FydGljbGUvd2hhdC1pcy1ncHQtNC1oZXJlcy1ldmVyeXRoaW5nLXlvdS1uZWVkLXRvLWtub3cv&ntb=1",
        "domain": "www.bing.com",
        "displayed_link": "www.zdnet.com/article/what-is-gpt-4-heres-everything-yo…"
      }
    },
    ...
  ]
}
Related Searches
GET
https://www.searchapi.io/api/v1/search?engine=bing&q=Cars
Request
import requests

url = "https://www.searchapi.io/api/v1/search"
params = {
  "engine": "bing",
  "q": "Cars"
}

response = requests.get(url, params = params)
print(response.text)
Response
{
  "related_searches": [
    {
      "query": "www.cars.co.za",
      "link": "https://www.bing.com/search?q=www.cars.co.za&FORM=QSRE1"
    },
    {
      "query": "breaking car news",
      "link": "https://www.bing.com/search?q=breaking+car+news&FORM=QSRE2"
    },
    ...
  ]
}

Inline Videos and Shorts

Inline Videos and Shorts
GET
https://www.searchapi.io/api/v1/search?engine=bing&q=Animal+Videos
Request
import requests

url = "https://www.searchapi.io/api/v1/search"
params = {
  "engine": "bing",
  "q": "Animal Videos"
}

response = requests.get(url, params = params)
print(response.text)
Response
{
  "inline_videos": [
    {
      "position": 1,
      "title": "50 Funny Animal Videos To Crack You Up All Long Day",
      "link": "https://www.youtube.com/watch?v=kj1-rR3udNs",
      "video_link": "https://www.bing.com/th?id=OM.3cr9tnA0yD5vWw_1721769740&pid=1.7",
      "source": "YouTube",
      "channel": "Funny Pet's Life",
      "description": "🐶Do you have a cute animal you want to see featured in our next compilation?",
      "is_adult": "false",
      "views": 539500,
      "duration": "15:46",
      "date": "7 months ago",
      "thumbnail": "https://www.bing.com/th?id=OVP.oUZA30pbWnfg-stWoYJoUQHgFo&w=530&h=298&c=7&rs=1&qlt=90&o=6&pid=1.7"
    },
    ...
  ],
  "inline_shorts": [
    {
      "position": 1,
      "title": "Funny Dog and Cat Videos - Cats vs Dogs - Funny Moments Animals",
      "link": "https://www.tiktok.com/@animals.clips/video/7184497062795398406",
      "source": "TikTok",
      "channel": "viralweeklyofficial",
      "duration": "01:00",
      "thumbnail": "https://www.bing.com/th?id=OVP.mwvyBL9_4nmk3faRxxn5BAEkII&w=150&h=266&c=7&rs=1&qlt=90&o=6&pid=1.7"
    },
    ...
  ]
}

Inline Images

Inline Images
GET
https://www.searchapi.io/api/v1/search?engine=bing&q=Animals
Request
import requests

url = "https://www.searchapi.io/api/v1/search"
params = {
  "engine": "bing",
  "q": "Animals"
}

response = requests.get(url, params = params)
print(response.text)
Response
{
  "inline_images": {
    "suggestions": [
      {
        "title": "Cute Babies",
        "link": "https://www.bing.com/images/search?q=Animals+Cute+Babies&FORM=IARSLK",
        "thumbnail": "https://www.bing.com/th?q=Animals+Cute+Babies&w=120&h=50&c=7&o=5&pid=1.7&mkt=en-US&cc=US&setlang=en&adlt=moderate"
      } ...
    ],
    "images": [
      {
        "title": "Group of African safari animals toge | High-Quality Animal Stock Photos ...",
        "link": "https://www.bing.com/images/search?q=animals&id=F0D44DF91DFF05726034E9A6DCBB299EC1DAB497&FORM=IQFRBA",
        "source": {
          "name": "creativemarket.com"
        },
        "thumbnail": "https://www.bing.com/th?id=OIP.KCb7Up4aqeX5cKdvS3h_dAHaE7&w=225&h=150&c=8&rs=1&qlt=90&o=6&pid=3.1&rm=2"
      } ...
    ]
  }
}