Chatgpt not returning url of a wikipedia page

We developed a module in our app to return Wikipedia page urls for a particular product or brand e.g. BMW, Adidas etc. An example of the prompt we used is “what is the wikipedia page for brand BMW in category automobiles”.

It returns the url in most cases but sometimes at random we get a response “I’m sorry, but as a text-based AI, I don’t have the capability to provide direct links or search for specific pages.” and some other times it returns the correct url from Wikipedia. Is there anything that I can do to correct this.