# URL Freshness Check

> URL Freshness Check is a paid API for AI agents from defi-shield-hazel.vercel.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-11, last successful call 2026-04-20).

Performs a real HTTP fetch of a URL and analyzes cache headers, staleness, ETag, and response time to determine if the resource is fresh or stale.

## Facts

- Endpoint: POST https://defi-shield-hazel.vercel.app/api/safety/freshness-check?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Last successful call: 2026-04-20
- Success rate: 100% of calls made through Zero
- Rating: 5.0 / 5 from 1 review
- Activations on Zero: 1
- Tags: x402
- Canonical page: https://www.zero.xyz/c/defi-shield-hazel-vercel-app-b36dcd7b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_O9VGm88xbnJqjmnqRnqH8

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability defi-shield-hazel-vercel-app-b36dcd7b -d '<json body>'
```

Example prompt: Can you check if https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd is returning fresh data right now — I want to know if the response is stale, what its cache age is, and whether it's actually reachable?

## When to prefer this

Use this endpoint when you need to programmatically verify whether a specific URL is serving fresh or stale content based on real HTTP cache headers, rather than relying on static assumptions. Ideal for monitoring data pipelines, validating third-party API freshness before consuming their data, or checking whether a CDN or cache layer is behaving correctly. Prefer this over simple availability checks when cache semantics (max-age, ETag, must-revalidate) matter for your use case.

## Known failure modes

- URL is unreachable or returns a network error — reachable: false with no cache data
- Request to target URL times out after 5 seconds — timeout error returned
- Target URL returns a non-200 status code — status_code reflects the error, freshness may be undetermined
- Malformed or missing URL input — validation error response
- Target URL blocks the checker's IP or returns a captcha/403

## Output

Returns a JSON object with the target URL's reachability status, HTTP status code, freshness_status (fresh/stale), age_seconds, cache_control directives, cache_max_age, ETag, last_modified, response_time_ms, content_type, server, an array of freshness_signals supporting the determination, and an array of staleness_reasons if applicable, plus the timestamp it was analyzed.

## Example request

```json
{
 "input": {
  "body": {
   "url": "https://api.coingecko.com/api/v3/simple/price?ids=ethereum&vs_currencies=usd"
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/defi-shield-hazel-vercel-app-b36dcd7b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from defi-shield-hazel.vercel.app](https://www.zero.xyz/host/defi-shield-hazel.vercel.app/llms.txt)
