An API for Ovid
Ovid's love poetry in a simplified, code-friendly structure

About this Site

This site is a structured, machine-friendly way to serve Ovid's poetry. Using it assumes some knowledge of API's, but I'll try to lay things out here for people who haven't done that before. If you are familiar with APIs, or if you want to explore in a formal fashion, you might want to look directly at the docs page.

Currently the site only has Ovid's love poems, but I'll be adding translations and other poems.


Why should I care about Ovid? Or APIs?

I wrote an overly-long post on why I care here. You may or may not agree.

If you need ancient material for a bot project, or a Javascript project, or whatever else, it's here. Otherwise, it's the world's least interesting content engineering/art project.


How do I use this thing?

To get a list of all Ovid's works, use this url (it's clickable):
/authors/ovid/works/

You'll note that in that list, there is a slug (a short, all-lower-case word) listed for the work. You'll use that to fetch further information from the work. The author and work use slugs, and everything else will be numbers. Indices, to be precise, since they indicate the expected order of a book, poem, or line.

To get a poem, you need to use a book number and poem number, even if that's not how you'd traditionally cite the poem.

For instance, you get Amores, Book 1 like this: /authors/ovid/works/amores/books/1/

And you also need to add a book number to works that have books, like the Heroides: /authors/ovid/works/heroides/books/1/

To get a particular line: /authors/ovid/works/ars/books/1/lines/34/

If you already know what you want, you can use the short version, remembering to include the book and poem number when needed. You basically fill in the blanks with this structure:
/{author}/{work}/{book number}/{poem number}/{line number}

Which becomes:

/ovid/medicamina/1/1/34/

To get the results in JSON for your code, you need to add ?format=json to the end of the url:

/ovid/medicamina/1/1/34/?format=json

Technical details

All requests are GET.

This site runs on Django, and uses the REST API and Swagger documentation.

The repo is here.

The best way to contact me is here.


Acknowledgements

The material for this site was originally XML created by the Perseus project.

The styling for this page comes from the Ed Jekyll theme.

The inspiration for the site came from the Aeneid API, which is the only other Classics API I know about.