Openverse is a search engine for openly-licensed media.
The OpenverseOpenverseOpenverse is a search engine for openly-licensed media, including images and audio. Find Openverse on GitHub and at https://openverse.org. team builds the Openverse Catalog, APIAPIAn API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways., and front-end application, as well as integrations between Openverse and WordPress. Follow this site for updates and discussions on the project.
You can also come chat with us in #openverse on the Make WP Chat. We have a weekly developer chat at 15:00 UTC on Mondays.
We run an hourly job to pull the last hour’s uploads from Flickr. You can find the documentation for Flickr APIAPIAn API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways.here. We currently use the flickr.photos.search method to query the API. Here is an example showing the type of query string we use:
Such a call to the flickr.photos.search method produces a result of the following format:
{
"photos": {
"page": 1,
"pages": 24306,
"perpage": 5,
"total": "121528",
"photo": [
{
"id": "48499561892",
"owner": "7702423@N04",
"secret": "2fc41d65e3",
"server": "65535",
"farm": 66,
"title": "Fox Squirrels on a Beautiful Summer Day at the University of Michigan - August 9th, 2019",
"ispublic": 1,
"isfriend": 0,
"isfamily": 0,
"license": "1",
"description": {
"_content": "Fox squirrels out and about at the University of Michigan in Ann Arbor. Taken on a nice Summer day in Ann Arbor, Friday August 9th, 2019. I did see my Dodgeball trio - Patches O'Houlihan is looking good, but Steve the Pirate is looking a bit shabby. I will reach out to see if he needs more medicine. Beautiful day in Ann Arbor. "
},
"o_width": "6000",
"o_height": "4000",
"dateupload": "1565395643",
"datetaken": "2019-08-09 09:21:44",
"datetakengranularity": "0",
"datetakenunknown": "0",
"ownername": "cseeman",
"tags": "gobluesquirrels squirrels foxsquirrels easternfoxsquirrels michiganfoxsquirrels universityofmichiganfoxsquirrels annarbor michigan animal campus universityofmichigan umsquirrels08092019 summer eating peanuts augustumsquirrel mange squirrelmange squirreltreatment justin stevethepirate patchesohoulihan",
"url_t": "https://live.staticflickr.com/65535/48499561892_2fc41d65e3_t.jpg",
"height_t": 67,
"width_t": 100,
"url_s": "https://live.staticflickr.com/65535/48499561892_2fc41d65e3_m.jpg",
"height_s": 160,
"width_s": 240,
"url_m": "https://live.staticflickr.com/65535/48499561892_2fc41d65e3.jpg",
"height_m": 333,
"width_m": 500,
"url_l": "https://live.staticflickr.com/65535/48499561892_2fc41d65e3_b.jpg",
"height_l": 683,
"width_l": 1024
},
{
"id": "48499561547",
"owner": "7702423@N04",
"secret": "be92df1d66",
"server": "65535",
"farm": 66,
"title": "Fox Squirrels on a Beautiful Summer Day at the University of Michigan - August 9th, 2019",
"ispublic": 1,
"isfriend": 0,
"isfamily": 0,
"license": "1",
"description": {
"_content": "Fox squirrels out and about at the University of Michigan in Ann Arbor. Taken on a nice Summer day in Ann Arbor, Friday August 9th, 2019. I did see my Dodgeball trio - Patches O'Houlihan is looking good, but Steve the Pirate is looking a bit shabby. I will reach out to see if he needs more medicine. Beautiful day in Ann Arbor. "
},
"o_width": "6000",
"o_height": "4000",
"dateupload": "1565395644",
"datetaken": "2019-08-09 09:22:08",
"datetakengranularity": "0",
"datetakenunknown": "0",
"ownername": "cseeman",
"tags": "gobluesquirrels squirrels foxsquirrels easternfoxsquirrels michiganfoxsquirrels universityofmichiganfoxsquirrels annarbor michigan animal campus universityofmichigan umsquirrels08092019 summer eating peanuts augustumsquirrel mange squirrelmange squirreltreatment justin stevethepirate patchesohoulihan",
"url_t": "https://live.staticflickr.com/65535/48499561547_be92df1d66_t.jpg",
"height_t": 67,
"width_t": 100,
"url_s": "https://live.staticflickr.com/65535/48499561547_be92df1d66_m.jpg",
"height_s": 160,
"width_s": 240,
"url_m": "https://live.staticflickr.com/65535/48499561547_be92df1d66.jpg",
"height_m": 333,
"width_m": 500,
"url_l": "https://live.staticflickr.com/65535/48499561547_be92df1d66_b.jpg",
"height_l": 683,
"width_l": 1024
}
]
},
"stat": "ok"
}
Below is a table showing the mapping from metadata returned by the Flickr API to columns in the image table in PostgreSQL. Fields from the above JSONJSONJSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML. are preceded by ‘$’ to mark them.
DB Column | Comes From
-------------------------|-------------------------------
foreign_identifier | $id
foreign_landing_url | "www.flickr.com/photos/" + $owner + "/" + $id
url | $url_l or $url_m or $url_s (largest which exists)
thumbnail | $url_s
width | $width_l or $width_m or $width_s (matches url)
height | $height_l or $height_m or $height_s (matches url)
license | $license
license_version | Generated based on $license. See note.
creator | $ownername
creator_url | "www.flickr.com/photos/" + $owner
title | $title
meta_data | Specified below
tags | Specified below