Convertissez vos données sans écrire de parseur
Un export CSV à transformer en JSON, un flux XML à lire, un YAML à vérifier : envoyez le document, récupérez le format voulu.
- Intégrations Make, Zapier, n8n
- Imports de catalogues
- Migrations
- Scripts de reporting
POST
/v1/convert
1 crédit(s) par appelConvertit un document entre JSON, CSV, XML et YAML. Variante : envoyer le document brut avec ?from=csv&to=json en paramètres d'URL ; la réponse est alors le document converti.
Essayer en ligne
Résultat
—
Exemple de requête
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);
Réponse
{
"ok": true,
"data": {
"to": "json",
"result": "[\n {\n \"name\": \"Alexandre\",\n \"city\": \"Genève\"\n }\n]",
"rows": 1
}
}Limites et coût
- Coût : 1 crédit(s) par appel
- Document : 1 Mo (offre Free), 10 Mo (Starter et Pro)
- Erreurs de syntaxe avec le numéro de ligne
- XML sans DTD ni entités externes