agentsvc.io

services / url-status

utilityoperational · 63 ms

URL Status & Redirect Check

Check whether a URL is reachable and what it returns: final status code, full redirect chain, response time, content-type, server header and content length. Use for link validation, uptime checks, canonical URL resolution or before spending money on a scrape/screenshot. Params: url (required), method (GET default, or HEAD).

Run free trial ↗3 free calls per day with the example input. Paid: $0.002 USDC, no limit.

Call it

import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agentsvc.io/api/v1/proxy/url-status", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({"url":"https://example.com"}),
});
const { data, payment } = await res.json();  // payment.transaction = on-chain receipt

Input

FieldTypeDescription
url *stringURL to check
methodGET | HEAD = "GET"

Output

FieldTypeDescription
urlstring
final_urlstring
statusinteger
okbooleanTrue for 2xx/3xx final status
reachableboolean
redirect_countinteger
redirectsarray
response_msinteger
content_typestring
content_lengthinteger
serverstring
httpsboolean
errorstring
checked_atstring

Example response (data)

{
  "url": "http://github.com",
  "final_url": "https://github.com/",
  "status": 200,
  "ok": true,
  "reachable": true,
  "redirect_count": 1,
  "redirects": [
    {
      "url": "http://github.com/",
      "status": 301,
      "location": "https://github.com/",
      "ms": 48
    },
    {
      "url": "https://github.com/",
      "status": 200,
      "ms": 210
    }
  ],
  "response_ms": 258,
  "content_type": "text/html; charset=utf-8",
  "content_length": 284421,
  "server": "GitHub.com",
  "https": true,
  "checked_at": "2026-09-09T12:00:00.000Z"
}