Pastebin GraphQL API

Query
Variables (JSON)
Response
Run a query to see results.

Schema

"""A single paste entry."""
type Paste {
  """Unique paste identifier."""
  id: ID!
  """Optional human-readable title."""
  title: String!
  """Paste body text."""
  content: String!
  """Chroma syntax-highlighting language; meaningless when is_link is true."""
  language: String!
  """If true, content is a redirect target URL rather than paste text; fetching this paste's view route issues a 302 redirect."""
  is_link: Boolean!
  """Whether the paste is visible in public listings."""
  is_public: Boolean!
  """ISO-8601 creation timestamp."""
  created_at: String!
  """ISO-8601 expiry timestamp; null if the paste never expires."""
  expires_at: String
  """Delete after N views (0 = disabled)."""
  burn_after_read: Int!
  """Number of times the paste has been viewed."""
  view_count: Int!
}

"""Paginated list of pastes."""
type PasteList {
  """Current page contents."""
  pastes: [Paste!]!
  """Total number of public pastes across all pages."""
  total: Int!
  """The page number that was returned."""
  page: Int!
  """The page size that was used."""
  limit: Int!
}

type Query {
  """Retrieve a single paste by its ID."""
  paste(id: ID!): Paste
  """List recent public pastes, newest first."""
  pastes(page: Int, limit: Int): PasteList!
}