Listen
CSV hochladen, Fortschritt verfolgen, Ergebnisse filtern und herunterladen. Markdown (Englisch)
Eine Liste ist ein Job: Laden Sie eine CSV- oder Excel-Datei (.xlsx, bis zu 50 MB; gelesen wird das erste Blatt, alte .xls-Dateien zuerst als .xlsx oder CSV speichern) im Dashboard hoch oder senden Sie sie an POST https://api.verifyngn.com/v1/lists.
- Die Spalte mit den Adressen wird anhand der Überschrift (email, e-mail, work email...) oder des Inhalts erkannt; Sie können sie auch wählen.
- Jede eindeutige Adresse wird einmal geprüft; wiederholte Zeilen erhalten die Antwort der ersten Zeile und werden als
duplicatemarkiert. - Die Liste wird beim Start berechnet (1 Credit pro eindeutiger, korrekt geschriebener Adresse); unbekannte Ergebnisse werden am Ende erstattet.
- Listen mit mehr als 1,000 Zeilen brauchen eine hinterlegte Karte.
- Fortschritt:
GET /lists/{id}, oder live mitAccept: text/event-stream(progress-Ereignisse, danncompletedoderfailed), oder ein Webhooklist.completed. - Ergebnisse: nach Status und Zustellbarkeit filtern, dann als CSV (Ihre Spalten, dann unsere) oder JSON herunterladen.
- Listen und ihre Ergebnisse werden nach 30 Tagen gelöscht, oder wenn Sie sie löschen.
Liste hochladen und verfolgen
# Upload a CSV (email_column: the header of the address column)
curl -s https://api.verifyngn.com/v1/lists -H "Authorization: Bearer $VERIFY_API_KEY" \
-F file=@contacts.csv -F email_column=email -F name="November leads"
# Follow it until "status" is "completed"
curl -s https://api.verifyngn.com/v1/lists/$LIST_ID -H "Authorization: Bearer $VERIFY_API_KEY"import { readFile } from "node:fs/promises";
const API = "https://api.verifyngn.com/v1";
const auth = { Authorization: `Bearer ${process.env.VERIFY_API_KEY}` };
const form = new FormData();
form.append("file", new Blob([await readFile("contacts.csv")], { type: "text/csv" }), "contacts.csv");
form.append("email_column", "email");
form.append("name", "November leads");
let list = await (await fetch(`${API}/lists`, { method: "POST", headers: auth, body: form })).json();
// Poll (or listen for the list.completed webhook).
while (list.status === "queued" || list.status === "running") {
await new Promise((r) => setTimeout(r, 5000));
list = await (await fetch(`${API}/lists/${list.id}`, { headers: auth })).json();
console.log(list.processed, "/", list.total);
}import os, time, requests
API = "https://api.verifyngn.com/v1"
auth = {"Authorization": f"Bearer {os.environ['VERIFY_API_KEY']}"}
with open("contacts.csv", "rb") as f:
res = requests.post(f"{API}/lists", headers=auth, files={"file": ("contacts.csv", f, "text/csv")},
data={"email_column": "email", "name": "November leads"}, timeout=300)
res.raise_for_status()
list_ = res.json()
# Poll (or listen for the list.completed webhook).
while list_["status"] in ("queued", "running"):
time.sleep(5)
list_ = requests.get(f"{API}/lists/{list_['id']}", headers=auth, timeout=30).json()
print(list_["processed"], "/", list_["total"])Ergebnisse herunterladen
Wenn die Liste fertig ist, laden Sie alle Zeilen als eine CSV-Datei herunter oder lesen die Ergebnisse als JSON-Seiten. Vorher lautet die Antwort 409 list_not_ready. Jede Spalte: Feldreferenz.
# The whole list as CSV (your columns, then ours), only the valid and catch-all rows
curl -s "https://api.verifyngn.com/v1/lists/$LIST_ID/results?format=csv&status=valid,catch_all" \
-H "Authorization: Bearer $VERIFY_API_KEY" -o results.csv
# Or JSON pages of results: follow next_cursor
curl -s "https://api.verifyngn.com/v1/lists/$LIST_ID/results?limit=1000" -H "Authorization: Bearer $VERIFY_API_KEY"import { writeFile } from "node:fs/promises";
const API = "https://api.verifyngn.com/v1";
const auth = { Authorization: `Bearer ${process.env.VERIFY_API_KEY}` };
const listId = process.env.LIST_ID;
// CSV: one file.
const csv = await fetch(`${API}/lists/${listId}/results?format=csv&status=valid,catch_all`, { headers: auth });
if (csv.status === 409) throw new Error("The list is not finished yet");
await writeFile("results.csv", Buffer.from(await csv.arrayBuffer()));
// JSON: pages of results.
let cursor = null;
do {
const page = await (await fetch(`${API}/lists/${listId}/results?limit=1000${cursor ? `&cursor=${cursor}` : ""}`, { headers: auth })).json();
for (const r of page.data) console.log(r.email, r.status);
cursor = page.next_cursor;
} while (cursor);import os, requests
API = "https://api.verifyngn.com/v1"
auth = {"Authorization": f"Bearer {os.environ['VERIFY_API_KEY']}"}
list_id = os.environ["LIST_ID"]
# CSV: one file.
with requests.get(f"{API}/lists/{list_id}/results", headers=auth, stream=True, timeout=300,
params={"format": "csv", "status": "valid,catch_all"}) as res:
if res.status_code == 409:
raise RuntimeError("The list is not finished yet")
res.raise_for_status()
with open("results.csv", "wb") as f:
for chunk in res.iter_content(65536):
f.write(chunk)
# JSON: pages of results.
params = {"limit": 1000}
while True:
page = requests.get(f"{API}/lists/{list_id}/results", headers=auth, params=params, timeout=60).json()
for r in page["data"]:
print(r["email"], r["status"])
if not page["next_cursor"]:
break
params["cursor"] = page["next_cursor"]