@Maggie Gibson The above snippet is using your bing custom search instance. Please login to your custom search portal and update the instance with the new set of keys and try the custom search from custom search portal before updating your website with the HTML endpoint.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.