Cogny CLI · SEO

    Ahrefs from the shell.

    Pull Domain Rating, backlinks, referring domains, organic keywords, top pages and SERP overviews from the Ahrefs API v3 — straight from Bash. No CSV exports, no manual Site Explorer clicking, just the Cogny CLI over the Ahrefs MCP.

    # 1. sign up (free for 15 calls) — uses your git email
    $ npx @cogny/cli init --agent claude-code
    
    # 2. see every Ahrefs tool
    $ cogny tools list
    
    # 3. call any tool from Bash — no MCP wiring
    $ cogny tools call mcp__Ahrefs__domain_rating --input '{…}'
    ❯ start Cogny Solo — $9/mo@cogny/cli on npm →

    cogny --who

    TWO PATHS
    You're a human

    Today you open Ahrefs Site Explorer, run a report per tab, and export CSVs you then stitch together by hand. The CLI returns the exact rows you ask for as JSON you can sort, diff, or pipe into an agent in one call. Connect Ahrefs once in Cogny Solo and let your coding agent — or scheduled reports — do the querying for you.

    ❯ start Solo
    You're an agent

    Self-onboard with one command. The CLI issues a key, wires nothing, and exposes every Ahrefs tool over JSON-RPC. First 15 calls are free.

    $ npx @cogny/cli init --agent claude-code

    cogny tools call

    3 EXAMPLES

    Real tool names from the Ahrefs MCP. Send --input JSON, get JSON back.

    mcp__Ahrefs__domain_ratingDomain Rating (0-100) for any target domain.
    $ cogny tools call mcp__Ahrefs__domain_rating \
      --input '{"target":"example.com"}'
    example response
    {
      "domain_rating": {
        "domain_rating": 74,
        "ahrefs_rank": 18422
      }
    }
    mcp__Ahrefs__organic_keywordsKeywords a target ranks for, with volume, position and traffic.
    $ cogny tools call mcp__Ahrefs__organic_keywords \
      --input '{"target":"example.com","country":"us","limit":3,"order_by":"traffic:desc"}'
    example response
    {
      "keywords": [
        {
          "keyword": "running shoes",
          "volume": 49500,
          "position": 4,
          "url": "https://example.com/shoes",
          "traffic": 3120
        },
        {
          "keyword": "trail running shoes",
          "volume": 22200,
          "position": 2,
          "url": "https://example.com/trail",
          "traffic": 2840
        },
        {
          "keyword": "best running shoes 2026",
          "volume": 14800,
          "position": 6,
          "url": "https://example.com/best",
          "traffic": 910
        }
      ]
    }
    mcp__Ahrefs__backlinksList backlinks pointing to a target, newest first.
    $ cogny tools call mcp__Ahrefs__backlinks \
      --input '{"target":"example.com","mode":"domain","limit":2,"order_by":"domain_rating_source:desc"}'
    example response
    {
      "backlinks": [
        {
          "url_from": "https://nytimes.com/wirecutter/shoes",
          "url_to": "https://example.com/",
          "anchor": "best running shoes",
          "domain_rating_source": 93,
          "first_seen": "2026-04-02"
        },
        {
          "url_from": "https://runnersworld.com/gear",
          "url_to": "https://example.com/trail",
          "anchor": "trail picks",
          "domain_rating_source": 81,
          "first_seen": "2026-03-18"
        }
      ]
    }

    cogny tools list

    MORE

    A sample of the rest of the Ahrefs surface. Run cogny tools list --json for every tool and its input schema.

    mcp__Ahrefs__subscription_infomcp__Ahrefs__backlinks_statsmcp__Ahrefs__refdomainsmcp__Ahrefs__site_explorer_overviewmcp__Ahrefs__organic_competitorsmcp__Ahrefs__top_pagesmcp__Ahrefs__keywords_explorermcp__Ahrefs__serp_overviewmcp__Ahrefs__batch_analysis

    cogny --faq

    Is this an official Ahrefs CLI?

    No — it is the Cogny CLI calling the Ahrefs MCP over the cogny-mcp-proxy. You connect your Ahrefs API token once inside Cogny and then call every endpoint from Bash. No bespoke API client to wire up.

    Does it use my Ahrefs API units?

    Yes. The proxy calls the Ahrefs API v3 with your token, so each call consumes your account/subscription units exactly as a direct API call would. Use `subscription_info` to check remaining units.

    Can my coding agent run these calls?

    Yes. After `npx @cogny/cli init` issues a key, an agent can call `cogny tools call mcp__Ahrefs__organic_keywords --input ...` from any shell — no MCP wiring or restart needed.

    related CLIs

    /cli/semrush/cli/search-console/cli/brave-search

    Building an agent? The full tool map for all servers is one fetch: /cli/llms.txt