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_linksAuth Required
2 req/s on Free plan
1 credit
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
url | string | Required | - | URL to extract links from Example: https://example.com |
filter_external | boolean | Optional | false | If true, only return internal links (same domain) Example: false |
base_url | string | Optional | - | 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 URLdata.total_linksTotal number of links founddata.internal_linksNumber of links to the same domaindata.external_linksNumber of links to external domainsRelated Tools
Ready to extract links? Sign up for free and get 1,000 credits.