Skip to main content
SEMrush logo

Overview

Add SEMrush to any ModuleX agent or workflow. SEO analytics integration: domain overview/keywords/competitors, backlinks, keyword research, traffic analytics, API-units balance. All 17 SEO actions hit api.semrush.com (CSV responses, semicolon separators); the two .Trends traffic actions hit api.semrush.com/analytics/ta/api/v3/ (JSON responses).
Categories: Marketing & Advertising · Data & Analytics · Analytics · Marketing · Research · Auth: API Key · Actions: 19

Authentication

API Key Authentication

Authenticate using your SEMrush API key

Required Credentials

FieldDescriptionRequiredFormat
SEMrush API KeyYour SEMrush API key for authenticationYesxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Available Actions

Parameters

domain
string
required
Domain name to analyze
database
string
Regional database (Default: us)

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "records": {
      "items": {
        "additionalProperties": {
          "type": "string"
        },
        "type": "object"
      },
      "title": "Records",
      "type": "array"
    }
  },
  "required": [
    "success"
  ],
  "title": "DomainOverviewOutput",
  "type": "object"
}

Parameters

domain
string
required
Domain name to analyze
database
string
Regional database (e.g. ‘us’, ‘uk’, ‘ca’, ‘de’, ‘fr’) (Default: us)
limit
integer
Maximum number of records to return (Default: 10)

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "records": {
      "items": {
        "additionalProperties": {
          "type": "string"
        },
        "type": "object"
      },
      "title": "Records",
      "type": "array"
    }
  },
  "required": [
    "success"
  ],
  "title": "DomainOrganicKeywordsOutput",
  "type": "object"
}

Parameters

domain
string
required
Domain name to analyze
database
string
Regional database (e.g. ‘us’, ‘uk’, ‘ca’, ‘de’, ‘fr’) (Default: us)
limit
integer
Maximum number of records to return (Default: 10)

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "records": {
      "items": {
        "additionalProperties": {
          "type": "string"
        },
        "type": "object"
      },
      "title": "Records",
      "type": "array"
    }
  },
  "required": [
    "success"
  ],
  "title": "DomainPaidKeywordsOutput",
  "type": "object"
}

Parameters

domain
string
required
Domain name to analyze
database
string
Regional database (e.g. ‘us’, ‘uk’, ‘ca’, ‘de’, ‘fr’) (Default: us)
limit
integer
Maximum number of records to return (Default: 10)

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "records": {
      "items": {
        "additionalProperties": {
          "type": "string"
        },
        "type": "object"
      },
      "title": "Records",
      "type": "array"
    }
  },
  "required": [
    "success"
  ],
  "title": "CompetitorsOutput",
  "type": "object"
}

Parameters

keyword
string
required
Keyword to analyze
database
string
Database to use (Default: us)

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "records": {
      "items": {
        "additionalProperties": {
          "type": "string"
        },
        "type": "object"
      },
      "title": "Records",
      "type": "array"
    }
  },
  "required": [
    "success"
  ],
  "title": "KeywordOverviewOutput",
  "type": "object"
}

Parameters

keyword
string
required
Keyword to analyze
database
string
required
Database to use

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "records": {
      "items": {
        "additionalProperties": {
          "type": "string"
        },
        "type": "object"
      },
      "title": "Records",
      "type": "array"
    }
  },
  "required": [
    "success"
  ],
  "title": "KeywordOverviewSingleDbOutput",
  "type": "object"
}

Parameters

keywords
array
required
Array of keywords (max 100)
database
string
required
Database to use

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "records": {
      "items": {
        "additionalProperties": {
          "type": "string"
        },
        "type": "object"
      },
      "title": "Records",
      "type": "array"
    }
  },
  "required": [
    "success"
  ],
  "title": "BatchKeywordOverviewOutput",
  "type": "object"
}

Parameters

keyword
string
required
Keyword to analyze
database
string
required
Database to use
limit
integer
Maximum number of results (Default: 10)

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "records": {
      "items": {
        "additionalProperties": {
          "type": "string"
        },
        "type": "object"
      },
      "title": "Records",
      "type": "array"
    }
  },
  "required": [
    "success"
  ],
  "title": "KeywordOrganicResultsOutput",
  "type": "object"
}

Parameters

keyword
string
required
Keyword to analyze
database
string
required
Database to use
limit
integer
Maximum number of results (Default: 10)

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "records": {
      "items": {
        "additionalProperties": {
          "type": "string"
        },
        "type": "object"
      },
      "title": "Records",
      "type": "array"
    }
  },
  "required": [
    "success"
  ],
  "title": "KeywordPaidResultsOutput",
  "type": "object"
}

Parameters

keyword
string
required
Keyword to analyze
database
string
required
Database to use
limit
integer
Maximum number of results (Default: 10)

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "records": {
      "items": {
        "additionalProperties": {
          "type": "string"
        },
        "type": "object"
      },
      "title": "Records",
      "type": "array"
    }
  },
  "required": [
    "success"
  ],
  "title": "KeywordAdsHistoryOutput",
  "type": "object"
}

Parameters

keyword
string
required
Keyword to analyze
database
string
required
Database to use
limit
integer
Maximum number of results (Default: 10)

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "records": {
      "items": {
        "additionalProperties": {
          "type": "string"
        },
        "type": "object"
      },
      "title": "Records",
      "type": "array"
    }
  },
  "required": [
    "success"
  ],
  "title": "BroadMatchKeywordsOutput",
  "type": "object"
}

Parameters

keywords
array
required
Array of keywords (max 100)
database
string
required
Database to use

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "records": {
      "items": {
        "additionalProperties": {
          "type": "string"
        },
        "type": "object"
      },
      "title": "Records",
      "type": "array"
    }
  },
  "required": [
    "success"
  ],
  "title": "KeywordDifficultyOutput",
  "type": "object"
}

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "units": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Units"
    }
  },
  "required": [
    "success"
  ],
  "title": "ApiUnitsBalanceOutput",
  "type": "object"
}

Limits & Quotas

  • SEMrush’s main https://api.semrush.com/ endpoint returns semicolon-separated CSV with a header row. The shared _call_csv helper parses it into records: list[dict[str, str]].
  • The two .Trends actions (traffic_summary / traffic_sources) return JSON (or text fallback) — surfaced verbatim on data.
  • batch_keyword_overview and keyword_difficulty are capped at 100 keywords per call (SEMrush’s limit).
  • API errors come back as HTTP 200 with ERROR ... body text — the helper detects this and converts to success=False.
  • Each action carries an API-units cost (10-100 per record); consult SEMrush’s docs.

Nasdaq Data Link

Short.io

Ahrefs