Skip to main content
Welcome to the Scrapely quickstart guide! In this tutorial, you will learn how to get your API key, install the Python SDK, and make your first successful web scraping request.
If you find Scrapely useful, please consider giving our Python SDK a star on GitHub ⭐!

1. Get your API Key

Before you can make any requests, you need an API key.
  1. Go to the Scrapely Dashboard and log in or create an account.
  2. Navigate to the API Keys section.
  3. Click Create New Key and copy it to a secure location.
Never commit your API key to public repositories like GitHub. Use environment variables (like .env files) to store it safely.

2. Install the SDK

While you can interact with Scrapely using any HTTP client (like cURL or Postman), we highly recommend using our official Python SDK for the best developer experience. It provides typed responses, built-in polling, and automatic error handling. Install the package via pip:
pip install scrapely-python-client

3. Make your first request

Now let’s write a simple script to scrape a website. Create a new file called scrape.py and add the following code. Replace "YOUR_API_KEY" with the key you generated in step 1.
from scrapely import Scrapely

# 1. Initialize the client
client = Scrapely(api_key="YOUR_API_KEY")

# 2. Create a crawl task
print("Starting crawl task...")
task = client.crawler.crawl(
    website_url="https://example.com",
    return_page_source=True
)

# 3. Print the fully rendered HTML
print("Crawl completed successfully!")
print(task.result.html)
If you are using the Python SDK, run the script:
python scrape.py
You should see the fully rendered HTML source code of https://example.com printed to your terminal. Behind the scenes, Scrapely spun up a headless browser, bypassed any necessary anti-bot protections, rendered the JavaScript, and returned the clean HTML.

Next Steps

Now that you’ve made your first request, explore what else Scrapely can do:

Browser Instructions

Learn how to click buttons, type in forms, and scroll before extracting data.

Solve CAPTCHAs

Bypass reCAPTCHA and Cloudflare Turnstile easily.