I am trying to retrieve product information from the Google Shopping API using Python. I have a valid API key, and I'm following the Google documentation to make a GET request. Here is my code:
import requests
API_KEY = "YOUR_API_KEY"
url = "https://www.googleapis.com/content/v2.1/products?key=" + API_KEY
params = {
"country": "NL",
"q": "WD3200AAJS-08L7A0",
"maxResults": 1
}
response = requests.get(url, params=params)
print(response.content)
However, I'm receiving a "404 Not Found" error message with the following statement:
The requested URL /content/v2.1/products?key=YOUR_API_KEY&q=MDL+WD3200AAJS-08L7A0&country=NL&maxResults=1 was not found on this server.
I have double-checked that my API key is correct and that the URL is accurate. I have also verified that I have the proper authorization for the Google Shopping API.
Can someone please help me troubleshoot this issue and understand why I'm encountering this error message?