Please select or enter at least one field.
import requests
import time
API_KEY = "YOUR_API_KEY"
HEADERS = {"Authorization": f"Api-Key {API_KEY}"}
# 1. Submit PDF files for parsing
files = [
('pdfs', open('resume1.pdf', 'rb')),
('pdfs', open('resume2.pdf', 'rb'))
]
data = {'key_fields': 'name,email,phone'}
submit_url = "https://dataguru.cc/t/api/v1/resume-parser/"
resp = requests.post(submit_url, headers=HEADERS, files=files, data=data).json()
batch_id = resp["batch_id"]
# 2. Poll batch status until all files are Ready
while True:
status = requests.get(f"https://dataguru.cc/t/api/batch-status/{batch_id}/", headers=HEADERS).json()
if all(f["status"] == "Ready" for f in status["files"]): break
time.sleep(2)
# 3. Download single file result (JSON)
file_id = status["files"][0]["id"]
r = requests.get(f"https://dataguru.cc/t/api/file-download/{file_id}/?format=json", headers=HEADERS)
with open("result.json", "wb") as f: f.write(r.content)
# 4. Download combined batch as CSV
csv_url = status["batch_download_csv_url"]
r = requests.get(csv_url, headers=HEADERS)
with open("batch.csv", "wb") as f: f.write(r.content)
// Node.js (axios & form-data)
const fs = require('fs');
const axios = require('axios');
const FormData = require('form-data');
const API_KEY = "YOUR_API_KEY";
const headers = { 'Authorization': `Api-Key ${API_KEY}` };
// 1. Submit PDFs
const form = new FormData();
form.append('key_fields', 'name,email,phone');
form.append('pdfs', fs.createReadStream('resume1.pdf'));
form.append('pdfs', fs.createReadStream('resume2.pdf'));
axios.post('https://dataguru.cc/t/api/v1/resume-parser/', form, {
headers: { ...form.getHeaders(), ...headers }
})
.then(async res => {
const batch_id = res.data.batch_id;
// 2. Poll for status
let ready = false, status;
while (!ready) {
const r = await axios.get(`https://dataguru.cc/t/api/batch-status/${batch_id}/`, { headers });
status = r.data;
ready = status.files.every(f => f.status === 'Ready');
if (!ready) await new Promise(r => setTimeout(r, 2000));
}
// 3. Download single file (JSON)
const file_id = status.files[0].id;
let r = await axios.get(`https://dataguru.cc/t/api/file-download/${file_id}/?format=json`, { headers, responseType: 'arraybuffer' });
fs.writeFileSync('result.json', r.data);
// 4. Download batch CSV
r = await axios.get(status.batch_download_csv_url, { headers, responseType: 'arraybuffer' });
fs.writeFileSync('batch.csv', r.data);
})
.catch(console.error);
// C# (async)
using System.Net.Http;
using System.Text.Json;
using System.Threading.Tasks;
using System.IO;
using System.Linq;
var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Api-Key YOUR_API_KEY");
var form = new MultipartFormDataContent();
form.Add(new StringContent("name,email,phone"), "key_fields");
form.Add(new StreamContent(File.OpenRead("resume1.pdf")), "pdfs", "resume1.pdf");
form.Add(new StreamContent(File.OpenRead("resume2.pdf")), "pdfs", "resume2.pdf");
var submitResp = await client.PostAsync("https://dataguru.cc/t/api/v1/resume-parser/", form);
var submitJson = JsonDocument.Parse(await submitResp.Content.ReadAsStringAsync());
var batch_id = submitJson.RootElement.GetProperty("batch_id").GetInt32();
// Poll status
JsonDocument statusDoc;
while (true) {
var s = await client.GetAsync($"https://dataguru.cc/t/api/batch-status/{batch_id}/");
statusDoc = JsonDocument.Parse(await s.Content.ReadAsStringAsync());
if (statusDoc.RootElement.GetProperty("files").EnumerateArray().All(f => f.GetProperty("status").GetString() == "Ready")) break;
await Task.Delay(2000);
}
// Download first file
var file_id = statusDoc.RootElement.GetProperty("files")[0].GetProperty("id").GetInt32();
var fileResp = await client.GetAsync($"https://dataguru.cc/t/api/file-download/{file_id}/?format=json");
using (var fs = new FileStream("result.json", FileMode.Create)) { await fileResp.Content.CopyToAsync(fs); }
// Download batch CSV
var csvUrl = statusDoc.RootElement.GetProperty("batch_download_csv_url").GetString();
var csvResp = await client.GetAsync(csvUrl);
using (var fs = new FileStream("batch.csv", FileMode.Create)) { await csvResp.Content.CopyToAsync(fs); }
# 1. Submit PDFs (store response)
curl -X POST https://dataguru.cc/t/api/v1/resume-parser/ \
-H "Authorization: Api-Key YOUR_API_KEY" \
-F "key_fields=name,email,phone" \
-F "[email protected]" \
-F "[email protected]" -o submit_response.json
# 2. Extract batch_id
BATCH_ID=$(jq '.batch_id' submit_response.json)
# 3. Poll batch status (repeat until all are Ready)
while true; do
curl -s -H "Authorization: Api-Key YOUR_API_KEY" https://dataguru.cc/t/api/batch-status/$BATCH_ID/ -o status.json
READY=$(jq '[.files[].status == "Ready"] | all' status.json)
if [ "$READY" = "true" ]; then break; fi
sleep 2
done
# 4. Download single file (JSON)
FILE_ID=$(jq '.files[0].id' status.json)
curl -H "Authorization: Api-Key YOUR_API_KEY" \
"https://dataguru.cc/t/api/file-download/$FILE_ID/?format=json" -o result.json
# 5. Download combined batch CSV
CSV_URL=$(jq -r '.batch_download_csv_url' status.json)
curl -H "Authorization: Api-Key YOUR_API_KEY" "$CSV_URL" -o batch.csv