Pasteview

Loading…

Pasteview API

Official API documentation. Create public pastes, search the archive, and read full content.

Introduction

The Pasteview API lets you integrate paste creation and discovery into your applications. It includes three endpoints:

  • POST /api/pastes — create a paste
  • GET /api/search — search public pastes (metadata only)
  • GET /api/pastes/:id — read full content of a public paste

Base URL: https://pasteview.com/api.

Authentication

x-api-key: YOUR_API_KEY

Search additionally requires a paid search entitlement on your account (see ).

API Keys

  1. Log in to Pasteview.
  2. Open User dashboard → API.
  3. Generate an API key.

Rate Limits

FieldTypeRequiredDescription
POST /api/pastescreate10 creates per minute per API key
GET /api/searchsearch30 requests per minute per API key
GET /api/pastes/:idread60 requests per minute per API key

Pricing

Create and read public pastes for free. Search via the API requires a paid subscription.

POST

POST /api/pastes

Create a new paste. Content is not returned in the response.

https://pasteview.com/api/pastes
GET

GET /api/search

Search public pastes. Returns metadata only (no content). Use GET /api/pastes/:id to fetch the body.

Query parameters

FieldTypeRequiredDescription
qstringYesSearch query (max 256 characters)
languagestringNoFilter by syntax (canonical slug or alias, e.g. js, c++, py)
fromISO dateNoMinimum createdAt
toISO dateNoMaximum createdAt (end of UTC day)
minViewsintegerNoMinimum view count
maxViewsintegerNoMaximum view count
sortstringNorelevance (default), newest, oldest, views
pageintegerNoPage number (default 1, max 100)
limitintegerNoResults per page (default 20, max 100)

Search tiers

  • API Title Search — matches paste titles only.
  • API Full Text Search — matches titles and paste content.
GET

GET /api/pastes/:id

Retrieve a public paste with full content in a single response.

  • Max content size: 1 MB (413 if larger)

Error Responses

FieldTypeRequiredDescription
400 Bad RequestvalidationInvalid parameters or request body
401 UnauthorizedauthMissing or invalid x-api-key
403 ForbiddenentitlementInvalid API key or missing search subscription
404 Not FoundreadPaste not found or not available via API read
413 Payload Too LargereadContent exceeds 1 MB
429 Too Many Requestsrate limitRate limit exceeded for this API key
503 Service UnavailablesearchSearch is not available

Support

Questions about the API? Contact [email protected].