{
  "service": "ahrefs",
  "displayName": "Ahrefs",
  "categories": [
    "Marketing",
    "Data"
  ],
  "authTypes": [
    "api_key"
  ],
  "auth": [
    {
      "type": "api_key",
      "label": "API Key",
      "placeholder": "AHREFS_API_KEY",
      "description": "Ahrefs API key used as a Bearer token. Create or manage API keys in Account settings / API keys after signing in: https://docs.ahrefs.com/en/api/docs/api-keys-creation-and-management."
    }
  ],
  "homepageUrl": "https://ahrefs.com/",
  "actions": [
    {
      "id": "ahrefs.get_keywords_overview",
      "service": "ahrefs",
      "name": "get_keywords_overview",
      "description": "Retrieve Keywords Explorer overview rows for keywords, a target, or a keyword list.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "country": {
            "type": "string",
            "minLength": 1,
            "description": "Two-letter country code in ISO 3166-1 alpha-2 format."
          },
          "select": {
            "type": "string",
            "minLength": 1,
            "description": "Comma-separated list of columns to return."
          },
          "keywords": {
            "type": "string",
            "minLength": 1,
            "description": "Comma-separated list of keywords to show metrics for."
          },
          "target": {
            "type": "string",
            "minLength": 1,
            "description": "Domain or URL used to filter keyword data."
          },
          "targetMode": {
            "type": "string",
            "enum": [
              "exact",
              "prefix",
              "domain",
              "subdomains"
            ],
            "description": "Scope of the Ahrefs target search."
          },
          "targetPosition": {
            "type": "string",
            "enum": [
              "in_top10",
              "in_top100"
            ],
            "description": "Ranking position filter for the specified target."
          },
          "keywordListId": {
            "type": "integer",
            "minimum": 1,
            "description": "Identifier of an existing Ahrefs keyword list."
          },
          "volumeMonthlyDateFrom": {
            "type": "string",
            "description": "Start date in YYYY-MM-DD format for retrieving historical monthly search volumes.",
            "format": "date"
          },
          "volumeMonthlyDateTo": {
            "type": "string",
            "description": "End date in YYYY-MM-DD format for retrieving historical monthly search volumes.",
            "format": "date"
          },
          "where": {
            "type": "string",
            "minLength": 1,
            "description": "Ahrefs filter expression."
          },
          "orderBy": {
            "type": "string",
            "minLength": 1,
            "description": "Column ordering expression accepted by Ahrefs."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "description": "Maximum number of keyword rows to return."
          },
          "timeout": {
            "type": "integer",
            "minimum": 1,
            "description": "Manual timeout duration in seconds."
          }
        },
        "additionalProperties": false,
        "required": [
          "country",
          "select"
        ],
        "description": "Input parameters for retrieving Ahrefs Keywords Explorer overview rows."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "data": {
            "anyOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": true,
                "description": "Object payload returned by Ahrefs."
              },
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "One Ahrefs result row."
                },
                "description": "Array payload returned by Ahrefs."
              }
            ],
            "description": "JSON data returned by Ahrefs."
          }
        },
        "additionalProperties": false,
        "description": "Normalized Ahrefs response wrapper."
      }
    },
    {
      "id": "ahrefs.get_limits_and_usage",
      "service": "ahrefs",
      "name": "get_limits_and_usage",
      "description": "Retrieve Ahrefs API subscription limits and current usage.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {},
        "additionalProperties": false,
        "description": "Input parameters for retrieving Ahrefs limits and usage."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "data": {
            "anyOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": true,
                "description": "Object payload returned by Ahrefs."
              },
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "One Ahrefs result row."
                },
                "description": "Array payload returned by Ahrefs."
              }
            ],
            "description": "JSON data returned by Ahrefs."
          }
        },
        "additionalProperties": false,
        "description": "Normalized Ahrefs response wrapper."
      }
    },
    {
      "id": "ahrefs.get_site_explorer_metrics",
      "service": "ahrefs",
      "name": "get_site_explorer_metrics",
      "description": "Retrieve Site Explorer metrics for a domain or URL.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "target": {
            "type": "string",
            "minLength": 1,
            "description": "Domain or URL to analyze with Ahrefs."
          },
          "date": {
            "type": "string",
            "description": "Date to report metrics on in YYYY-MM-DD format.",
            "format": "date"
          },
          "mode": {
            "type": "string",
            "enum": [
              "exact",
              "prefix",
              "domain",
              "subdomains"
            ],
            "description": "Scope of the Ahrefs target search."
          },
          "country": {
            "type": "string",
            "minLength": 1,
            "description": "Two-letter country code in ISO 3166-1 alpha-2 format."
          },
          "protocol": {
            "type": "string",
            "enum": [
              "both",
              "http",
              "https"
            ],
            "description": "Protocol filter for the target."
          },
          "volumeMode": {
            "type": "string",
            "enum": [
              "monthly",
              "average"
            ],
            "description": "Search volume calculation mode used by Ahrefs for volume, traffic, and traffic value."
          }
        },
        "additionalProperties": false,
        "required": [
          "target",
          "date"
        ],
        "description": "Input parameters for retrieving Ahrefs Site Explorer metrics."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "data": {
            "anyOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": true,
                "description": "Object payload returned by Ahrefs."
              },
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "One Ahrefs result row."
                },
                "description": "Array payload returned by Ahrefs."
              }
            ],
            "description": "JSON data returned by Ahrefs."
          }
        },
        "additionalProperties": false,
        "description": "Normalized Ahrefs response wrapper."
      }
    },
    {
      "id": "ahrefs.get_site_explorer_metrics_by_country",
      "service": "ahrefs",
      "name": "get_site_explorer_metrics_by_country",
      "description": "Retrieve Site Explorer metrics grouped by country for a domain or URL.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "target": {
            "type": "string",
            "minLength": 1,
            "description": "Domain or URL to analyze with Ahrefs."
          },
          "date": {
            "type": "string",
            "description": "Date to report metrics on in YYYY-MM-DD format.",
            "format": "date"
          },
          "mode": {
            "type": "string",
            "enum": [
              "exact",
              "prefix",
              "domain",
              "subdomains"
            ],
            "description": "Scope of the Ahrefs target search."
          },
          "select": {
            "type": "string",
            "minLength": 1,
            "description": "Comma-separated list of columns to return."
          },
          "protocol": {
            "type": "string",
            "enum": [
              "both",
              "http",
              "https"
            ],
            "description": "Protocol filter for the target."
          },
          "volumeMode": {
            "type": "string",
            "enum": [
              "monthly",
              "average"
            ],
            "description": "Search volume calculation mode used by Ahrefs for volume, traffic, and traffic value."
          }
        },
        "additionalProperties": false,
        "required": [
          "target",
          "date"
        ],
        "description": "Input parameters for retrieving Ahrefs Site Explorer metrics by country."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "data": {
            "anyOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": true,
                "description": "Object payload returned by Ahrefs."
              },
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "One Ahrefs result row."
                },
                "description": "Array payload returned by Ahrefs."
              }
            ],
            "description": "JSON data returned by Ahrefs."
          }
        },
        "additionalProperties": false,
        "description": "Normalized Ahrefs response wrapper."
      }
    }
  ]
}
