user792036
user792036

Reputation: 712

Bing Web Search API stopped working?

The Bing Web Search API worked last week and at some point this week, it has been returning 403 errors. I don't know if anyone else has been encountering similar problems?

To replicate this, simply signup here with a bing account and you should get 5000 free queries per month. Below is a snippet of code (I believe I'm properly authenticated since putting in improper credentials fails gives a 401, rather than 403 error).

import requests
user = '...'
key = '...'

# 403 error
requests.get('https://api.datamarket.azure.com/Bing/Search/Web?Query=%27Xbox%27&$format=json', auth=(user, key))

# 401 error
requests.get('https://api.datamarket.azure.com/Bing/Search/Web?Query=%27Xbox%27&$format=json', auth=('a', 'b'))

Is anyone else getting this?

Upvotes: 0

Views: 1248

Answers (1)

Panagiotis Kanavos
Panagiotis Kanavos

Reputation: 131706

403 is the Forbidden status code. Your subscription probably expired or you exhausted your query limit.

Server errors are always in the 500-599 range. Errors in the 400-499 range are always client errors. If you repeatedly receive 500 errors, you should check Azure's status page to ensure there isn't a problem.

As a rule, you shouldn't assume that a major service like Bing Search is down and no-one noticed for days. It's far more likely that there is a problem with your account or your code, especially if you receive client error codes.

Upvotes: 1

Related Questions