Prefix param in KG API doesn't affect?

47 views Asked by At

I'm calling the KG API:

https://kgsearch.googleapis.com/v1/entities:search?key=----key-----&limit=1000&languages=en&types=&prefix=true&query=dog

&prefix=true so I expect to see only results with names that starts with dog, but I see a few which don't comply. Why?

1

There are 1 answers

0
Lockal On

This is similar to Google Knowledge Graph Search API weird results.

Internally it actually searches for prefix for names and alternativeNames, but it uses all languages (and aliases). Therefore, when you search for query=Влад&prefix=true&languages=en, you will get "name": "Vladimir Lenin" in a response, even though this string does not start with Влад.