# Extract all links from a page

> Enter the address of a public page and get the links on it as full URLs, marked same-site or external, with the sites it links to most. Copy them or download a CSV.

Canonical page: https://clawifi.dev/tools/extract-links

Run it on the page: enter a public URL and get its links as absolute URLs, marked same-site or external, with a CSV download. No key needed: https://clawifi.dev/tools/extract-links

## What it does

- Reads the page through Clawifi and collects the targets of its `<a href>` links, made absolute against the page’s address, without duplicates.
- Leaves out `mailto:`, `tel:`, `javascript:` and in-page `#` links, and marks each remaining link same-site (the page’s own host or a subdomain of it) or external.
- Counts the external sites the page links to, shows the first 25 links in a table and the full list as CSV you can copy or download.

## Limits

- The free preview stops at the first 100 links on the page.
- It reads links written as `<a href>` in the page; buttons and menus that only navigate through JavaScript do not have one, and `<link>` tags in the head are not included.
- Public pages only, one page per run, and 12 runs a minute per address shared with the other free tools and the [playground](https://clawifi.dev/playground).
- It does not follow the links or check that they work. To list a whole site’s URLs, see [Sitemap to JSON](https://clawifi.dev/tools/sitemap-to-json) or [Map and crawl](https://clawifi.dev/docs/map-and-crawl).

## Do this from your agent

From an agent, ask `scrape_url` for the `links` format with an API key (the keyless trial on the hosted MCP server returns Markdown and metadata only). With a key the list is not cut at 100.

**MCP**

```text
scrape_url(url="https://example.com", formats=["links"])
```

**cURL**

```sh
curl https://api.clawifi.dev/scrape \
  -H "Authorization: Bearer $CLAWIFI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com","formats":["links"]}'
```

**Python**

```python
from clawifi import Clawifi

client = Clawifi()  # reads CLAWIFI_API_KEY
page = client.scrape("https://example.com", formats=["links"])
for link in page["formats"]["links"]:
    print(link)
```

Read more: [Fetch and scrape](https://clawifi.dev/docs/fetch) · [POST /scrape](https://clawifi.dev/docs/api/post-scrape) · [Remote MCP](https://clawifi.dev/docs/remote-mcp) · [Docs](https://clawifi.dev/docs) · [Pricing](https://clawifi.dev/pricing)

## Questions

### How do I get all the links from a web page?

Paste the page’s URL above and press Extract links. The tool lists each link as a full URL, marks it same-site or external, and lets you download the list as a CSV file.

### What counts as a same-site link?

A link to the same host as the page, or to one of its subdomains (a leading `www.` is ignored). Everything else is external.

### Why are some links missing?

The tool reads `<a href>` links. Navigation built only with JavaScript click handlers has no address to read, and the free preview stops at 100 links.

### Does it check for broken links?

No. It lists the links on the page; it does not visit them. An agent can read each one with `fetch_url` or `scrape_url` and look at the result.

## Other free tools

- [URL to Markdown](https://clawifi.dev/tools/url-to-markdown): A public page as clean Markdown, ready for a prompt.
- [robots.txt and llms.txt checker](https://clawifi.dev/tools/llms-txt-checker): Which AI bots a site allows, and an llms.txt structure check.
- [Agent-readability test](https://clawifi.dev/tools/agent-readability-test): Can an agent read this page? Checks, each explained.
- [Sitemap to JSON](https://clawifi.dev/tools/sitemap-to-json): A sitemap.xml as JSON: URLs and lastmod, downloadable.
- [Website to plain text](https://clawifi.dev/tools/website-to-text): A page’s main text as plain text, no markup, as a .txt file.
- [Find the answer on a page](https://clawifi.dev/tools/find-answer-on-page): Ask a question of a long page, get only the passages that answer it.
- [Page date checker](https://clawifi.dev/tools/page-date-checker): Published and updated dates of a page, and where they came from.
- [All free tools](https://clawifi.dev/free-tools): The estimator, the request builder and every tool.
