Introduction
The Pasteview API lets you integrate paste creation and discovery into your applications. It includes three endpoints:
POST /api/pastes— create a pasteGET /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_KEYSearch additionally requires a paid search entitlement on your account (see ).
API Keys
- Log in to Pasteview.
- Open User dashboard → API.
- Generate an API key.
Rate Limits
| Field | Type | Required | Description |
|---|---|---|---|
POST /api/pastes | create | — | 10 creates per minute per API key |
GET /api/search | search | — | 30 requests per minute per API key |
GET /api/pastes/:id | read | — | 60 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/pastesGET
GET /api/search
Search public pastes. Returns metadata only (no content). Use GET /api/pastes/:id to fetch the body.
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
q | string | Yes | Search query (max 256 characters) |
language | string | No | Filter by syntax (canonical slug or alias, e.g. js, c++, py) |
from | ISO date | No | Minimum createdAt |
to | ISO date | No | Maximum createdAt (end of UTC day) |
minViews | integer | No | Minimum view count |
maxViews | integer | No | Maximum view count |
sort | string | No | relevance (default), newest, oldest, views |
page | integer | No | Page number (default 1, max 100) |
limit | integer | No | Results 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
| Field | Type | Required | Description |
|---|---|---|---|
400 Bad Request | validation | — | Invalid parameters or request body |
401 Unauthorized | auth | — | Missing or invalid x-api-key |
403 Forbidden | entitlement | — | Invalid API key or missing search subscription |
404 Not Found | read | — | Paste not found or not available via API read |
413 Payload Too Large | read | — | Content exceeds 1 MB |
429 Too Many Requests | rate limit | — | Rate limit exceeded for this API key |
503 Service Unavailable | search | — | Search is not available |
Support
Questions about the API? Contact [email protected].