A Node.js/TypeScript client for accessing the SEMrush API easily.
npm install semrush-api-clientFirst, set your SEMrush API key in your environment variables (e.g., in a .env file):
SEMRUSH_API_KEY=your_api_key_here
Then, use the client in your code:
import { SemrushAPIClient } from "semrush-api-client";
const client = new SemrushAPIClient({
api_key: process.env.SEMRUSH_API_KEY!,
});
// Get domain rank
client.getDomainOverview({ domain: "apple.com" });
// Get keyword data
client.getKeywordOverview({ phrase: "apple" });Contributions are welcome! Feel free to open issues or submit pull requests to improve this project.
See LICENSE.