API Docs/Data & Scraping
POST

Link Extractor API

Free Public API

Discover all internal and external hyperlinks, anchor texts, and domain frequency breakdowns.

Try in Live Web Tool
POSThttps://api.headless-lender.com/api/v1/links
Public: No Key Needed•Highest Free Quota: 1,000 Req/Mo + 10h Browsers (No Card Required)

Overview & Architecture

Inspect all outgoing hyperlinks on any webpage. Filter internal vs external links, identify broken references, inspect anchor texts, and view domain distribution charts.

Categorized internal vs external link separation
Domain frequency graph distribution
Anchor text extraction and deduplication
Resolves relative URLs into absolute canonical links
Playwright Execution & Valkey Caching Pipeline

Because this endpoint utilizes full headless Chromium rendering, dynamic JavaScript and single-page apps (SPAs) are executed completely before conversion:

1. Cold Scrape (Cache MISS)~800ms – 2.5s

Chromium initializes, fetches the URL, executes client JavaScript, resolves DOM mutations, and generates output.

2. Repeat Request (Cache HIT)~5ms – 15ms

Returned instantly from Valkey/Redis cache with header X-Lender-Cache: HIT (15-minute TTL).

Code Integration Examples

Instant Public Endpoint: Zero configuration, no API key needed. Want our highest free quota? Get 1,000 free requests/month + 10 hours of cloud browsers with a free key (No credit card required).
curl -X POST https://api.headless-lender.com/api/v1/links \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://news.ycombinator.com",
    "maxLinks": 100,
    "includeExternal": true
  }'

Headers & Authentication Standard

1. Public Access (No Key)

No Authorization header required. Simply send a JSON POST request. Perfect for quick prototypes, small scripts, and low-volume scraping.

Content-Type: application/json

2. Free API Key (Highest Free Quota)

1,000 Req/Mo Free

Sign up in 10s with no credit card required. Unlocks 1,000 free monthly requests, 600 browser minutes (10 hours), 120 req/min burst limits, and cache-bypass controls.

Authorization: Bearer hl_live_your_api_key_here
Access ModeMonthly QuotaCloud Browser TimeBurst LimitCredit CardAction
Public AnonymousDaily IP Allowance5-min trial sandbox10 req/minNoneInstant (No Setup)
Free Account (Highest Quota)1,000 Req / Month600 Mins (10 Hours)120 req/minZero ($0 forever)Claim Free Key →

Request Body Parameters

FieldTypeRequiredDefaultDescription
urlstringrequired—Target webpage URL to extract links from.
maxLinksnumberoptional150Maximum number of links to return.
sameDomainOnlybooleanoptionalfalseReturn only internal links on the same origin domain.
includeExternalbooleanoptionaltrueInclude external third-party links.

Response Schema & Example

200 OK — application/jsonDuration: ~800ms (Cold) / ~8ms (Cached)
{
  "url": "https://news.ycombinator.com",
  "totalLinks": 85,
  "internalCount": 42,
  "externalCount": 43,
  "domainStats": {
    "news.ycombinator.com": 42,
    "github.com": 12,
    "nytimes.com": 4,
    "blog.cloudflare.com": 3
  },
  "links": [
    {
      "href": "https://github.com/trending",
      "text": "GitHub Trending",
      "isExternal": true,
      "domain": "github.com"
    },
    {
      "href": "https://news.ycombinator.com/newest",
      "text": "new",
      "isExternal": false,
      "domain": "news.ycombinator.com"
    }
  ],
  "durationMs": 220
}