web services - Google Freebase API How To Get URL Of Image? -


so, trying figure out how url image in freebase database. want image of san francisco. how san francisco topic:

https://www.googleapis.com/freebase/v1sandbox/topic/%2fen%2fsan_francisco?key=my_api_key

the response contains images, example:

{     text: "san francisco skyline",     lang: "en",     id: "/m/04j74yh",     creator: "/user/carmenmfenn1",     timestamp: "2008-09-01t13:37:22.000z" } 

so call api again image:

https://www.googleapis.com/freebase/v1sandbox/topic/%2fm%2f04j74yh?key=my_api_key

this returns lots of information image such media type, size etc. don't see url there. there ids (blob id, mid). not sure how proceed url image. ideas?

this full response:

{     id: "/m/04j74yh",     property: {         /common/image/appears_in_topic_gallery: {             valuetype: "object",             values: [                 {                     text: "san francisco",                     lang: "en",                     id: "/m/0d6lp",                     creator: "/user/carmenmfenn1",                     timestamp: "2008-09-01t13:37:22.000z"                 }             ],             count: 1         },         /common/image/size: {             valuetype: "compound",             values: [                 {                     text: "640.0 - 330.0 - freebase data team - rectangle size",                     lang: "en",                     id: "/m/02bpzld",                     creator: "/user/carmenmfenn1",                     timestamp: "2008-09-01t13:37:22.000z",                     property: {                         /measurement_unit/rect_size/x: {                             valuetype: "float",                             values: [                                 {                                     text: "640.0",                                     lang: "en",                                     value: 640,                                     creator: "/user/mwcl_images",                                     timestamp: "2007-04-15t23:03:01.001z"                                 }                             ],                             count: 1                         },                         /measurement_unit/rect_size/y: {                             valuetype: "float",                             values: [                                 {                                     text: "330.0",                                     lang: "en",                                     value: 330,                                     creator: "/user/mwcl_images",                                     timestamp: "2007-04-15t23:03:01.001z"                                 }                             ],                             count: 1                         },                         /type/object/attribution: {                             valuetype: "object",                             values: [                                 {                                     text: "freebase data team",                                     lang: "en",                                     id: "/m/0220tm0",                                     creator: "/user/mwcl_images",                                     timestamp: "2007-04-15t23:03:01.001z"                                 }                             ],                             count: 1                         },                         /type/object/type: {                             valuetype: "object",                             values: [                                 {                                     text: "rectangle size",                                     lang: "en",                                     id: "/measurement_unit/rect_size",                                     creator: "/user/mwcl_images",                                     timestamp: "2007-04-15t23:03:01.001z"                                 }                             ],                             count: 1                         }                     }                 }             ],             count: 1         },         /common/licensed_object/license: {             valuetype: "object",             values: [                 {                     text: "cc-by-2.5",                     lang: "en",                     id: "/m/01xrw11",                     creator: "/user/carmenmfenn1",                     timestamp: "2008-09-01t13:37:22.000z"                 }             ],             count: 1         },         /common/topic/notable_for: {             valuetype: "object",             values: [                 {                     text: "content",                     lang: "en",                     id: "/type/content"                 }             ],             count: 1         },         /common/topic/notable_types: {             valuetype: "object",             values: [                 {                     text: "content",                     lang: "en",                     id: "/type/content",                     timestamp: "2013-05-17t00:04:43.942z"                 }             ],             count: 1         },         /type/content/blob_id: {             valuetype: "string",             values: [                 {                     text: "8debf723b25edb43b413bcb2890c4f4fe6ec5e5b2c7ce9c7e1f2aee273b0d0fe",                     lang: "",                     value: "8debf723b25edb43b413bcb2890c4f4fe6ec5e5b2c7ce9c7e1f2aee273b0d0fe",                     creator: "/user/content_administrator",                     timestamp: "2008-09-01t13:37:20.000z"                 }             ],             count: 1         },         /type/content/length: {             valuetype: "int",             values: [                 {                     text: "47162",                     lang: "en",                     value: 47162,                     creator: "/user/content_administrator",                     timestamp: "2008-09-01t13:37:20.000z"                 }             ],             count: 1         },         /type/content/media_type: {             valuetype: "object",             values: [                 {                     text: "image/jpeg",                     lang: "en",                     id: "/m/08x8",                     creator: "/user/content_administrator",                     timestamp: "2008-09-01t13:37:20.000z"                 }             ],             count: 1         },         /type/object/attribution: {             valuetype: "object",             values: [                 {                     text: "freebase staff",                     lang: "en",                     id: "/m/05g",                     creator: "/user/content_administrator",                     timestamp: "2008-09-01t13:37:20.000z"                 }             ],             count: 1         },         /type/object/mid: {             valuetype: "key",             values: [                 {                     text: "/m/04j74yh",                     lang: "",                     value: "/m/04j74yh"                 }             ],             count: 1         },         /type/object/name: {             valuetype: "string",             values: [                 {                     text: "san francisco skyline",                     lang: "en",                     value: "san francisco skyline",                     creator: "/user/carmenmfenn1",                     timestamp: "2008-09-01t13:42:34.000z"                 }             ],             count: 1         },         /type/object/type: {             valuetype: "object",             values: [                 {                     text: "image",                     lang: "en",                     id: "/common/image",                     creator: "/user/content_administrator",                     timestamp: "2008-09-01t13:37:20.000z"                 },                 {                     text: "content",                     lang: "en",                     id: "/type/content",                     creator: "/user/content_administrator",                     timestamp: "2008-09-01t13:37:20.000z"                 }             ],             count: 2         },         /type/object/guid: {             valuetype: "string",             values: [                 {                     text: "#9202a8c04000641f80000000090393af",                     lang: "",                     value: "#9202a8c04000641f80000000090393af"                 }             ],             count: 1         },         /type/object/creator: {             valuetype: "object",             values: [                 {                     text: "content_administrator",                     lang: "",                     id: "/user/content_administrator",                     timestamp: "2008-09-01t13:37:20.000z"                 }             ],             count: 1         },         /type/object/timestamp: {             valuetype: "datetime",             values: [                 {                     text: "2008-09-01t13:37:20.000z",                     lang: "en",                     value: "2008-09-01t13:37:20.000z"                 }             ],             count: 1         },         /type/object/permission: {             valuetype: "object",             values: [                 {                     text: "/boot/all_permission",                     lang: "",                     id: "/boot/all_permission"                 }             ],             count: 1         }     } } 

it's kind of buried in documentation since doesn't have section of own, instead referenced topic api documentation, can find necessary info here

urls of form:

https://usercontent.googleapis.com/freebase/v1/image/<image id> 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -