Skip to main content

Endpoint

Extracts all HTTP/HTTPS links from the current page with their anchor text.

Authentication

No authentication required. All endpoints use userId for session isolation.

Path parameters

string
required
The unique identifier of the tab

Query parameters

string
required
User identifier for session isolation
integer
default:"50"
Maximum number of links to return per request (used for pagination)
integer
default:"0"
Starting index for pagination (0-based)

Response

Array of link objects
object
Pagination metadata
  • Only links with href attribute are included
  • Only HTTP/HTTPS URLs are included (filters out mailto:, tel:, javascript:, etc.)
  • Anchor text is trimmed and truncated to 100 characters
  • Empty anchor text appears as empty string ""
  • Links are returned in DOM order (top to bottom)
  • No deduplication - duplicate URLs appear multiple times if they exist multiple times in the DOM

Error codes

  • 400 - Missing required parameter (userId)
  • 404 - Tab not found
  • 500 - Internal server error

Examples

Use cases

Site crawling

Extract all links from a page to build a crawl queue:
Search for a link by text or URL pattern (client-side filtering):

Verify navigation options

Check what links are available before choosing where to navigate:

Filtering and deduplication

The endpoint does not perform server-side filtering or deduplication. To filter links:

Client-side deduplication (bash + jq)

Filter by domain

Filter by anchor text

Comparison with snapshot

Best practices

  1. Use moderate limits: Start with limit=50, increase only if needed
  2. Scroll first for lazy-loaded links: Call /scroll before /links for infinite-scroll pages
  3. Deduplicate client-side: Use jq or similar tools to remove duplicate URLs
  4. Filter by domain: Avoid following external links when crawling a specific site
  5. Check hasMore: Always verify pagination metadata before assuming you have all links