Python SDK
from revenuebase_sdk import RevenuebaseClient
client = RevenuebaseClient()
data = client.jobs.download(process_id=42)
with open("results.csv", "wb") as f:
f.write(data)curl --request GET \
--url https://api.revenuebase.ai/v2/jobs/{process_id}/download \
--header 'x-key: <api-key>'const options = {method: 'GET', headers: {'x-key': '<api-key>'}};
fetch('https://api.revenuebase.ai/v2/jobs/{process_id}/download', 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.revenuebase.ai/v2/jobs/{process_id}/download",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-key: <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://api.revenuebase.ai/v2/jobs/{process_id}/download"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-key", "<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://api.revenuebase.ai/v2/jobs/{process_id}/download")
.header("x-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.revenuebase.ai/v2/jobs/{process_id}/download")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Utilities
Download batch job results
Save the output file from an email verification batch.
GET
/
v2
/
jobs
/
{process_id}
/
download
Python SDK
from revenuebase_sdk import RevenuebaseClient
client = RevenuebaseClient()
data = client.jobs.download(process_id=42)
with open("results.csv", "wb") as f:
f.write(data)curl --request GET \
--url https://api.revenuebase.ai/v2/jobs/{process_id}/download \
--header 'x-key: <api-key>'const options = {method: 'GET', headers: {'x-key': '<api-key>'}};
fetch('https://api.revenuebase.ai/v2/jobs/{process_id}/download', 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.revenuebase.ai/v2/jobs/{process_id}/download",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-key: <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://api.revenuebase.ai/v2/jobs/{process_id}/download"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-key", "<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://api.revenuebase.ai/v2/jobs/{process_id}/download")
.header("x-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.revenuebase.ai/v2/jobs/{process_id}/download")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Credits and plans
PAYG is Pay-as-you-go. AYCE is All-you-can-eat.| Usage | PAYG | AYCE |
|---|---|---|
| This request | Free 0 credits | Free 0 credits |
exportId and their own export status endpoints.
When to use this endpoint
Download results after a job reaches COMPLETED. A CANCELLED job can have partial results. Downloading does not run verification again or add credits.Example
SetREVENUEBASE_PROCESS_ID to the process_id returned by your batch upload.
Set REVENUEBASE_API_KEY to your API key.
curl --request GET "https://api.revenuebase.ai/v2/jobs/$REVENUEBASE_PROCESS_ID/download" \
--header "X-Key: $REVENUEBASE_API_KEY" \
--output results.csv
Read the file response
This response contains file bytes, rather than a JSON status object. The format follows the uploaded file: CSV or JSON. Content-Disposition supplies a filename. Match your output extension to your upload. Original fields are preserved and a status is added per processed address. With metadata=true on the upload, the output also contains the metadata fields. Output order can change; reconnect records using your own reference field.Availability and errors
| Job state | Download behavior |
|---|---|
COMPLETED | The processed output is available. |
CANCELLED | Partial output may exist; a job stopped before processing can have no file and return 404. |
QUEUED, PROCESSING, CANCELLING | Returns 400 while the job is unfinished. |
ERROR | Returns 400; inspect the job message. |
Next steps
Interpret statuses and metadata. Use List all jobs to find older outputs.Was this page helpful?
