SDK Method

Learn to implement ScraperAPI's Python SDK for efficient web scraping. Includes setup for Requests and Scrapy, with advanced features like JS rendering.

To make it easier to get up and running, you can also use our Python SDK. First, you will need to install the SDK:

pip install scraperapi-sdk

Then integrate it into your code:

from scraperapi_sdk import ScraperAPIClient
client = ScraperAPIClient('APIKEY')
result = client.get(url = 'https://httpbin.org/ip')
print(result)

To enable extra functionality while using our SDK, add an additional parameter to the GET request:

from scraperapi_sdk import ScraperAPIClient
client = ScraperAPIClient('APIKEY')

result = client.get(url = 'https://httpbin.org/ip', params={'render': True})

To use two or more parameters, simply add them to the GET request:

from scraperapi_sdk import ScraperAPIClient
client = ScraperAPIClient('APIKEY')

result = client.get(url = 'https://httpbin.org/ip', params={'render': True, 'premium': True})

Last updated

Was this helpful?