REST API for OpenCitations Meta

Version: Version 1.1.1 (2022-12-22)
API URL: https://w3id.org/oc/meta/api/v1
Contact: contact@opencitations.net
License: This document is licensed with a Creative Commons Attribution 4.0 International License, while the REST API itself has been created using RAMOSE, the Restful API Manager Over SPARQL Endpoints created by Silvio Peroni, which is licensed with an ISC license.

Description back to top

This is the REST API for OpenCitations Meta, the OpenCitations dataset containing bibliographic metadata associated with the documents involved in the citations stored in the OpenCitations Indexes. All the present operations return either a JSON document (default) or a CSV document according to the mimetype specified in the Accept header of the request. If you would like to suggest an additional operation to be included in this API, please use the issue tracker of the OpenCitations APIs available on GitHub.

Parameters back to top

Parameters can be used to filter and control the results returned by the API. They are passed as normal HTTP parameters in the URL of the call. They are:

  1. require=<field_name>: all the rows that have an empty value in the <field_name> specified are removed from the result set - e.g. require=given_name removes all the rows that do not have any string specified in the given_name field.

  2. filter=<field_name>:<operator><value>: only the rows compliant with <value> are kept in the result set. The parameter <operation> is not mandatory. If <operation> is not specified, <value> is interpreted as a regular expression, otherwise it is compared by means of the specified operation. Possible operators are "=", "<", and ">". For instance, filter=title:semantics? returns all the rows that contain the string "semantic" or "semantics" in the field title, while filter=date:>2016-05 returns all the rows that have a date greater than May 2016.

  3. sort=<order>(<field_name>): sort in ascending (<order> set to "asc") or descending (<order> set to "desc") order the rows in the result set according to the values in <field_name>. For instance, sort=desc(date) sorts all the rows according to the value specified in the field date in descending order.

  4. format=<format_type>: the final table is returned in the format specified in <format_type> that can be either "csv" or "json" - e.g. format=csv returns the final table in CSV format. This parameter has higher priority of the type specified through the "Accept" header of the request. Thus, if the header of a request to the API specifies Accept: text/csv and the URL of such request includes format=json, the final table is returned in JSON.

  5. json=<operation_type>("<separator>",<field>,<new_field_1>,<new_field_2>,...): in case a JSON format is requested in return, tranform each row of the final JSON table according to the rule specified. If <operation_type> is set to "array", the string value associated to the field name <field> is converted into an array by splitting the various textual parts by means of <separator>. For instance, considering the JSON table [ { "names": "Doe, John; Doe, Jane" }, ... ], the execution of array("; ",names) returns [ { "names": [ "Doe, John", "Doe, Jane" ], ... ]. Instead, if <operation_type> is set to "dict", the string value associated to the field name <field> is converted into a dictionary by splitting the various textual parts by means of <separator> and by associating the new fields <new_field_1>, <new_field_2>, etc., to these new parts. For instance, considering the JSON table [ { "name": "Doe, John" }, ... ], the execution of dict(", ",name,fname,gname) returns [ { "name": { "fname": "Doe", "gname": "John" }, ... ].

It is possible to specify one or more filtering operation of the same kind (e.g. require=given_name&require=family_name). In addition, these filtering operations are applied in the order presented above - first all the require operation, then all the filter operations followed by all the sort operation, and finally the format and the json operation (if applicable). It is worth mentioning that each of the aforementioned rules is applied in order, and it works on the structure returned after the execution of the previous rule.

Example: <api_operation_url>?require=doi&filter=date:>2015&sort=desc(date).

Operations back to top

The operations that this API implements are:

/metadata/{ids} back to operations

This operation retrieves the bibliographic metadata for each of the bibliographic entities identified by one or more input IDs

Each ID is built as follows: ID abbreviation + ":" = ID value. For example, For example "doi:10.3233/ds-170012" indicates a DOI identifier with value "10.3233/ds-170012"

The ID abbreviations currently supported in this operation are "doi", "issn", "isbn", and "omid"

It is possible to specify one or more IDs as input of this operation. In this case, the IDs should be separated with a double underscore ("__") – e.g. "doi:10.1108/jd-12-2013-0166__doi:10.1016/j.websem.2012.08.001". The fields returned by this operation are:

Accepted HTTP method(s) get

Parameter(s) ids: type str, regular expression shape (doi|issn|isbn|omid|pmid):.+?(__(doi|issn|isbn|omid|pmid):.+?)*$

Result fields typeid (str), title (str), author (str), pub_date (datetime), issue (str), volume (str), venue (str), page (str), type (str), publisher (str), editor (str)

Example/metadata/doi:10.1007/978-1-4020-9632-7

Exemplar output (in JSON)

[
    {
        "id": "doi:10.1007/978-1-4020-9632-7 omid:br/062050946 isbn:9781402096327 isbn:9789048127108",
        "title": "Adaptive Environmental Management",
        "author": "",
        "pub_date": "2009",
        "page": "",
        "issue": "",
        "volume": "",
        "venue": "",
        "type": "book",
        "publisher": "Springer Science And Business Media Llc [crossref:297]",
        "editor": "Allan, Catherine [orcid:0000-0003-2098-4759]; Stankey, George H."
    }
]

/author/{id} back to operations

This operation retrieves the bibliographic metadata for each bibliographic entity authored by the person identified by the given ORCID or OpenCitations Meta Identifier.

Both ORCID and OMID must be specified preceded by a prefix that makes explicit the identifier scheme, i.e. orcid: for ORCID (e.g., orcid:0000-0003-1572-6747) and omid: for OMID (e.g., omid:ra/0601).

The fields returned by this operation are:

Accepted HTTP method(s) get

Parameter(s) id: type str, regular expression shape ((orcid:)?([0-9]{4}-){3}[0-9]{3}[0-9X])|(omid:ra\/06[1-9]*0\d+)

Result fields typeid (str), title (str), author (str), pub_date (datetime), issue (str), volume (str), venue (str), page (str), type (str), publisher (str), editor (str)

Example/author/orcid:0000-0002-8420-0696

Exemplar output (in JSON)

[
    {
        "page": "3593-3612",
        "publisher": "Springer Science And Business Media Llc [crossref:297]",
        "editor": "",
        "issue": "6",
        "title": "Identifying And Correcting Invalid Citations Due To DOI Errors In Crossref Data",
        "type": "journal article",
        "pub_date": "2022-06",
        "venue": "Scientometrics [issn:1588-2861 issn:0138-9130]",
        "volume": "127",
        "author": "Peroni, Silvio [orcid:0000-0003-0530-4305]; Santini, Cristian [orcid:0000-0001-7363-6737]; Shahidzadeh, Nooshin [orcid:0000-0003-4114-074X]; Massari, Arcangelo [orcid:0000-0002-8420-0696]; Cioffi, Alessia [orcid:0000-0002-9812-4065]; Coppini, Sara [orcid:0000-0002-6279-3830]; Moretti, Arianna [orcid:0000-0001-5486-7070]",
        "id": "doi:10.1007/s11192-022-04367-w omid:br/061202127149"
    },
    {
        "page": "379-385",
        "publisher": "Springer Science And Business Media Llc [crossref:297]",
        "editor": "",
        "issue": "",
        "title": "Enabling Portability And Reusability Of Open Science Infrastructures",
        "type": "book chapter",
        "pub_date": "2022",
        "venue": "Linking Theory And Practice Of Digital Libraries [isbn:9783031168017 isbn:9783031168024]",
        "volume": "",
        "author": "Peroni, Silvio [orcid:0000-0003-0530-4305]; Heibi, Ivan [orcid:0000-0001-5366-5194]; Massari, Arcangelo [orcid:0000-0002-8420-0696]; Moretti, Arianna [orcid:0000-0001-5486-7070]; Grieco, Giuseppe [orcid:0000-0001-5439-4576]",
        "id": "doi:10.1007/978-3-031-16802-4_36 omid:br/061603442625"
    },
    {
        "page": "",
        "publisher": "ZappyLab, Inc. [crossref:7078]",
        "editor": "",
        "issue": "",
        "title": "Protocol: Investigating DOIs Classes Of Errors V5",
        "type": "web content",
        "pub_date": "2021-05-08",
        "venue": "",
        "volume": "",
        "author": "Santini, Cristian [orcid:0000-0001-7363-6737]; Massari, Arcangelo [orcid:0000-0002-8420-0696]; Boente, Ricarda [orcid:0000-0002-2133-8735]; Tural, Deniz [orcid:0000-0002-6391-4198]",
        "id": "doi:10.17504/protocols.io.buuknwuw omid:br/06903005993"
    }
]

/editor/{id} back to operations

This operation retrieves the bibliographic metadata for each bibliographic entity edited by the person identified by the given ORCID or OpenCitations Meta Identifier.

Both ORCID and OMID must be specified preceded by a prefix that makes explicit the identifier scheme, i.e. orcid: for ORCID (e.g., orcid:0000-0003-1572-6747) and omid: for OMID (e.g., omid:ra/0601).

The fields returned by this operation are:

Accepted HTTP method(s) get

Parameter(s) id: type str, regular expression shape ((orcid:)?([0-9]{4}-){3}[0-9]{3}[0-9X])|(omid:ra\/06[1-9]*0\d+)

Result fields typeid (str), title (str), author (str), pub_date (datetime), issue (str), volume (str), venue (str), page (str), type (str), publisher (str), editor (str)

Example/editor/orcid:0000-0003-2098-4759

Exemplar output (in JSON)

[
  {
      "id": "doi:10.1007/978-1-4020-9632-7 omid:br/0601 isbn:9789048127108 isbn:9781402096327",
      "title": "Adaptive Environmental Management",
      "author": "",
      "pub_date": "2009",
      "page": "",
      "issue": "",
      "volume": "",
      "venue": "",
      "type": "book",
      "publisher": "Springer Science And Business Media Llc [crossref:297]",
      "editor": "Allan, Catherine [orcid:0000-0003-2098-4759]; Stankey, George H."
  }
]