Documentazione API

API MetaFetch per estrazione Open Graph v1

Per iniziare

  1. Accedi su /login con email/password o Google.
  2. Apri la dashboard e genera la tua chiave API gratuita (mf_live_...).
  3. Chiama GET /api/v1/preview con Authorization: Bearer la_tua_chiave.

Usa sempre l’URL canonica con www (es. https://www.metafetch.dev). Il dominio senza www reindirizza e può rimuovere l’header Authorization.

Endpoint

GET https://www.metafetch.dev/api/v1/preview?url={encoded_url}

Autenticazione

Authorization: Bearer mf_live_your_api_key

Esempio (bash)

curl "https://www.metafetch.dev/api/v1/preview?url=https://github.com" \
  -H "Authorization: Bearer mf_live_your_api_key"

Esempio (PowerShell)

curl.exe "https://www.metafetch.dev/api/v1/preview?url=https://github.com" `
  -H "Authorization: Bearer mf_live_your_api_key"

Risposta

{
  "success": true,
  "data": {
    "url": "https://github.com",
    "title": "GitHub",
    "description": "...",
    "image": "https://...",
    "favicon": "https://...",
    "siteName": "GitHub",
    "canonical": "https://github.com",
    "locale": "en_US",
    "type": "website"
  }
}

Demo (senza chiave)

La demo pubblica senza chiave funziona solo per example.com e github.com.

GET https://www.metafetch.dev/api/v1/preview?url=https://example.com
GET https://www.metafetch.dev/api/v1/preview?url=https://github.com

Errori

401 Unauthorized — missing/invalid API key
429 Too Many Requests — quota or rate limit exceeded
400 Bad Request — invalid URL
502 Bad Gateway — upstream fetch failed
Documentazione API — MetaFetch