问题
I've been using the Knowledge Graph API for a few months now. I just received a 400 "Request contains an invalid argument". I believe the API is having an outage or undocumented new requirement.
Here are instructions: https://developers.google.com/knowledge-graph/#sample_request
Here is a more specific example per the instruction. My API key is correct. Using an intentionally invalid API key produces an appropriate error.
https://developers.google.com/apis-explorer/?hl=en_US#p/kgsearch/v1/kgsearch.entities.search?indent=true&limit=1&query=taylor+swift&_h=4&
Exact query URL would be: https://kgsearch.googleapis.com/v1/entities:search?query=taylor+swift&key={api-key}&limit=1&indent=True
Update: It just started working again.
来源:https://stackoverflow.com/questions/45556863/kbsearch-outage-returning-invalid-argument