Articles on: API

Can I scrape/download PDF with ScrapingBee?

Yes! You can scrape PDF while using ScrapingBee API.


To achieve that, you would simply need to disable JavaScript rendering and send a standard request to the PDF URL. Our API will return you the raw binary data of the PDF file you targeted, that data you can save with the extension .pdf afterwards.


This approach works for publicly available PDF files, that does not require JavaScript execution or browser rendering. Here's a simple Python example that would help you to achieve that:

import requests

pdfURL = "YOUR_PDF_URL"

def send_request():
response = requests.get(
url='https://app.scrapingbee.com/api/v1',
params={
'api_key': 'API_KEY',
'url': pdfURL,
'render_js': 'false'
},
)

if response.status_code == 200:
with open("pdfTesting.pdf", "wb") as f:
f.write(response.content)

print("Saved as pdfTest.pdf")

send_request()

Updated on: 30/12/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!