katsau Docs
GET/v1/extract

Extract metadata from any URL including Open Graph, Twitter Card, and more.

Query Parameters

NameTypeRequiredDefaultDescription
urlstring-The URL to extract metadata from (URL encoded)
cachebooleantrueWhether to use cached results if available
max_ageinteger3600Maximum cache age in seconds. Only fetch fresh if cache is older.
Try it out
GET /v1/extract

Test the extract endpoint with any URL

curl "https://api.katsau.com/v1/extract?url=https%3A%2F%2Fgithub.com&cache=true" \
  -H "Authorization: Bearer YOUR_API_KEY"

Request Example

curl "https://api.katsau.com/v1/extract?url=https://github.com" \
  -H "Authorization: Bearer ks_live_your_api_key"

Response

{
  "success": true,
  "data": {
    "url": "https://github.com",
    "resolved_url": "https://github.com/",
    
    "title": "GitHub: Let's build from here",
    "description": "GitHub is where over 100 million developers shape the future of software.",
    "image": "https://github.githubassets.com/images/modules/site/social-cards/github-social.png",
    
    "open_graph": {
      "title": "GitHub: Let's build from here",
      "description": "GitHub is where over 100 million developers...",
      "image": "https://github.githubassets.com/images/.../github-social.png",
      "url": "https://github.com",
      "type": "website",
      "site_name": "GitHub",
      "locale": "en_US"
    },
    
    "twitter": {
      "card": "summary_large_image",
      "site": "@github",
      "creator": "@github",
      "title": "GitHub: Let's build from here",
      "description": "GitHub is where over 100 million developers...",
      "image": "https://github.githubassets.com/images/.../github-social.png"
    },
    
    "meta": {
      "author": null,
      "keywords": ["git", "github", "development"],
      "theme_color": "#1e2327",
      "canonical_url": "https://github.com",
      "favicon": "https://github.githubassets.com/favicons/favicon.svg",
      "language": "en",
      "charset": "utf-8"
    },
    
    "article": {
      "published_time": null,
      "modified_time": null,
      "author": null,
      "section": null,
      "tags": []
    },
    
    "icons": [
      {
        "url": "https://github.githubassets.com/favicons/favicon.svg",
        "type": "image/svg+xml",
        "sizes": "any"
      },
      {
        "url": "https://github.githubassets.com/favicons/favicon.png",
        "type": "image/png",
        "sizes": "32x32"
      }
    ]
  },
  "meta": {
    "request_id": "req_abc123xyz",
    "response_time_ms": 234,
    "cache_hit": false,
    "cache_ttl": 3600,
    "fetched_at": "2024-01-15T10:30:00Z"
  }
}

Response Fields

Top-level fields

urlOriginal URL requested
resolved_urlFinal URL after redirects
titleBest available title (OG or HTML)
descriptionBest available description
imagePrimary image URL

open_graph object

All Open Graph meta tags from the page

titleog:title
descriptionog:description
imageog:image
typeog:type (website, article, etc.)
site_nameog:site_name

Error Codes

CodeHTTPDescription
INVALID_URL400URL format is invalid
URL_TOO_LONG400URL exceeds 2048 characters
TARGET_TIMEOUT502Target site did not respond within 10s
TARGET_UNREACHABLE502Could not connect to target URL