Skip to main content

HTTP Uptime Check

free
GET/v1/network/http-check

Performs a single HTTP(S) request to a URL and reports status code, total response time, content size, redirect chain, and TLS handshake verification. Stateless — use this as an on-demand "is my site up?" probe rather than scheduled monitoring. Runs from the Cloudflare Workers network with edge cache bypassed so every check hits the origin.

What It Does

Issues an HTTP HEAD (default) or GET request to the target URL with a configurable timeout and redirect policy. Returns the final status code, total response time, accurate content length (via streamed byte count on GET, or Content-Length header on HEAD), response headers (Content-Type, Server, Cache-Control), the full redirect chain, and — for HTTPS URLs — whether the TLS handshake completed successfully. Non-2xx responses and network failures are reported with status/error fields; only invalid input returns HTTP errors.

Why It's Useful

Know in one call whether a URL is reachable, how fast it responds end-to-end, and whether it is serving the content you expect. Essential for post-deploy smoke tests, CI/CD gating, third-party dependency health checks, and as a building block for custom monitoring dashboards. Distinct from ICMP ping, which only proves a host is reachable at the network layer — an HTTP check proves the actual web service is serving requests.

Use Cases

DevOps Engineer

Post-Deploy Smoke Test

Immediately after a deploy, fire an HTTP check against canary URLs to confirm the new version returns 200 OK with expected response time before promoting traffic or firing downstream webhooks.

Catch broken deploys in seconds instead of waiting for users or scheduled monitors to report outages.

Backend Engineer

Third-Party API Availability Probe

Before running a batch job that depends on an external API, check that the API's health endpoint responds fast enough. Gate the job or switch to a fallback if timing or status is off.

Fail fast on upstream outages and avoid cascading failures in dependent workflows.

SRE

Synthetic Monitoring Primitive

Build custom uptime dashboards and alerts by polling this endpoint from a scheduler and pushing results to a metrics backend. Gives you status, response time, and content size without running your own probe infrastructure.

Skip the complexity of running monitoring agents — compose availability checks from a single API call.

Parameters

NameTypeRequiredDescription
urlstringRequiredURL to check. Accepts a full http(s) URL, a bare hostname, or an IP address — "http://" is added automatically if no scheme is present. Private IPs, cloud metadata hosts, and non-http(s) schemes are rejected.Example: https://example.com
methodstringOptionalHTTP method: "HEAD" (cheapest, no body) or "GET" (measures actual download size). Defaults to "HEAD".Example: HEADOptions: HEAD, GET
follow_redirectsbooleanOptionalWhether to follow 3xx redirects. When false, the first redirect response is returned as-is. Defaults to true.Example: true
max_redirectsnumberOptionalMaximum number of redirects to follow (0-10). Defaults to 5.Example: 5
timeoutnumberOptionalRequest timeout in milliseconds (1000-30000). Defaults to 10000.Example: 10000

Response Fields

FieldTypeDescription
urlstringThe URL that was checked (original, before redirects)
final_urlstringThe URL after following any redirects
methodstringHTTP method used: "HEAD" or "GET"
status.codenumberHTTP status code (e.g., 200, 404, 500). Null if the request never produced a response.
status.okbooleanWhether the status code is in the 2xx range
timings.total_msnumberTotal wall-clock time from request start to response fully received (ms)
content_length_bytesnumberActual downloaded body size in bytes for GET requests; Content-Length header value for HEAD. Null if unavailable.
headers.content_typestringResponse Content-Type header (e.g., "text/html; charset=utf-8")
headers.serverstringResponse Server header, if present
headers.cache_controlstringResponse Cache-Control header, if present
headers.content_lengthstringResponse Content-Length header, if present
redirectsarrayChain of redirects followed. Each entry: { from, to, status }.
ssl.verifiedbooleanFor HTTPS URLs: true if the TLS handshake succeeded. Null for plain http:// URLs.
errorstringError label when the check failed: "timeout", "fetch_failed", "invalid_redirect_location" (the Location header could not be parsed as a URL), or an underlying error message. Null on success.
checked_atstringISO-8601 timestamp of when the check started

Code Examples

cURL
curl "https://api.edgedns.dev/v1/network/http-check" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d "url=https://example.com"
JavaScript
const response = await fetch(
  'https://api.edgedns.dev/v1/network/http-check?url=https%3A%2F%2Fexample.com',
  {
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY'
    }
  }
);

const data = await response.json();
console.log(data);
Python
import requests

response = requests.get(
    'https://api.edgedns.dev/v1/network/http-check',
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    params={
    'url': 'https://example.com'
    }
)

data = response.json()
print(data)

Read the full HTTP Uptime Check guide

Why it matters, real-world use cases, parameters, response fields, and how to call it from Claude, ChatGPT, or Gemini via MCP.

Read the guide →

Related Endpoints

External References

Learn more about the standards and protocols behind this endpoint.

Try This Endpoint

Test the HTTP Uptime Check endpoint live in the playground.