Difference between revisions of "APIs"

From Wikidocumentaries
Jump to navigation Jump to search
(For images)
 
(50 intermediate revisions by the same user not shown)
Line 1: Line 1:
Several components can ideally display content from sources across the web. The goal is to make available tools to enrich Wikimedia projects with then. Possible scenarios include
+
==Finding related content==
 +
Several components can ideally display content from sources across the web. The goal is to enrich Wikimedia projects with content from the sources using the available tools. We currently read some image sources, but the content could ideally include newspapers, sounds, archival material, films, videos, literature, magazines, scientific articles etc.
  
===For images===
+
The source content could be used in many ways: It could be imported as such, the metadata could be consolidated with metadata of similar objects from other outlets, or the data/metadata could be used to enrich items in Wikimedia projects. In these scenarios the open projects (Wikimedia, OSM) are seen as central databases which store the collectively enriched data and can serve that back to the institutions.
* Find PD or openly licensed images for a topic in different image repositories, based on all the available data in Wikidata (labels in different languages, aliases, time, location, authority data, other related information)
 
* Match metadata fields to Wikidata or SDC properties.
 
* Instantly save image metadata without reconciliation as text. Provide opportunities to associate them with Wikidata items.
 
* Save and share metadata field mappings for later use or for use by others.
 
* Detect similar images in different repositories
 
* Compare and consolidate metadata from different sources.
 
* Store metadata statement sources and create data provenance based on that.
 
* Manage copyright status for images based on information about creators.
 
  
==Search criteria for different media types==
+
==Selecting data for the query==
 +
* Labels and aliases in all languages
 +
** Not all languages can be handled by an API. The unsuitable ones need to be filtered our in the preprocessing phase.
 +
** If the main languages of the API are known, the query can use labels of that language as a primary option.
 +
** Preprocessing can collect all necessary values and send to the local API. The local component for a specific API can arrange the data suitable for each API, for example concatenate the query strings in different ways, using AND or OR.
 +
* Item's location can be used to narrow down search results or to distinguish from namesakes.
 +
* The dates of the item can be used to narrow down search results. This is especially useful with maps.
 +
* For maps the zoom level or the scale can be calculated using the size of the area the item covers.
  
===Images===
+
==Metadata roundtripping==
Image search is ideally based on
+
<gallery mode=slideshow>
* Item label in the current language > must be changed to read the most suitable label.
+
Roundtrip.png
* Native label
+
Roundtrip (1).png
* Aliases > Which languages
+
Roundtrip (2).png
* Item location > must be made more contextual
+
Roundtrip (3).png
* Item date
+
Roundtrip (4).png
 +
Roundtrip (5).png
 +
Roundtrip (6).png
 +
Roundtrip (8).png
 +
Roundtrip (9).png
 +
</gallery>
  
===Digitized maps===
 
* Date
 
* Names of historical administrative entities
 
* Zoom level / scale
 
  
==Wikimedia APIs==
+
# GLAM makes available images and their metadata through their public API. Wikidocumentaries uses many Wikidata properties from the current topic to query that.
 +
# When reading the data through the Wikidocumentaries API, the metadata is normalized using a different transformation for each GLAM.
 +
# The metadata from different GLAMs is displayed in a uniform format in the Wikidocumentaries metadata display as strings.
 +
# When an image is saved to Wikimedia projects, users can reconcile string values with Wikidata items. String values can be saved as well, they will be available for reconciling later.
 +
# In the Wikidocumentaries metadata interface, the string values are replaced by reconciled Wikidata items. Differences between the source data from the GLAM and Wikidata, such as recent changes in the GLAM's metadata, can also be highlighted.
 +
# Maybe the GLAM could query Wikidocumentaries for changed information?
  
===MediaWiki API===
+
==Consolidate data from different sources for the same item==
 +
Especially if Wikidocumentaries decides to store images or their metadata locally, these scenarios become available. Similar images from different sources can be detected. Their metadata can be compared, and the user is asked to verify the correct information. The updated data is saved in the central repository (Wikimedia Commons) with a reference to the source that provided this information. One of the information types that can be compared is the copyright status.
  
* https://www.mediawiki.org/wiki/API:Tutorial
+
==APIs in Wikidocumentaries==
* https://en.wikipedia.org/w/api.php Wikipedia API help
+
===Wikimedia APIs===
  
===Wikidata===
+
* '''MediaWiki API'''
* [https://query.wikidata.org/ Wikidata Query Service] - SPARQL
+
** https://www.mediawiki.org/wiki/API:Tutorial
* [https://www.wikidata.org/w/api.php Wikidata API help] - MediaWiki API
+
** https://en.wikipedia.org/w/api.php Wikipedia API help
  
==Image APIs==
+
* '''Wikidata'''
 +
** [https://query.wikidata.org/ Wikidata Query Service] - SPARQL
 +
** [https://www.wikidata.org/w/api.php Wikidata API help] - MediaWiki API
  
===Wikimedia Commons===
+
===Image APIs===
 +
====In use====
  
*[https://commons.wikimedia.org/w/api.php Wikimedia Commons API help] - MediaWiki API
+
* '''Wikimedia Commons'''
 +
** [https://commons.wikimedia.org/w/api.php Wikimedia Commons API help] - MediaWiki API
 +
* '''Finna.fi'''
 +
** Images from Finnish museums
 +
** Publications from Finnish libraries
 +
** Documentation
 +
*** [https://api.finna.fi/swagger-ui/?url=%2Fapi%2Fv1%3Fswagger Finna API documentation]
 +
*** [https://www.kiwi.fi/display/Finna/Finnan+avoin+rajapinta Old but still somewhat useful Finna API documentation]
 +
*** CC licensing data available, prepared for RightsStatements
 +
* '''Europeana'''
 +
* '''Flickr'''
 +
** [https://www.flickr.com/services/api/ Flick API Docs] - Includes useful API Explorer
  
=== Finna.fi ===
+
====To be explored====
Includes
+
* [https://www.programmableweb.com/api/smithsonian-institution-open-access Smithsonian Institution Open Access API]
* Images from Finnish museums
+
* [https://www.programmableweb.com/api/smk-open-rest-api-v110 SMK Open API]
* Publications from Finnish libraries
+
* [https://www.programmableweb.com/api/metropolitan-museum-art-met-collection Metropolitan Museum of Art Met Collection API]
 +
* [https://www.programmableweb.com/api/deutsche-digitale-bibliothek Deutsche Digitale Bibliothek API]
 +
* [https://www.programmableweb.com/api/rijksmuseum Rijksmuseum API]
 +
* [https://www.programmableweb.com/api/digitalnz DigitalNZ API]
 +
* [https://www.programmableweb.com/api/artsy-rest-api-0 Artsy REST API]
 +
* [https://www.programmableweb.com/api/natural-history-museum-rest-api Natural History Museum REST API]
 +
* [https://www.programmableweb.com/api/victoria-albert-museum-rest-api Victoria & Albert Museum REST API]
 +
* Paris Musées
 +
* [https://www.programmableweb.com/api/soch SOCH API]
 +
* Creative Commons Search, Openverse
 +
* [https://archive.org/services/docs/api/ Internet Archive]
 +
* [https://www.programmableweb.com/api/cleveland-museum-art-open-access The Cleveland Museum of Art Open Access API]
 +
* [https://ajapaik.ee Ajapaik.ee]
 +
* Topothek
 +
* [https://pro.dp.la/developers/api-codex DPLA]
 +
* Structured Data on Commons
 +
* [https://www.loc.gov/apis/ Library of Congress]
  
Documentation
+
===Data APIs===
* [https://api.finna.fi/swagger-ui/?url=%2Fapi%2Fv1%3Fswagger Finna API documentation]
+
====To be explored====
* [https://www.kiwi.fi/display/Finna/Finnan+avoin+rajapinta Old but still somewhat useful Finna API documentation]
+
* '''Nimiarkisto.fi'''
* CC licensing data available, prepared for RightsStatements
+
* '''Linked Data Finland'''
 +
** [https://colab.research.google.com/drive/1scxCJl-w0Fsq_cn1cI1gwIhUk9DLA4K4?usp=sharing BiographySampo]
 +
** SotaSampo
 +
* '''FIN-CLARIN'''
  
===Europeana===
+
===Map APIs ===
 +
====To be explored====
 +
* '''Map Warper'''
 +
** [https://github.com/timwaters/mapwarper/blob/master/README_API.md Map Warper API documentation]
 +
* Library of Congress
  
===Creative Commons Search===
+
==Wikimedia integrations==
 
+
* Wikisource
=== Flickr ===
 
*[https://www.flickr.com/services/api/ Flick API Docs] - Includes useful API Explorer
 
 
 
===Topothek===
 
Includes
 
* Images from Topotheks submitted by local people
 
 
 
=== Ajapaik ===
 
[https://ajapaik.ee Ajapaik.ee]
 
 
 
===K-Samsök===
 
 
 
===Internet Archive===
 
 
 
==Data APIs==
 
 
 
=== Nimiarkisto.fi ===
 
 
 
=== Linked Data Finland ===
 
* BiographySampo
 
* SotaSampo
 
 
 
=== FIN-CLARIN ===
 
 
 
==Map APIs ==
 
 
 
=== Map Warper ===
 
*[https://github.com/timwaters/mapwarper/blob/master/README_API.md Map Warper API documentation]
 
  
 
{{design-nav}}
 
{{design-nav}}

Latest revision as of 19:46, 11 December 2021

Finding related content

Several components can ideally display content from sources across the web. The goal is to enrich Wikimedia projects with content from the sources using the available tools. We currently read some image sources, but the content could ideally include newspapers, sounds, archival material, films, videos, literature, magazines, scientific articles etc.

The source content could be used in many ways: It could be imported as such, the metadata could be consolidated with metadata of similar objects from other outlets, or the data/metadata could be used to enrich items in Wikimedia projects. In these scenarios the open projects (Wikimedia, OSM) are seen as central databases which store the collectively enriched data and can serve that back to the institutions.

Selecting data for the query

  • Labels and aliases in all languages
    • Not all languages can be handled by an API. The unsuitable ones need to be filtered our in the preprocessing phase.
    • If the main languages of the API are known, the query can use labels of that language as a primary option.
    • Preprocessing can collect all necessary values and send to the local API. The local component for a specific API can arrange the data suitable for each API, for example concatenate the query strings in different ways, using AND or OR.
  • Item's location can be used to narrow down search results or to distinguish from namesakes.
  • The dates of the item can be used to narrow down search results. This is especially useful with maps.
  • For maps the zoom level or the scale can be calculated using the size of the area the item covers.

Metadata roundtripping


  1. GLAM makes available images and their metadata through their public API. Wikidocumentaries uses many Wikidata properties from the current topic to query that.
  2. When reading the data through the Wikidocumentaries API, the metadata is normalized using a different transformation for each GLAM.
  3. The metadata from different GLAMs is displayed in a uniform format in the Wikidocumentaries metadata display as strings.
  4. When an image is saved to Wikimedia projects, users can reconcile string values with Wikidata items. String values can be saved as well, they will be available for reconciling later.
  5. In the Wikidocumentaries metadata interface, the string values are replaced by reconciled Wikidata items. Differences between the source data from the GLAM and Wikidata, such as recent changes in the GLAM's metadata, can also be highlighted.
  6. Maybe the GLAM could query Wikidocumentaries for changed information?

Consolidate data from different sources for the same item

Especially if Wikidocumentaries decides to store images or their metadata locally, these scenarios become available. Similar images from different sources can be detected. Their metadata can be compared, and the user is asked to verify the correct information. The updated data is saved in the central repository (Wikimedia Commons) with a reference to the source that provided this information. One of the information types that can be compared is the copyright status.

APIs in Wikidocumentaries

Wikimedia APIs

Image APIs

In use

To be explored

Data APIs

To be explored

  • Nimiarkisto.fi
  • Linked Data Finland
  • FIN-CLARIN

Map APIs

To be explored

Wikimedia integrations

  • Wikisource


Navigation

About Technology Design Content modules Tool pages Projects
Status

Wikidocumentaries blog

Wikidocumentaries demo

Phabricator project

Facebook group

GitHub repository

Translation in TranslateWiki

Wikidocumentaries Slack

Setting up dev environment

Resources

Translations

Languages

Using Wikibase

Federation with Wikidata

APIs

Linking

Media metadata

Properties to content

User registration

Licensing

Page types

Landing page

Search page

Topic page

User page

Organisation page

Project page

Tool page

Tasks

Components

Main toolbar and footer

Search

Faceting

Topic page header

Content module

Dropdown

Modal

Icons

Active modules

Article

Family tree

Gallery

Historical map

Images

Image viewer

Infobox

Map

Module ideas

Audio/Video

Bibliography

Correspondence

Discussion

Graph

Name

Newspaper articles

Testimonials

Timeline

Visualizations

Wikidocumentary

3D

Visual editor

Query tool

QuickStatements

Open Refine

Creating topics

Uploading images

Geolocating tool

Metadata editor

Rectifying maps

Transcription

Annotation tool

Central Park Archives

Convent Quarter

Wikisource