Public APIs
Pastebin favicon

Pastebin

Cloud Storage & File Sharing

Plain Text Storage.

Pastebin's website screenshot

About Pastebin

Pastebin provides a developer API for programmatically creating, listing, retrieving, and deleting text pastes. Requests are made via POST to an endpoint (api_post.php) using a developer API key obtained by registering a Pastebin account; core paste creation requires only the API key, an option flag, and the paste text itself.

The API supports optional parameters for paste title, visibility (public, unlisted, or private), expiration date, folder placement, and syntax-highlighting format, with over 200 supported language/format values. A separate api_user_key parameter, obtained through a member login flow, allows pastes to be associated with a registered user account rather than created as a guest; without it, a guest paste is created.

Additional endpoints allow retrieving a user's paste listing and account settings, deleting a user's pastes, and fetching raw output for both private pastes (owned by the authenticated user) and public/unlisted pastes generally. Free accounts are subject to limits, including a maximum of 25 unlisted and 10 private pastes. The documentation targets developers integrating paste creation and management into external applications or tools.

Key features

  • Create pastes programmatically via a POST API (api_post.php)
  • Set paste visibility as public, unlisted, or private
  • Over 200 syntax highlighting languages supported via api_paste_format
  • Set paste expiration dates via api_paste_expire_date
  • Organize pastes into folders via api_folder_key
  • List and delete pastes created by a user via the API

Frequently asked questions

Is there a free tier?

Yes, but free accounts are limited to 25 unlisted pastes and 10 private pastes.

What do I need to use the API?

You need a unique Developer API Key, obtained automatically when you become a Pastebin member.

How do I authenticate API requests?

Requests use api_dev_key for developer authentication and an optional api_user_key for user-specific actions; without api_user_key, a guest paste is created.

What syntax highlighting options are supported?

The API supports over 200 syntax highlighting values covering languages and formats like C, C++, Bash, CSS, and many more.

Can I create pastes without logging in?

Yes, omitting api_user_key creates a guest paste, though guests cannot add pastes to folders.

Advertise here

Featured products

  • SerpApi - Search API favicon
  • Screenshot Scout favicon
  • TalorData favicon
  • CoreClaw favicon

Show your product to thousands of developers

· 100k monthly pageviews
· 7k newsletter subscribers

Advertise your product