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
| Name | Type | Description |
|---|---|---|
| url | string, required | The 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 PagesError responses
Errors return a JSON body with error (human message) and code (machine-readable).
| Status | Code | Meaning |
|---|---|---|
| 400 | MISSING_URL | No ?url= parameter provided. |
| 400 | INVALID_URL | URL is not a valid http/https URL. |
| 401 | MISSING_KEY | X-Api-Key header is absent. |
| 401 | INVALID_KEY | API key does not exist. |
| 402 | NO_CREDITS | Account has no credits remaining. |
| 429 | RATE_LIMITED | Too many requests. Back off and retry. |
| 500 | FETCH_FAILED | Could not reach the target URL. |
| 504 | TIMEOUT | Target 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.