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. |
Task Success Description
- An HTTP code of 200 indicates that the task has been successful, and the response body is the data.
Task In Progress Description
- An HTTP code of 201 indicates that the task is being processed, please retrieve the task result through the taskId.
{"message": "task in progress", "taskId":"30681c8b-bfd3-48eb-a7c9-006e40b00591"}
Task Failure Description
- HTTP code 429, Too many requests.
- HTTP code 400, please check if the task parameters are valid.
- HTTP code 500, internal server error.
Request Example
Using Python to retrieve Google Search data
import { Scrapeless } from '@scrapeless-ai/sdk';
const client = new Scrapeless({
apiKey: 'YOUR_API_KEY'
});
client.deepserp.createTask({
actor: "scraper.google.search",
input: {
q: "Top news headlines",
gl: "us",
hl: "en",
google_domain: "google.com"
}
}).then(async (result) => {
console.log(result);
})
.catch((error) => {
console.error('Error:', error);
});