Skip to content

Link Checker API Tutorial

The Apixies Link Checker API tells you if a URL is alive. You give it a URL, it gives you back the HTTP status code, response time, content type, SSL status, and redirect info. One GET request, no need to handle timeouts and redirects yourself.

What You Get Back

Field What it tells you
reachable Whether the URL responded at all
status_code HTTP status code (200, 301, 404, 500, etc.)
response_time_ms How long the server took to respond
content_type The response's Content-Type header
ssl Whether the connection used HTTPS
final_url Where the URL ended up after redirects
redirect_count Number of redirects followed
checked_at Timestamp of the check

Quick Example

curl -H "X-API-Key: YOUR_API_KEY" \
  "https://apixies.io/api/v1/check-link?url=https://github.com"

Response:

{
  "status": "success",
  "http_code": 200,
  "code": "SUCCESS",
  "message": "Link check completed",
  "data": {
    "url": "https://github.com",
    "reachable": true,
    "status_code": 200,
    "content_type": "text/html; charset=utf-8",
    "response_time_ms": 185,
    "ssl": true,
    "final_url": "https://github.com/",
    "redirect_count": 0,
    "checked_at": "2026-02-26T10:30:00Z"
  }
}

The URL is alive, responding in 185ms, using HTTPS, and didn't redirect anywhere.

Authentication

Pass your API key in the X-API-Key header. Anonymous access gives you 20 requests/day. A free account bumps that to 75/day.

Step-by-Step: Check a URL

Step 1: Check if a URL is alive

The simplest use. Just pass a URL:

curl -H "X-API-Key: YOUR_API_KEY" \
  "https://apixies.io/api/v1/check-link?url=https://stripe.com/docs"

If reachable is true and status_code is in the 200 range, the link works.

Step 2: Detect Redirects

Some URLs redirect. The API follows them and tells you where they end up:

curl -H "X-API-Key: YOUR_API_KEY" \
  "https://apixies.io/api/v1/check-link?url=http://github.com"

http://github.com redirects to https://github.com. The final_url field shows the destination, and redirect_count tells you how many hops it took.

Step 3: Interpret Status Codes

  • 2xx (200, 201, 204): the link works
  • 3xx (301, 302, 307): redirect. The API follows it for you, but the original URL is still a redirect
  • 4xx (403, 404, 410): dead link. 404 means not found, 410 means permanently gone
  • 5xx (500, 502, 503): server error. Might be temporary

Check reachable first. If it's false, the server didn't respond at all (DNS failure, connection refused, timeout).

Code Examples

JavaScript

const response = await fetch(
  "https://apixies.io/api/v1/check-link?url=https://github.com",
  { headers: { "X-API-Key": "YOUR_API_KEY" } }
);

const { data } = await response.json();

if (!data.reachable) {
  console.warn("URL is unreachable");
} else if (data.status_code >= 400) {
  console.warn(`Broken link: HTTP ${data.status_code}`);
} else {
  console.log(`OK: ${data.status_code} in ${data.response_time_ms}ms`);
}

Python

import requests

response = requests.get("https://apixies.io/api/v1/check-link",
    headers={"X-API-Key": "YOUR_API_KEY"},
    params={"url": "https://github.com"},
)

data = response.json()["data"]
print(f"Reachable: {data['reachable']}, Status: {data['status_code']}, Time: {data['response_time_ms']}ms")

PHP

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://apixies.io/api/v1/check-link?url=" . urlencode("https://github.com"));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "X-API-Key: YOUR_API_KEY",
]);

$response = curl_exec($ch);
curl_close($ch);

$data = json_decode($response, true)["data"];
echo "{$data['status_code']} - {$data['response_time_ms']}ms\n";

Common Use Cases

  • Broken link detection: Check all links on a page to find dead ones. See the monitoring guide for a full setup.
  • Uptime checks: Call the API on a schedule to verify your sites are responding.
  • Redirect auditing: Find URLs that redirect and where they go. Useful after a site migration.
  • Content freshness: Check if external resources your site links to are still online.

Next Steps

Try the Link Checker API

Free tier is for development & small projects. 75 requests/day with a registered account.

Getting Started

Explore

Resources

Get Started Free

Free for development and small projects.

Get Free API Key

We use cookies for analytics to understand how our site is used. Privacy Policy