links returns every link on the page as an absolute URL, in page order.
Make a request
Get an API key in the Quickstart. This request lists the links of a small page.Read the response
data.links is an array of strings. This page has 26 links. The real response is cut to the first four.
onlyMainContent is true. Links inside the Markdown follow linkStyle instead. See Content filtering.
Options
Limits and errors
- A PDF comes back as Markdown only. Asking for
linkson a PDF returns400 invalidRequest. - A page that answers with a 404 or 410 status, or cannot be read, costs nothing.
Price
$1 per 1,000 pages.links adds nothing to the price of the page.
Related
- Map lists the pages of a whole site without reading them.
- Crawl follows links and reads every page of a site.
- Images lists the image URLs on a page.
- Content filtering controls how links appear in the Markdown.