{
  "slug": "link-extractor",
  "name": "gizza-ai/link-extractor",
  "version": "0.1.0",
  "title": "Link Extractor — Pull Hyperlinks & Anchors from HTML or Markdown — gizza.ai",
  "description": "Extract every hyperlink and in-page anchor from pasted HTML or Markdown — URL, link text, relative-link flags, text or JSON output. Free, in your browser.",
  "tags": [
    "link extractor",
    "extract links from html",
    "extract links from markdown",
    "list all hyperlinks",
    "anchor extractor"
  ],
  "category": "network",
  "urls": {
    "page": "https://gizza.ai/tools/link-extractor/",
    "markdown": "https://gizza.ai/tools/link-extractor/index.md",
    "descriptor": "https://gizza.ai/tools/link-extractor/tool.json",
    "deep_link_example": "https://gizza.ai/tools/link-extractor/?input=Paste%20HTML%20or%20Markdown%20containing%20links%E2%80%A6&source=auto&base_url=https%3A%2F%2Fexample.com%2Fdocs%2F&dedup=true&output=text"
  },
  "cli": "gizza tool link-extractor \"Paste HTML or Markdown containing links…\"",
  "tool": {
    "description": "Extract every hyperlink and in-page anchor (jump target) from HTML or Markdown. Set source='auto' (default; sniffed from the content), 'html', or 'markdown'. Pass base_url to resolve relative links to absolute, and dedup=true to collapse repeated links. Returns the parser used plus a list of links (each with its url, visible text, a relative flag, and any HTML rel attribute) and a list of anchors (id/name attributes or heading slugs that a same-document '#name' link would jump to). Runs locally.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "base_url": {
          "description": "Optional absolute base URL (e.g. \"https://example.com/docs/\"). When set, relative links are resolved to absolute URLs.",
          "type": "string"
        },
        "dedup": {
          "default": false,
          "description": "When true, collapse repeated links that share the same final URL (first-seen kept).",
          "type": "boolean"
        },
        "input": {
          "description": "The HTML or Markdown to scan for links and anchors.",
          "type": "string"
        },
        "source": {
          "default": "auto",
          "description": "How to parse the input: \"auto\" (default, sniffed from the content), \"html\", or \"markdown\".",
          "enum": [
            "auto",
            "html",
            "markdown"
          ],
          "type": "string"
        }
      },
      "required": [
        "input"
      ],
      "type": "object"
    }
  }
}