← URL Lens

API & evidence guide

Public, bounded endpoints. No phishing verdict, destination fetch or automatic report submission.

API calls are not offline. Unlike local analysis on the main page, /api/inspect transmits the complete URL and optional label to this service. Do not submit confidential URLs. Application code does not intentionally log requests or store inputs, but hosting and lookup providers may retain requests. API requests and responses are not a sanitization guarantee: hostnames can contain secrets.

POST /api/inspect

Content-Type: application/json. Required string url; optional string label and boolean nested (default false). Native URL parsing without DNS or network calls. Returns parsed, comparison, and optionally nested.

{"url":"https://example.com/","label":"example.com","nested":false}

Only explicit HTTP(S) URLs, maximum 8,192 UTF-16 code units. Credentials, paths, query values and fragments are not echoed. Selected nested hostnames can be shown when requested; fixed case-insensitive query names (url, uri, redirect, redirect_url, redirect_uri, next, continue, return, returnto, return_to, destination, dest, target), one decoding pass per level, 50 pairs per URL, two nested levels, ten candidates including rejections. Other names are not inspected. Omitted or rejected values (including scheme-relative or schemeless values) may still be used as redirects by a destination site. An empty result is not evidence of no redirects. Exact hostname comparisons preserve a trailing dot; that difference alone does not establish different ownership or deception. See the source for the complete offline parser contract.

POST /api/lookup

Content-Type: application/json. Only hostname and explicit consent: true accepted. Send a hostname, not a complete URL. ASCII DNS labels (including punycode), an optional final dot, or a canonical public IP; reserved/local names and special IP ranges are rejected. IPv6 live lookups are conservatively limited to public unicast within 2000::/3.

{"hostname":"example.com","consent":true}
  1. Google Public DNS resolves A and AAAA records. The first 64 answers per response are considered; up to eight public IPs in total and eight CNAMEs per response are shown. Nonpublic/invalid address answers are counted but not shown or enriched.
  2. At most one returned public IP is enriched (IPv4 first). Literal IP input skips DNS.
  3. RIPEstat supplies route-origin AS numbers and the covering prefix. This is not proof of hosting responsibility or site ownership.
  4. ARIN RDAP, with up to two redirects to a fixed allowlist of regional registries, supplies the covering IP network’s name, handle, country, range and type when present. Personal contact records are omitted. Registration country is not a reliable server location.

Results include source URLs, queries, timestamps, statuses and partial failures. Maximum six outbound requests, each with a four-second deadline and 128 KiB response limit. No website content, redirects, reputation feeds, domain-registration history, abuse contacts or TLS certificates are retrieved. A CNAME is a DNS alias, not an HTTP redirect.

TLS is explicitly unavailable. The checked Workers TCP documentation exposes connection addresses and TLS transport controls, but no peer-certificate inspection API; this release does not substitute an HTTPS string or successful fetch for certificate evidence.

Limits and errors

24 KiB maximum JSON request body, four-second body-read deadline, unknown fields rejected. Supported API paths reject query strings. Browser requests must use this origin; no wildcard CORS. Nonbrowser clients may omit Origin. Missing rate-limit infrastructure fails closed.

A Cloudflare rate-limit binding allows approximately 20 API requests per 60 seconds per client IP and 20 per shared location bucket; buckets are per Cloudflare location, not a strict worldwide quota. Inspect and lookup share the buckets. A rate limit returns 429; invalid inputs 400, wrong method 405, wrong media type 415, cross-origin browser requests 403, unavailable limiter 503. Partial upstream failures can return 200 with individual unavailable statuses—200 does not mean the target is safe.

GET /api/health reports service identity and the unavailable TLS feature without querying providers. It is not a comprehensive service-health check.

Report drafting

The main page creates a plain-text draft in your browser, with the parsed hostname, any current infrastructure evidence and explicitly attributed user observations. It does not send the narrative to the server, select a recipient, make an abuse finding, or submit a report. Review accuracy and sensitive information, verify the reporting channel and choose whether to send it yourself. API responses can be used as evidence inputs; there is no report-dispatch endpoint.

Local hostname similarity (no API request)

Step 4 compares the analyzed outer hostname against up to 20 explicit reference hostnames using whole-hostname unique bigram/trigram Dice overlap. Native lowercase/IDNA normalization removes one final DNS dot; full scores, counts, shared grams, method and limits can be downloaded as JSON. This is not a phishing probability, brand/ownership determination or visual/logo detector; different strings can score 1 and common suffixes can dominate.

Comparison stays in your browser and has no new server endpoint. It does not fetch a destination or use the live-lookup consent. Downloads omit original URL components but contain potentially sensitive target/reference hostnames. See method and synthetic tests and the feature roadmap.

Provider-data terms

Provider results are not covered by this project’s source-code license. Use ARIN-derived data only as permitted by the ARIN Whois/RDAP Terms of Use, including their restrictions on commercial services and marketing and their requirements for onward access. Those terms apply to ARIN-derived API results and downloads too; other providers’ terms also apply. Do not treat live results as an unrestricted open dataset.

The MIT source-code license does not relicense upstream data. Further contact-discovery work is gated on provider-specific access, redistribution and privacy review; see the research note.