Who's this documentation for?

PlayAnalyzer.com is built on top of a RESTful server that processes PML and produces metadata and visualization outputs. While most users can gain insight into a play through the web interface, this documentation exposes the full API for users who want to be able to quickly batch generate insights and analyses of plays.

How to get started

Most users should use the play analyzer api templates repository to make requests to the server using python. Just replace the file path parameter and start generating outputs with single python commands.

If you haven't had a chance to mark up your own texts into PML yet, but would like to see what this API can do, a play repository of public domain texts is also available.

Site Map

The site pages document the following information:
PML Spec: Documents Play Markup Language (PML) syntax and design philosophy
Metadata API: Documents metadata outputs available and the return JSON syntax
Visualization API: Documents requests for play visualizations to generate pngs

Making API Requests

All requests are POST requests to api.playAnalyzer.com/api_type.

All API requests require the following fields:
pml_text - the marked up play text as a file
type - the output type to generate

Where appropriate the api often allow the corpous to be refined with the following parameters:
acts - A comma seperated list of acts. Unspecified means the whole show.
from_scene - The scene in the first listed act to start from.
to_scene - The scene in the last listed act to end with.
characters - A comma seperated list of character names


If you encounter issues, have suggestions for future visualizations or metadata, or would like to have studies you conduct using this API featured on PlayAnalyzer.com, please contact us here.