Link Extractor API

Extract every link from any web page — filter by internal, external, nofollow, or broken, and export to JSON or CSV.

The Agenty Links API extracts every anchor from any web page along with its anchor text, rel attributes, and (optionally) HTTP status. Filter for internal, external, nofollow, sponsored, ugc, or broken links, then export as JSON or CSV for SEO audits and link-graph analysis.

Features

Use cases

API examples

Extract all links from a URL with cURLbash
curl -X GET "https://api.agenty.ai/v1/links?url=https://example.com" \
  -H "Authorization: Bearer YOUR_API_KEY"
Find broken external linksbash
curl -X POST https://api.agenty.ai/v1/links \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "filter": "external",
    "checkStatus": true
  }'
Extract links from a URL in Node.jsjavascript
const res = await fetch(
  'https://api.agenty.ai/v1/links?url=https://example.com',
  { headers: { 'Authorization': 'Bearer YOUR_API_KEY' } },
);
const { links } = await res.json();
links.forEach((l) => console.log(l.url, l.anchorText));
Extract links from a URL in Pythonpython
import requests

res = requests.get(
    "https://api.agenty.ai/v1/links",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    params={"url": "https://example.com"},
)
for link in res.json()["links"]:
    print(link["url"], link["anchorText"])

How Agenty compares

FeatureAgentyScreaming FrogAhrefsSEMrush
Extract all linksYes (hosted API)Desktop onlyYesYes
Broken link checkingYesYesYesYes
nofollow / sponsored / ugc detectionYesYesYesYes
API-first (no desktop app)YesNoPartialPartial
Free tierYesLimitedNoNo

Frequently asked questions

What is the Link Extractor API?

The Agenty Links API extracts every anchor link from any web page. It captures the URL, anchor text, rel attributes (nofollow, sponsored, ugc), and can check HTTP status codes to identify broken links.

Can I filter by link type?

Yes. Use the filter parameter to get only internal, external, nofollow, or broken links. Combine with checkStatus: true to verify link health.

Does it check if links are broken?

Yes. Set checkStatus: true and we perform HEAD requests on every link, flagging 404, 410, and 5xx responses as broken.

Can I export to CSV?

Yes. Add format: "csv" to your request to receive a CSV file with columns for URL, anchor text, rel attributes, status code, and link type.

Is there a free tier?

Yes. All accounts include free credits. Visit our pricing page for details.

Web scraping with AI

Start scraping data from any website using the Agenty's web scraping agents with AI.

No credit card required
14-day free trial
Cancel anytime
Log inSign up