IMPORTANT: Please update all API calls to HTTPS before August 1st. We will then block all API calls over HTTP.
Scraping API
This is the Pastebin scraping API documentation page. Here you can find all the information you need to get started with our scraping API. If you have questions, feel free to contact us.
Your Account & Whitelisted IP
Our scraping API is only available for LIFETIME PRO members, and only for those who have their IP whitelisted!

IMPORTANT: TO WHITELIST YOUR IP, YOU NEED TO BE A LIFETIME PRO MEMBER! UPGRADE TO A LIFETIME PRO ACCOUNT, THEN YOU CAN WHITELIST YOUR IP ON THIS PAGE!
Your account status is: NOT LOGGED IN
Your whitelisted IP is: NOT SET
Request Limits
Your whitelisted IP should not run into any issues as long as you don't abuse our service. We recommend not making more than 1 request per second, as there really is no need to do so. Going over 1 request per second won't get you blocked, but if we see excessive unnecessary scraping, we might take action.
Recommended Scraping Logic
If you are trying to read ALL new public pastes, we recommend that you list 1x per minute the 100 most recent pastes. Store all those ID's/Keys locally somewhere, then fetch all those pastes and process the information however you like.

We urge you not to re-fetch pastes unnecessarily, as the data doesn't change quickly.

Having some kind of local database system, which prevents unnecessary re-fetches is highly recommended! It lowers the load on both your own and our servers.
Request Most Recent Pastes
To fetch the most recent pastes, query the link below. It's a pretty standard JSON output. You can limit the results by adding ?limit=10 for example. The max allowed value there is 250. Default is 50. You can only reach this link with your whitelisted IP!
https://pastebin.com/api_scraping.php
Below is an example output:
[ { "scrape_url": "https://pastebin.com/api_scrape_item.php?i=0CeaNm8Y", "full_url": "https://pastebin.com/0CeaNm8Y", "date": "1442911802", "key": "0CeaNm8Y", "size": "890", "expire": "1442998159", "title": "Once we all know when we goto function", "syntax": "java", "user": "admin" }, { "scrape_url": "https://pastebin.com/api_scrape_item.php?i=8sUIsf34", "full_url": "https://pastebin.com/8sUIsf34", "date": "1442911665", "key": "8sUIsf34", "size": "250", "expire": "0", "title": "master / development delete restriction", "syntax": "php", "user": "" } ]
You can also add ?lang=php for example, if you just want to grab results from a certain language. We support well over 200 languages. Click here to find all the supported languages. Always include the value on the left hand side of that list to query it.
Request RAW Paste Data
To fetch the RAW data of any paste, you can query the URL below. Replace UNIQUE_PASTE_KEY with the key of the paste that you want to fetch. You can only reach this link with your whitelisted IP!
https://pastebin.com/api_scrape_item.php?i=UNIQUE_PASTE_KEY
Request Paste Metadata
To fetch the metadata of any paste, you can query the URL below. Replace UNIQUE_PASTE_KEY with the key of the paste that you want to fetch. You can only reach this link with your whitelisted IP!
https://pastebin.com/api_scrape_item_meta.php?i=UNIQUE_PASTE_KEY
Top