Download
Get apidownload status
Poll the processing status of a lead export.
Prerequisites: Authenticated. The search_id must belong to the current user.
Keep polling until status is COMPLETED or FAILED. When completed, call /api/download-completed-csv/{search_id}/ to get the file.
GET
/
api
/
download-status
/
{search_id}
/
cURL
curl -X GET 'https://www.spherescout.io/api/download-status/{search_id}/' \
-H 'Authorization: Token YOUR_API_KEY' \
-H 'User-Agent: SphereScout/1.0'import requests
response = requests.get(
"https://www.spherescout.io/api/download-status/{search_id}/",
headers={
"Authorization": "Token YOUR_API_KEY",
"User-Agent": "SphereScout/1.0",
},
)
print(response.json())const response = await fetch("https://www.spherescout.io/api/download-status/{search_id}/", {
headers: {
"Authorization": "Token YOUR_API_KEY",
"User-Agent": "SphereScout/1.0",
},
});
const data = await response.json();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.spherescout.io/api/download-status/{search_id}/",
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: <api-key>"
],
]);
$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://www.spherescout.io/api/download-status/{search_id}/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://www.spherescout.io/api/download-status/{search_id}/")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.spherescout.io/api/download-status/{search_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "<string>",
"validation_code": "<string>",
"lead_count": 123,
"file_size_bytes": 123,
"file_size_mb": 123,
"processing_started_at": "2023-11-07T05:31:56Z",
"processing_completed_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"error_message": "<string>"
}Authorizations
API key. Format: Token
Path Parameters
Response
200 - application/json
Processing status: PENDING, PROCESSING, COMPLETED, or FAILED.
Machine-readable code: processing_pending, processing_in_progress, processing_completed, processing_failed.
Number of leads in the export.
File size in bytes (only when COMPLETED).
File size in MB (only when COMPLETED).
When the download link expires.
Human-readable error (only on known business errors).
⌘I
cURL
curl -X GET 'https://www.spherescout.io/api/download-status/{search_id}/' \
-H 'Authorization: Token YOUR_API_KEY' \
-H 'User-Agent: SphereScout/1.0'import requests
response = requests.get(
"https://www.spherescout.io/api/download-status/{search_id}/",
headers={
"Authorization": "Token YOUR_API_KEY",
"User-Agent": "SphereScout/1.0",
},
)
print(response.json())const response = await fetch("https://www.spherescout.io/api/download-status/{search_id}/", {
headers: {
"Authorization": "Token YOUR_API_KEY",
"User-Agent": "SphereScout/1.0",
},
});
const data = await response.json();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.spherescout.io/api/download-status/{search_id}/",
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: <api-key>"
],
]);
$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://www.spherescout.io/api/download-status/{search_id}/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://www.spherescout.io/api/download-status/{search_id}/")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.spherescout.io/api/download-status/{search_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "<string>",
"validation_code": "<string>",
"lead_count": 123,
"file_size_bytes": 123,
"file_size_mb": 123,
"processing_started_at": "2023-11-07T05:31:56Z",
"processing_completed_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"error_message": "<string>"
}