API Reference
The Glance API enriches any public URL, returning an AI-improved title, description, content type, and a generated preview image.
Base URL
https://api.useglance.ioAuthentication
All API requests require a Bearer token in the Authorization header.
Authorization: Bearer glance_your_api_key_here
Get your API key from the dashboard.
Enrich a URL
GET
/v1/enrichParameters
| Param | Type | Description |
|---|---|---|
url | string | Required. The URL to enrich. Must be URL-encoded. |
safety | boolean | Optional. Pass "true" to include a safety score in the response. |
Example
curl "https://api.useglance.io/v1/enrich?url=https%3A%2F%2Fgithub.com%2Fvercel%2Fnext.js" \ -H "Authorization: Bearer glance_..."
Safety check
Returns a risk assessment for any URL, powered by Google Safe Browsing plus heuristic analysis. Use it standalone or pass ?safety=true to the enrich endpoint to get both in one call.
GET
/v1/safetyExample
curl "https://api.useglance.io/v1/safety?url=https%3A%2F%2Fexample.com" \ -H "Authorization: Bearer glance_..."
Response
{
"url": "https://example.com",
"risk_level": "safe",
"risk_score": 0.02,
"threat_types": [],
"signals": [
{ "check": "google_safe_browsing", "result": "clean", "weight": "critical", "passed": true },
{ "check": "hostname_type", "result": "domain", "weight": "high", "passed": true },
{ "check": "phishing_patterns", "result": "clean", "weight": "high", "passed": true }
],
"cached": false, "processing_time_ms": 210
}risk_level values
safe | No threats detected. Risk score below 0.2. |
suspicious | Heuristic signals raised. Proceed with caution. Score 0.2 to 0.5. |
dangerous | Google Safe Browsing match or score above 0.5. |
Check usage
GET
/v1/usagecurl "https://api.useglance.io/v1/usage" \ -H "Authorization: Bearer glance_..."
Response format
All successful responses return JSON with the following fields.
{
"url": "https://github.com/vercel/next.js",
"title": "Next.js: The React Framework",
"description": "Next.js enables you to create full-stack web apps…",
"og_image": "https://api.useglance.io/v1/img/abc123",
"favicon": "https://github.com/favicon.ico",
"site_name": "GitHub",
"content_type": "repo",
"source": "generated",
"confidence": 0.95,
"safety": { // present when ?safety=true
"risk_level": "safe",
"risk_score": 0.02,
"threat_types": []
},
"cached": false,
"cached_at": null,
"processing_time_ms": 1240
}content_type values
articleproductrepoprofilelandingvideoothersource values
existing | OG tags were present and high quality, used as-is. |
generated | AI generated the title and/or description from page content. |
hybrid | OG tags were partially used and partially overridden by AI. |
Error codes
| Status | Meaning |
|---|---|
400 | Missing or invalid url parameter. |
401 | Missing or invalid Authorization header. |
429 | Monthly enrichment quota exceeded. |
500 | Internal error. The URL may be unreachable or unsupported. |
Rate limits
Limits are per-key, per calendar month. There is no per-second rate limit on any plan. If you exceed your monthly quota, all further requests return 429 until the quota resets or you upgrade.
See the pricing page for quota limits per plan.