API Docs

Pro / Business — autentificare cu API key. Input API: URL. PDF text + OCR (scan / imagine) e în panou (upload). ZIP — Coming soon.

POST /api/v1/extract

Creează un job de extracție. Răspuns: job_id, status, poll. job_id, status, poll.

{
  "url": "https://example.com/page",
  "output": "json",
  "template": "website-to-json",
  "wait": false
}
  • url — https
  • output — json | csv | excel | xml
  • wait — true = playground

GET /api/v1/jobs/:id

Poll status + preview/result când e gata.

curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://extract.autovel.ro/api/v1/jobs/JOB_ID

Exemple

cURL

curl -X POST https://extract.autovel.ro/api/v1/extract \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://www.olx.ro/d/oferta/...","output":"json"}'

JavaScript (fetch)

const res = await fetch('https://extract.autovel.ro/api/v1/extract', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    url: 'https://example.com/product/123',
    output: 'json',
  }),
});
const data = await res.json();
console.log(data.job_id, data.poll);

Node.js

import { fetch } from 'undici'; // Node 18+: global fetch

const res = await fetch('https://extract.autovel.ro/api/v1/extract', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.EXTRACT_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ url: process.argv[2], output: 'json' }),
});
if (!res.ok) throw new Error(await res.text());
console.log(await res.json());

Python

import requests

r = requests.post(
    "https://extract.autovel.ro/api/v1/extract",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={"url": "https://example.com/listing", "output": "json"},
)
r.raise_for_status()
print(r.json())

PHP

<?php
$ch = curl_init('https://extract.autovel.ro/api/v1/extract');
curl_setopt_array($ch, [
  CURLOPT_POST => true,
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer YOUR_API_KEY',
    'Content-Type: application/json',
  ],
  CURLOPT_POSTFIELDS => json_encode([
    'url' => 'https://example.com/product',
    'output' => 'json',
  ]),
  CURLOPT_RETURNTRANSFER => true,
]);
echo curl_exec($ch);

C#

using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer YOUR_API_KEY");
var body = new StringContent(
    """{"url":"https://example.com/item","output":"json"}""",
    System.Text.Encoding.UTF8,
    "application/json");
var res = await client.PostAsync("https://extract.autovel.ro/api/v1/extract", body);
Console.WriteLine(await res.Content.ReadAsStringAsync());

Chei în API Keys · Playground