Basic Tool1 credit

extract_links

Discover and extract all links from a webpage. Perfect for sitemap generation, link analysis, and crawling workflows.

Use Cases

Sitemap Generation

Build comprehensive sitemaps by extracting all internal links

Link Discovery for Crawling

Find all URLs to visit in a web crawling workflow

Internal Link Analysis

Analyze internal linking structure for SEO optimization

Broken Link Detection

Find and validate all links on a page

Endpoint

POST/api/v1/tools/extract_links
Auth Required
2 req/s on Free plan
1 credit

Parameters

NameTypeRequiredDefaultDescription
url
stringRequired-
URL to extract links from
Example: https://example.com
filter_external
booleanOptionalfalse
If true, only return internal links (same domain)
Example: false
base_url
stringOptional-
Base URL for resolving relative links
Example: https://example.com

Request Examples

cURL - Extract All Links

terminalBash

TypeScript - Internal Links Only

extractLinks.tsTypescript

Response Example

200 OK210ms
{
"success": true,
"data": {
"url": "https://example.com",
"links": [
{
"text": "Home",
"url": "https://example.com/",
"internal": true
},
{
"text": "About",
"url": "https://example.com/about",
"internal": true
},
{
"text": "Products",
"url": "https://example.com/products",
"internal": true
},
{
"text": "External Resource",
"url": "https://other-site.com",
"internal": false
}
],
"total_links": 4,
"internal_links": 3,
"external_links": 1
},
"credits_used": 1,
"credits_remaining": 999,
"processing_time": 210
}
Field Descriptions
data.linksArray of all discovered links with text and URL
data.total_linksTotal number of links found
data.internal_linksNumber of links to the same domain
data.external_linksNumber of links to external domains

Related Tools