OpenCitations provides three main mechanisms to query the data it provides.
OpenCitations SPARQL endpoints. OpenCitations made available a SPARQL endpoint for all the datasets released. When such a SPARQL endpoint is accessed with a browser, it shows an editor GUI generated with YASGUI. Of course, any SPARQL endpoint can additionally be queried using the SPARQL Protocol, e.g. via curl
. The SPARQL endpoints available are:
OpenCitations REST APIs. All the data in any of the OpenCitations datasets can be retrieved by using an HTTP REST API. The rationale of making REST APIs available in addition to the SPARQL endpoints was to provide convenient access to the data included in the OpenCitations datasets for Web developers and users who are not necessarily experts in Semantic Web technologies. All the REST APIs made available by OpenCitations, has been implemented by means of RAMOSE, the Restful API Manager Over SPARQL Endpoints, which is a Python application that allows one to simply create a REST API over any SPARQL endpoint by means of a simple configuration file that execute a SPARQL query dependently of the particular API call specified. The REST APIs available are:
If you are going to use the REST APIs within an application/code, we encourage you to first get the OpenCitations Access Token and specify it in the "authorization" header of your REST API call. Obtaining the token takes only a few seconds and needs to happen only once. It costs you nothing, however, it could help OpenCitations a lot. Thank you!
OpenCitations Search Interfaces. OpenCitations has additionally developed user-friendly text search interfaces and browsing interfaces that can be used to search data in all the OpenCitations datasets and to visualise and browse them, respectively. These two interfaces have been developed by means of OSCAR, the OpenCitations RDF Search Application, and LUCINDA, the OpenCitations RDF Resource Browser, that provide a configurable layer over SPARQL endpoints that permit one easily to create Web interfaces for querying and visualising the results of SPARQL queries. The search interfaces available are: