Browse a category
browse_categoryBrowse IMSLP works by category (genre, key, instrumentation, or period) using the library's own names. Get paginated results and use cursors to continue exploring classical scores.
Instructions
Read the works IMSLP files under a category: a genre, a key, an instrumentation or a period. The library writes these names itself, and get_work hands them back for a work under 'genre_categories': 'Nocturnes', 'For piano', 'Scores featuring the piano', 'B-flat minor'. Pass one of those rather than a name of your own, since a category the library does not hold answers exactly as an empty one does. The 'Category:' prefix may be left out. The library cannot cross two categories, so a question naming both a genre and an instrument is answered by browsing one and reading the other off each work. IMSLP publishes no count of what a category holds, so 'total' is always null; 'has_more' and 'cursor' say whether more rows remain and how to read them. When you show a work to a user, credit IMSLP and link the page.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Rows to serve, from 1 to 100. | |
| cursor | No | The 'cursor' a previous answer named, to read on from where it stopped. The library writes it itself, so it is passed back as it was given rather than built. | |
| category | Yes | The category to read, in the library's own wording, for example 'For piano', 'Nocturnes' or 'Category:B-flat minor'. The prefix is added when it is left out. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | Yes | ||
| notes | Yes | ||
| total | Yes | Always null: IMSLP publishes no count of what a category holds. | |
| cursor | Yes | The cursor to read on from, as the library named it. Null when it named none. | |
| source | Yes | ||
| license | Yes | ||
| results | Yes | ||
| category | Yes | The category as it reached the library, prefix included. | |
| has_more | Yes | True when the library named a cursor to continue from. | |
| returned | Yes |