Documentation

API Reference

Base URL: https://ogfetch.dev

Authentication

Pass your API key in the X-Api-Key request header. You can also pass it as the api_key query parameter.

X-Api-Key: ogf_your_key_here

GET /v1/fetch

Fetches a URL and returns all available metadata. Consumes one credit per successful response.

Parameters

NameTypeDescription
urlstring, requiredThe URL to fetch. Must be http:// or https://. URL-encode it.

Example request

curl -G https://ogfetch.dev/v1/fetch \
  -H "X-Api-Key: ogf_your_key" \
  --data-urlencode "url=https://github.com"

Response schema

All fields are always present. Missing data is returned as null, not omitted. Image URLs and favicons are always resolved to absolute URLs.

{
  "url":         string,   // final URL after redirects
  "canonical":   string | null,
  "title":       string | null,
  "description": string | null,
  "favicon":     string | null,  // absolute URL
  "og": {
    "title":       string | null,
    "description": string | null,
    "image":       string | null,  // absolute URL
    "url":         string | null,
    "type":        string | null,
    "siteName":    string | null
  },
  "twitter": {
    "card":        string | null,
    "title":       string | null,
    "description": string | null,
    "image":       string | null,
    "creator":     string | null
  },
  "meta": {
    "author":      string | null,
    "keywords":    string | null,
    "robots":      string | null,
    "themeColor":  string | null
  },
  "wordCount":    number,
  "techStack":    string[],
  "statusCode":   number,  // HTTP status from target URL
  "responseTime": number,  // milliseconds
  "fetchedAt":    string   // ISO 8601
}

Tech stack detection

We detect frameworks and tools from HTML signatures and HTTP response headers. Detected values that may appear in techStack:

Next.jsNuxtGatsbySvelteKitRemixAstroReactVue.jsAngularWordPressShopifyWebflowSquarespaceWixGhostFramerBootstrapjQueryGoogle AnalyticsPlausibleHotjarIntercomVercelNetlifyCloudflareAWS CloudFrontGitHub Pages

Error responses

Errors return a JSON body with error (human message) and code (machine-readable).

StatusCodeMeaning
400MISSING_URLNo ?url= parameter provided.
400INVALID_URLURL is not a valid http/https URL.
401MISSING_KEYX-Api-Key header is absent.
401INVALID_KEYAPI key does not exist.
402NO_CREDITSAccount has no credits remaining.
429RATE_LIMITEDToo many requests. Back off and retry.
500FETCH_FAILEDCould not reach the target URL.
504TIMEOUTTarget URL did not respond within 10 seconds.

Rate limits

Free plan: 10 requests per minute. Paid packs: 60 per minute (Business: 120/min). Rate-limited requests return HTTP 429 with code RATE_LIMITED. Use exponential back-off when retrying.