Hello @Raffaele Silvestri
Thanks for reaching out to us, you need to add your Azure Subscription ID to your environment and uncomment your code below -
static String subscriptionKey = System.getenv("BING_ACCOUNT_KEY");
Or, you can input the subscription Key in your code directly as below -
// Enter a valid subscription key.
static String subscriptionKey = "enter key here";
Please let us know if you have any further questions. Thanks.
Document you may want to refer to - https://video2.skills-academy.com/en-us/bing/search-apis/bing-web-search/quickstarts/rest/java
Regards,
Yutong