Get a random citation

GET /citations/random

Get a random citation.

Responses

  • 200 application/json

    Response 200

    Hide response attributes Show response attributes object
    • id string Required

      The ID of the citation.

    • text string Required

      Citation's content.

    • philosopher_id integer Required

      Philosopher's ID.

    • source string Required

      Title of the document from which the quotation comes. Otherwise 'Attributed' when the source is unknown but the quotation is attributed to the philosopher.

    • work_id integer Required

      Work's ID.

    • philosopher string Required

      Name of the philosopher to whom the quotation is attributed.

  • bad input parameter

GET /citations/random
curl \
 -X GET https://philosapi.vercel.app/api/citations/random
Response examples (200)
[
  {
    "id": "string",
    "text": "string",
    "philosopher_id": 42,
    "source": "string",
    "work_id": 42,
    "philosopher": "string"
  }
]