---
title: "The finished citation for any url on this site"
method: GET
path: "/cite"
---

# The finished citation for any url on this site

`GET /cite`

## Request

- Base URL: `https://greenlitbooks.com/api/v1`
- URL: `https://greenlitbooks.com/api/v1/cite`
- Auth: none required

Pass the url of the exact thing you are quoting, fragment and all, and get the citation for that fragment in prose and in BibTeX, both carrying the url inside them. Every quotable unit here is addressable: claims have their own anchors, so does every heading in every free chapter and field note. This is what turns the anchor you copied into the credit you paste. It asserts nothing about the content at the url. A fragment this site does not publish comes back with the citation for the page and the anchors it does publish, so a near miss cannot be mistaken for a hit.

## Query parameters

- `url` string, required

## Response `200`

The citation for the thing at that url

- object
  - `meta` Meta: Envelope on every response.
    - `version` 'v1'
    - `generatedAt` string, date-time: When this snapshot was produced. Static endpoints stamp it at deploy; search stamps it per request.
    - `source` string, uri
    - `docs` string, uri
    - `openapi` string, uri
  - `query` object
    - `url` string
  - `note` string
  - `kind` 'book' | 'claim' | 'chapter' | 'chapter-section' | 'field-note' | 'field-note-section' | 'concept' | 'term' | 'page': What the url turned out to point at.
  - `url` string, uri: The canonical url of the thing cited, fragment included when it resolved.
  - `pageUrl` string, uri
  - `markdownUrl` string, uri, nullable
  - `title` string
  - `author` string, nullable
  - `citation` Citation: The citation for this claim, already written, in the forms people paste. Both carry the fragment URL, so a quote taken from this export attributes itself.
    - `url` string, uri: The fragment the citation points at.
    - `text` string: Ready to paste into prose. The same string the book page renders. It ends with the date the record was last reviewed rather than an access date, because a build-time access date would describe when the page was generated, not when it was read.
    - `bibtex` string: Ready to paste into a .bib file.
    - `key` string: The BibTeX key on its own, for citing in LaTeX.
  - `basis` object: Present for a claim: what kind of statement it is and the rule for quoting that kind honestly.
    - `label` string
    - `rule` string
  - `fragmentNote` string: Present when the fragment is not published on that page. The citation then covers the page, and anchors lists what could have been cited instead.
  - `anchors` object[]: The linkable headings this document publishes.
    - `id` string
    - `text` string
    - `url` string, uri

## Other responses

- `400`: Missing url, a url that is not one, or a url on another host
- `404`: A url on this site with no page behind it

---

[API](https://skmtc.dev/greenlitbooks/apis/greenlit-books-api.md) · [All operations](https://skmtc.dev/greenlitbooks/apis/greenlit-books-api/llms.txt) · [OpenAPI document](https://skmtc.dev/greenlitbooks/apis/greenlit-books-api/revisions/7c8b9f94ca1e?raw)
