Daten konvertieren, ohne einen Parser zu schreiben
Ein CSV-Export, der zu JSON werden soll, ein XML-Feed zum Lesen, ein YAML zum Prüfen: Dokument senden, gewünschtes Format erhalten.
- Integrationen mit Make, Zapier, n8n
- Katalogimporte
- Migrationen
- Reporting-Skripte
POST
/v1/convert
1 Guthaben pro AufrufKonvertiert ein Dokument zwischen JSON, CSV, XML und YAML. Variante: das Rohdokument mit ?from=csv&to=json als URL-Parametern senden; die Antwort ist dann das konvertierte Dokument.
Online ausprobieren
Ergebnis
—
Beispielanfrage
curl -X POST https://supercalcula.ch/api/v1/convert \
-H "Authorization: Bearer sk_live_…" \
-H "Content-Type: application/json" \
-d '{"from":"csv","to":"json","data":"name,city\nAlexandre,Genève"}'
const res = await fetch("https://supercalcula.ch/api/v1/convert", {
method: "POST",
headers: { Authorization: "Bearer sk_live_…", "Content-Type": "application/json" },
body: JSON.stringify({
"from": "csv",
"to": "json",
"data": "name,city\nAlexandre,Genève"
}),
});
const data = await res.json();
import requests
r = requests.post("https://supercalcula.ch/api/v1/convert",
headers={"Authorization": "Bearer sk_live_…"},
json={"from":"csv","to":"json","data":"name,city\nAlexandre,Genève"})
print(r.json())
$ch = curl_init("https://supercalcula.ch/api/v1/convert");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer sk_live_…", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode(["from" => "csv", "to" => "json", "data" => "name,city\nAlexandre,Genève"]),
CURLOPT_RETURNTRANSFER => true,
]);
$result = json_decode(curl_exec($ch), true);
Antwort
{
"ok": true,
"data": {
"to": "json",
"result": "[\n {\n \"name\": \"Alexandre\",\n \"city\": \"Genève\"\n }\n]",
"rows": 1
}
}Grenzen und Kosten
- Kosten : 1 Guthaben pro Aufruf
- Dokument: 1 MB (Angebot Free), 10 MB (Starter und Pro)
- Syntaxfehler mit Zeilennummer
- XML ohne DTD und ohne externe Entitäten