Skip to content
On this page

API Documentation

Overview

This API provides access to quotes and utterances from the Seinfeld TV show. The endpoints support filtering, pagination, rate limiting, and caching. Below is the detailed documentation of the available endpoints.

  • Rate Limit: 30 requests per hour per IP address
  • Pagination: Supports page size and maximum page size.

Filters

Both Quotes and Utterances support filtering. You can filter by the following fields:

  • page_size: defaults to 10, max 100 at a time

  • speaker: Filter by the speaker of the utterance.

  • episode_id: Filter by the episode ID.

  • season: Filter by the season of the episode.

  • writer: Filter by the writer of the episode.

  • director: Filter by the director of the episode.

  • title: Filter by the title of the episode.

  • length: Filter by the length of the quote. (Minimum value, larger for longer quotes)

  • search: Filter by a search term in the quote text.

Endpoints

Get Quotes

Retrieve all quotes

bash
GET /api/quotes/?page_size=1 HTTP/1.1
Host: seinfeld-api.xyz

{
    "count": 90750,
    "next": "http://seinfeld-api.xyz/api/quotes/?page=2&page_size=1",
    "previous": null,
    "results": [
        {
            "id": 1,
            "text": "(pointing at George's shirt) See, to me, that button is in the worst possible spot.",
            "info": {
                "speaker": "JERRY",
                "season_number": 1,
                "episode_number": 1,
                "title": "Good News, Bad News",
                "date": "July 5, 1989",
                "writer": "Larry David, Jerry Seinfeld",
                "director": "Art Wolff"
            }
        }
    ]
}

Get Quote By ID

Get By ID

bash
GET /api/quotes/1 HTTP/1.1
Host: seinfeld-api.xyz

{
    "id": 1,
    "text": "(pointing at George's shirt) See, to me, that button is in the worst possible spot.",
    "info": {
        "speaker": "JERRY",
        "season_number": 1,
        "episode_number": 1,
        "title": "Good News, Bad News",
        "date": "July 5, 1989",
        "writer": "Larry David, Jerry Seinfeld",
        "director": "Art Wolff"
    }
}

Get Random Quote

Retrieve a random quote

bash
GET /api/quotes/random HTTP/1.1
Host: seinfeld-api.xyz

{
    "id": 25731,
    "text": "I've kept the same job for more than two years.",
    "info": {
        "speaker": "GEORGE",
        "season_number": 8,
        "episode_number": 5,
        "title": "The Package",
        "date": "October 17, 1996",
        "writer": "Jennifer Crittenden",
        "director": "Andy Ackerman"
    }
}

Get Utterances

Retrieve a list of utterances.

bash
GET /api/utterances/?page_size=1 HTTP/1.1
Host: seinfeld-api.xyz

{
    "count": 52206,
    "next": "http://seinfeld-api.xyz/api/utterances/?page=2&page_size=1",
    "previous": null,
    "results": [
        {
            "id": 1,
            "text": "(pointing at George's shirt) See, to me, that button is in the worst possible spot. The second button literally makes or breaks the shirt, look at it. It's too high! It's in no-man's-land. You look like you live with your mother.",
            "info": {
                "speaker": "JERRY",
                "season_number": 1,
                "episode_number": 1,
                "title": "Good News, Bad News",
                "date": "July 5, 1989",
                "writer": "Larry David, Jerry Seinfeld",
                "director": "Art Wolff"
            }
        }
    ]
}

Get Utterance By ID

bash
GET /api/utterances/1 HTTP/1.1
Host: seinfeld-api.xyz

{
    "id": 1,
    "text": "(pointing at George's shirt) See, to me, that button is in the worst possible spot. The second button literally makes or breaks the shirt, look at it. It's too high! It's in no-man's-land. You look like you live with your mother.",
    "info": {
        "speaker": "JERRY",
        "season_number": 1,
        "episode_number": 1,
        "title": "Good News, Bad News",
        "date": "July 5, 1989",
        "writer": "Larry David, Jerry Seinfeld",
        "director": "Art Wolff"
    }
}

Examples of Filtering

bash
GET /api/quotes/?speaker=ELAINE&length=200 HTTP/1.1
Host: seinfeld-api.xyz

{
    "count": 7,
    "next": "http://seinfeld-api.xyz/api/quotes/?length=200&page=2&page_size=1&speaker=ELAINE",
    "previous": null,
    "results": [
        {
            "id": 3485,
            "text": "Y'know, my brother-in-law once left a message on this guy's machine, and he blurted out some business information he wasn't supposed to, and it would have cost him fifteen thousand dollars, so he waited outside the guy's house and when the guy came home he went upstairs with him and he switched the tape.",
            "info": {
                "speaker": "ELAINE",
                "season_number": 2,
                "episode_number": 4,
                "title": "The Phone Message",
                "date": "February 13, 1991",
                "writer": "Larry David, Jerry Seinfeld",
                "director": "Tom Cherones"
            }
        }
    ]
}
bash
GET /api/quotes?search=peterman&length=100&speaker=george HTTP/1.1
Host: seinfeld-api.xyz
{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": 34623,
            "text": "Now the bus tour, which is real, takes to places that, while they are real, they are not real in sense that they did not *really* happen to the *real* Peterman which is you.",
            "info": {
                "speaker": "GEORGE",
                "season_number": 8,
                "episode_number": 21,
                "title": "The Muffin Tops",
                "date": "May 8, 1997",
                "writer": "Spike Feresten",
                "director": "Andy Ackerman"
            }
        }
    ]
}