Get Scrape Status
curl --request GET \
--url https://api.groweasy.io/status \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.groweasy.io/status"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.groweasy.io/status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.groweasy.io/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.groweasy.io/status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.groweasy.io/status")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.groweasy.io/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"scrapeId": "scr_abc123xyz",
"status": "completed",
"progress": 100,
"leadsFound": 87,
"creditsUsed": 87,
"createdAt": "2024-01-15T10:30:00Z",
"completedAt": "2024-01-15T10:35:00Z"
}
}{
"success": false,
"error": {
"code": "INVALID_REQUEST",
"message": "The request body is missing required fields"
}
}{
"success": false,
"error": {
"code": "INVALID_REQUEST",
"message": "The request body is missing required fields"
}
}{
"success": false,
"error": {
"code": "INVALID_REQUEST",
"message": "The request body is missing required fields"
}
}API documentation
Get Scrape Status
Get the current status of a scrape job by its ID.
GET
/
status
Get Scrape Status
curl --request GET \
--url https://api.groweasy.io/status \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.groweasy.io/status"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.groweasy.io/status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.groweasy.io/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.groweasy.io/status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.groweasy.io/status")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.groweasy.io/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"scrapeId": "scr_abc123xyz",
"status": "completed",
"progress": 100,
"leadsFound": 87,
"creditsUsed": 87,
"createdAt": "2024-01-15T10:30:00Z",
"completedAt": "2024-01-15T10:35:00Z"
}
}{
"success": false,
"error": {
"code": "INVALID_REQUEST",
"message": "The request body is missing required fields"
}
}{
"success": false,
"error": {
"code": "INVALID_REQUEST",
"message": "The request body is missing required fields"
}
}{
"success": false,
"error": {
"code": "INVALID_REQUEST",
"message": "The request body is missing required fields"
}
}Example
curl -X GET "https://api.groweasy.io/status?scrapeId=scr_abc123xyz" \
-H "Authorization: Bearer YOUR_API_KEY"
const scrapeId = 'scr_abc123xyz';
const response = await fetch(
`https://api.groweasy.io/status?scrapeId=${scrapeId}`,
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
},
}
);
const data = await response.json();
console.log(data.data.status); // "completed"
console.log(data.data.leadsFound); // 87
import requests
response = requests.get(
"https://api.groweasy.io/status",
headers={"Authorization": "Bearer YOUR_API_KEY"},
params={"scrapeId": "scr_abc123xyz"},
)
data = response.json()
print(data["data"]["status"]) # "completed"
print(data["data"]["leadsFound"]) # 87
Response
{
"success": true,
"data": {
"scrapeId": "scr_abc123xyz",
"status": "completed",
"progress": 100,
"leadsFound": 87,
"creditsUsed": 87,
"createdAt": "2024-01-15T10:30:00Z",
"completedAt": "2024-01-15T10:35:00Z"
}
}
Polling for Completion
For long-running scrapes, poll the status endpoint untilstatus is completed or failed:
async function waitForScrape(scrapeId) {
while (true) {
const response = await fetch(
`https://api.groweasy.io/status?scrapeId=${scrapeId}`,
{ headers: { 'Authorization': 'Bearer YOUR_API_KEY' } }
);
const data = await response.json();
if (data.data.status === 'completed') {
return data.data;
}
if (data.data.status === 'failed') {
throw new Error('Scrape failed');
}
// Wait 5 seconds before polling again
await new Promise(resolve => setTimeout(resolve, 5000));
}
}
⌘I