web_extract_links
Fetch a web page and extract all hyperlinks. Optionally filter links by regex pattern or restrict to same domain. Useful for discovering related pages or building navigation maps.
Instructions
Extract all links from a web page.
Fetches a page and extracts all hyperlinks, optionally filtering by pattern or domain. Useful for discovering related pages or building navigation maps.
Example: web_extract_links(url="https://docs.microsoft.com/...")
web_extract_links(
url="https://example.com",
filter_pattern=r"/docs/",
same_domain_only=True
)Args: url: The URL to extract links from filter_pattern: Regex pattern to filter links (optional) same_domain_only: Only return links to the same domain (default: False) timeout: Request timeout in seconds (default: 30)
Returns: Dictionary with extracted links and their text
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The URL to extract links from | |
| filter_pattern | No | Regex pattern to filter links (optional) | |
| same_domain_only | No | Only return links to the same domain (default: False) | |
| timeout | No | Request timeout in seconds (default: 30) |