API Changes

From Freebase

Jump to: navigation, search

Contents

Audience

This document is aimed at developers that make use of the existing Freebase APIs. For the purposes of the document we 'll be referring to the existing Freebase API as the deprecated API, and to the new one as the new API.

If you have never used Freebase APIs before, you don't need to know this.

Global Changes

  • The API global parameters onsucceed and onfail will not be supported.
  • The mwLWT cookie has been deprecated as a mechanism to get consistent MQL results
  • JSON APIs will return with < and > html tag symbols unicode encoded - like this:

https://www.googleapis.com/freebase/v1-sandbox/text/m/02mjmr?key=yourkey&format=html Any JSON parser will decode these for you transparently, so programatic use of the API should not be affected by this.

API Changes

mqlread

  • parameters that previously went in the json "envelope" are now http params (cursor, uniqueness_failure, as_of_time, page, lang, extended, use_permission_of)
  • the http "query" parameter still contains the json mql query but the nested "query" parameter is no longer supported.
  • the http "queries" parameter is no longer supported. Each request should have one mql query in the "query" http parameter. You can instead use the /rpc mechanism of the new APIs to do multiple simultaneous requests for any API call!
  • the mwLWT cookie is being retired in favor of a dateline in the response envelope.
  • cursor=true (to get your first cursor) is replaced by an empty param val (e.g &cursor or &cursor=, not &cursor="")
  • you have to use the "X-HTTP-Method-Override: GET" header in order to perform a POST request

mqlwrite

  • parameters that previously went in the json "envelope" are now http params (callback, indent, use_permission_of)
  • the http "query" parameter still contains the json mql query but the nested "query" parameter is no longer supported.
  • the http "queries" parameter is no longer supported. Each request should have one mql query in the "query" http parameter.
  • the mwLWT cookie is being retired in favor of a dateline in the response envelope.
  • you can now pass the dateline as a url parameter

raw and blurb

These APIs have been replaced by an API called text. A format parameter allows you to modify the content encoding and other characteristics. The new API returns a JSON payload instead of a string.

image_thumb

This API has been replaced by an API called image. This API's specs have remained mostly unchanged.

search

  • the geofilter param is deprecated
  • the mql_filter param is deprecated in favor of the new filter param which is faster
  • invalid type in request will not cause an error anymore (you 'll just get empty results)
  • the type_strict parameter was replaced by a new parameter called 'filter', for example:
 type=/people/person,/film/actor&type_strict=ALL

is now expressed with:

 filter=(all type:/people/person type:/film/actor)

Also see: advanced filtering

geosearch

This API has been deprecated.

login and logout

These APIs have been deprecated in favor of oauth.

Personal tools