Google FreeBase Api - problems with querying

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 03:52:57

问题


I am trying to query the google freebase Api. this is the query I want: http://www.freebase.com/query?autorun=1&q=%22id%22:%22/m/0bth54%22,%22/film/film/imdb_id%22:[] and when I try to search the google api to return json it raise error with this url: googleapis.com/freebase/v1/mqlread?query={{%22/film/film/imdb_id%22:‌[],%22id%22:%22/m/027pfg%22}} . What am I doing wrong??


回答1:


There are three things wrong:

  • wrong protocol - must be https::
  • missing subdomain - www.
  • invalid JSON in query

If you click on the Link button in the query editor from your first URL, it'll give you an MQLread URL that you can just cut and paste:

https://www.googleapis.com/freebase/v1/mqlread/?lang=%2Flang%2Fen&query=%5B%7B+%22id%22%3A+%22%2Fm%2F0bth54%22%2C+%22%2Ffilm%2Ffilm%2Fimdb_id%22%3A+%5B%5D+%7D%5D



来源:https://stackoverflow.com/questions/16508206/google-freebase-api-problems-with-querying

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!