Getting Started
Parameter Explanation
Parameter | Type | Description |
---|---|---|
actor | string | A very important parameter, it represents a service. Click to view the scraper actor list information |
input | object | Parameters required by the actor to complete a data scraping task. |
proxy | object | The country field, use a proxy from this region to send requests. |
Input Field Explanation
Parameter | Type | Default | Description |
---|---|---|---|
url | string | Target website | |
method | string | GET | Request method |
redirect | boolean | false | Whether to allow redirection |
headers | object | Custom request header fields |
Send the First Request
Using the data scraping of https://httpbin.io/get
as an example.
Capture Data via API Endpoint
import requests
import json
API_KEY = ""
host = "api.scrapeless.com"
url = f"https://{host}/api/v1/unlocker/request"
payload = json.dumps({
"actor": "unlocker.webunlocker",
"input": {
"url": "https://httpbin.io/get",
"redirect": False,
"method": "GET",
}
"proxy":{
"country": "ANY",
}
})
headers = {
'Content-Type': 'application/json',
'x-api-token': f'{API_KEY}'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)