Using the Open Opus API

From Open Opus
Revision as of 00:07, 5 November 2019 by Openopus (talk | contribs)
Jump to navigation Jump to search

The Open Opus API is a very straightforward RESTful web service which returns data in JSON format. It's completely free to use and it requires no registration at all. You can use it in any website, HTTPS or not - but we strongly suggest you to serve your web app over HTTPS. You also can use the Open Opus API in any non-web application.

Base URI

All endpoints begin with

https://api.openopus.org

Endpoints

The Open Opus API has four main endpoint groups: composers, genres, works and performers.

Composers

List popular composers

/composer/list/pop.json

Response:

 { 
    "status": {
        "version": "1.19.10",
        "success": "true",
        "source": "db",
        "rows": 23,
        "processingtime": 0.0017228126525878906,
        "api": "Open Opus-dyn"
    },
    "request": {
        "type": "pop",
        "item": "1"
    },
    "composers": [
        {
            "id": "87",
            "name": "Bach",
            "complete_name": "Johann Sebastian Bach",
            "birth": "1685-01-01",
            "death": "1750-01-01",
            "epoch": "Baroque",
            "portrait": "https://assets.openopus.org/portraits/12091447-1568084857.jpg"
        },
        {
            "id": "145",
            "name": "Beethoven",
            "complete_name": "Ludwig van Beethoven",
            "birth": "1770-01-01",
            "death": "1827-01-01",
            "epoch": "Early Romantic",
            "portrait": "https://assets.openopus.org/portraits/55910756-1568084860.jpg"
        }
    ]
}