Bing Search API Python Client
Extract Bing Search data with our Bing Search API Python client. Get programmatic access to paid results, people also ask, related queries, total result counts, organic results, and more using simple Python code. Start free, no credit card required.

Trusted by industry leaders all over the world
Integrate our Bing Search API
The Apify API client for Python is the official library that allows you to use Bing Search API in Python, providing convenience functions and automatic retries on errors. Get started with simple pip installation and robust error handling built-in.
Python
JavaScript
HTTP
MCP
1from apify_client import ApifyClient2
3# Initialize the ApifyClient with your Apify API token4# Replace '<YOUR_API_TOKEN>' with your token.5client = ApifyClient("<YOUR_API_TOKEN>")6
7# Prepare the Actor input8run_input = { "queries": """apify9https://www.bing.com/search?q=crawlee""" }10
11# Run the Actor and wait for it to finish12run = client.actor("tri_angle/bing-search-scraper").call(run_input=run_input)13
14# Fetch and print Actor results from the run's dataset (if there are any)15print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])16for item in client.dataset(run["defaultDatasetId"]).iterate_items():17 print(item)18
19# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start
Get data with Bing Search API Python client
Use our Python API client to extract Bing Search data by providing search queries or URLs, market codes, and language preferences. The API returns structured data, including organic results, paid ads, People Also Ask sections, related queries, and comprehensive search metadata.
Input
{ "queries": "apify\\nhttps://www.bing.com/search?q=crawlee", "saveHtml": false, "marketCode": "", "languageCode": "", "resultsPerPage": 10, "maxPagesPerQuery": 1, "ignoreSoftBlocking": false, "saveHtmlSnapshotUrls": false}
Output
{ "html": null, "paidResults": [], "searchQuery": { "url": "https://www.bing.com/search?q=apify&mkt=en-US&setLang=en&count=10&first=1", "page": 1, "term": "apify", "marketCode": "en-US", "languageCode": "en", "resultsPerPage": 10 }, "resultsTotal": 30100, "peopleAlsoAsk": [ { "url": "https://docs.apify.com/platform", "answer": "Apify is a cloud platform that helps you build reliable web scrapers, fast, and automate anything you can do manually in a web browser. Actors are serverless cloud programs running on the Apify platform that can easily crawl websites with millions of pages, but also perform arbitrary computing jobs such as sending emails or data transformations.", "question": "What is apify and how does it work?" } ], "organicResults": [ { "url": "https://apify.com/", "date": null, "type": "organic", "title": "Apify: Full-stack web scraping and data extraction platform", "iconUrl": "https://th.bing.com/th?id=ODLS.f0918ea1-202b-4bbd-abfe-46cd7093840f&w=32&h=32&qlt=90&pcl=fffffa&o=6&cb=13&pid=1.2", "position": 1, "siteLinks": [ { "url": "https://apify.com/pricing", "title": "Plans & Pricing", "description": "Plans and pricing" } ], "description": "Cloud platform for web scraping, browser automation, and data for AI. Use 2,000+ ready-made tools, code templates, or order a custom solution.", "productInfo": {}, "displayedUrl": "https://apify.com", "emphasizedKeywords": [ "web" ] } ], "relatedQueries": [ { "url": "https://www.bing.com/search?q=apify+login&FORM=QSRE1", "title": "apify login" } ], "htmlSnapshotUrl": null}
Sign up for Apify account01
Creating an account is quick and free — no credit card required. Your account gives you access to more than 5,000 scrapers and APIs.
Install Apify Python client02
Install the Apify Python client using pip: pip install apify-client. This package provides a simple interface to interact with Bing Search API from your Python applications.
Get your Apify API token03
Go to settings in the Apify console and navigate to the “API & Integrations” tab. There, create a new token and save it for later.
Integrate Bing Search API04
Navigate to the Bing Search API page and click on the API dropdown menu in the top right corner. In the dropdown menu, you can see API clients, API endpoints, and more. Use the provided Python code examples to integrate Bing Search API into your Python application.
Get your Bing Search data via API05
The Bing Search API returns structured JSON data that works perfectly with pandas, NumPy, and other Python data analysis libraries.

Why use Apify?
Never get blocked
Every plan (free included) comes with Apify Proxy, which is great for avoiding blocking and giving you access to geo-specific content.
Customers love us
We truly care about the satisfaction of our users and thanks to that we're one of the best-rated data extraction platforms on both G2 and Capterra.
Monitor your runs
With our latest monitoring features, you always have immediate access to valuable insights on the status of your web scraping tasks.
Export to various formats
Your datasets can be exported to any format that suits your data workflow, including Excel, CSV, JSON, XML, HTML table, JSONL, and RSS.
Integrate Apify to your workflow
You can integrate your Apify runs with platforms such as Zapier, Make, Keboola, Google Drive, or GitHub. Connect with practically any cloud service or web app.
Large developer community
Apify is built by developers, so you'll be in good hands if you have any technical questions. Our Discord server is always here to help!
Python-ready Bing Search data extraction
Connect to hundreds of apps right away using ready-made integrations, or set up your own with webhooks and our API.
Yes, Microsoft does provide an official Python API client for Bing Search through their Cognitive Services platform. However, it requires API keys, has usage quotas, and comes with associated costs. Our Bing Search Scraper offers an alternative solution that can extract up to 2000 results per keyword without requiring official Python API credentials, giving you more flexibility and control over your data extraction needs.
Absolutely! You can try our Bing Search Python API client for free on the Apify platform. We offer a pay-per-event pricing model, so you only pay for what you use. You can start with a small test run using the Python client to see exactly how the scraper works and estimate costs for your specific use case before scaling up to larger data extraction projects.
The Python Bing Search API client extracts comprehensive data including organic search results with titles, URLs, descriptions, and emphasized keywords; paid advertisements; People Also Ask sections with questions and answers; related queries; site links; total result counts; product information; and additional metadata. You can export all this data in structured formats like JSON, CSV, Excel, or XML for easy analysis and integration in your Python applications.
Yes, scraping Bing search results with a Python API client is generally legal when extracting publicly available data, as long as you respect intellectual property rights and personal data regulations. However, you should always review Bing's Terms of Use and ensure your Python scraping activities comply with applicable laws. We recommend consulting with legal counsel if you're unsure about the legitimacy of your specific Python API client use case, especially when dealing with personal data.
Getting started with our Bing Search Python API is easy — simply create a free Apify account, get your API token, and start using the Bing Search API in Python, JavaScript, CLI, cURL, OpenAPI, or MCP.