@ib_cheshire Are you are using the resource keys of the bing resource that is available from the marketplace?
I used the keys from this resource in this sample and it returned a response successfully.
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# -*- coding: utf-8 -*-
import json
import os
from pprint import pprint
import requests
'''
This sample makes a call to the Bing Image Search API with a text query and returns relevant images with data.
Documentation: https: // learn.microsoft.com/en-us/azure/cognitive-services/bing-web-search/
'''
# Add your Bing Search V7 subscription key and endpoint to your environment variables.
subscriptionKey = "<your_key>"
endpoint = "https://api.bing.microsoft.com/v7.0/images/search/"
# Query to search for
query = "puppies"
# Construct a request
mkt = 'en-US'
params = {'q': query, 'mkt': mkt}
headers = {'Ocp-Apim-Subscription-Key': subscriptionKey}
# Call the API
try:
response = requests.get(endpoint, headers=headers, params=params)
response.raise_for_status()
print("\nHeaders:\n")
print(response.headers)
print("\nJSON Response:\n")
pprint(response.json())
except Exception as ex:
raise ex