The API for the Folger Shakespeare (formerly Folger Digital Texts) is a work in progress. For now, here’s what we have:
To help explore the API, we've created a simple form that will generate URLs to access objects in the API. It is not exhaustive, nor will it return valid results if the variables you select do not correlate to an existing object or function.
The URLs generated by the above form are based on the play code, function name, and additional parameters where appropriate. For example, the URL to see line 12 of Macbeth is https://www.folgerdigitaltexts.org/Mac/ftln/0012, where "Mac" is the play code, "ftln" is the function name to retrieve a single line of the play, and 0012 is the Folger Throughline Number. With the play codes and function names listed, you can write your own URLs by hand, as an alternative to using the form on this page.
Functions:
synopsis: (+ act/scene, optionally) returns a synopsis of the play and its scenes
ftln (+ Folger through line number): returns the spoken text at that FTLN
word (+ word id) : returns information about that word
segment (+ object id) : returns the text of that xml:id
text: returns only the spoken text in that play
charText: returns a list of characters arranged according to amount of lines spoken, with a link to each character's entire spoken text
charTextMinus: returns a list of characters arranged according to amount of lines spoken, with a link to the play's spoken text, minus this character
concordance: lists the words used (in spoken text) and their frequency
monologue (+ optional line count): provides a list of speeches longer than the given line count (defaults to 30 lines)
onStage (+ ftln): returns a list of characters on stage at that line
charChart: provides a graphical representation of who is on stage across a timeline of the play
parts: provides parts or cue scripts for each character
witScript: provides "witScripts" for each character. "Witness" or "Witmore" scripts attempt to show what a character sees. They offer the play text only when that character is on stage.
sounds: returns a list of all stage directions that contain sounds (i.e., "music," "flourish," "thunder")
scenes: returns a list of all the scenes in the play
Examples:
https://www.folgerdigitaltexts.org/TNK/synopsis/
https://www.folgerdigitaltexts.org/TNK/synopsis/5/EPI
https://www.folgerdigitaltexts.org/WT/ftln/1201
https://www.folgerdigitaltexts.org/WT/word/w0176040
https://www.folgerdigitaltexts.org/Ham/word/w0259380
https://www.folgerdigitaltexts.org/WT/text/
https://www.folgerdigitaltexts.org/WT/concordance/
https://www.folgerdigitaltexts.org/WT/onStage/1196
https://www.folgerdigitaltexts.org/WT/charChart/
https://www.folgerdigitaltexts.org/WT/parts/
https://www.folgerdigitaltexts.org/WT/parts/Dion.html
https://www.folgerdigitaltexts.org/WT/parts/Bear.html
https://www.folgerdigitaltexts.org/Mac/parts/Porter.html
https://www.folgerdigitaltexts.org/Ham/witScript/
https://www.folgerdigitaltexts.org/Ham/witScript/Polonius.html
Play Codes:
AWW: All's Well That Ends Well
Ant: Antony and Cleopatra
AYL: As You Like It
Err: The Comedy of Errors
Cor: Coriolanus
Cym: Cymbeline
Ham: Hamlet
1H4: Henry IV, Part 1
2H4: Henry IV, Part 2
H5: Henry V
1H6: Henry VI, Part 1
2H6: Henry VI, Part 2
3H6: Henry VI, Part 3
H8: Henry VIII
JC: Julius Caesar
Jn: King John
Lr: King Lear
LLL: Love's Labor's Lost
Mac: Macbeth
MM: Measure for Measure
MV: The Merchant of Venice
Wiv: The Merry Wives of Windsor
MND: A Midsummer Night's Dream
Ado: Much Ado About Nothing
Oth: Othello
Per: Pericles
R2: Richard II
R3: Richard III
Rom: Romeo and Juliet
Shr: The Taming of the Shrew
Tmp: The Tempest
Tim: Timon of Athens
Tit: Titus Andronicus
Tro: Troilus and Cressida
TN: Twelfth Night
TGV: Two Gentlemen of Verona
TNK: Two Noble Kinsmen
WT: The Winter's Tale
The API in action:
Four Points of Character Analysis
Dr. Kristen Abbott Bennett
Framingham State University
The Folger Digital Texts API facilitates close-reading and evidence gathering in the context of “The Four Points of Character Analysis,” and in-class activity that often yields innovative approaches to students’ research projects and papers. This activity asks students to focus on the “charText,” “witScript,” “charTextMinus,” and the “character chart” functions as they work through the steps outlined here. These features yield lines without conventional apparatuses like act/scene/line numbers and speech prefixes that alter students’ expectations of what a playtext “looks like.” Overall, the “4 Points” approach situates students to approach problem-solving creatively as they generate concrete textual evidence that they can reference in projects and papers.