Skip to content

Latest commit

 

History

History
43 lines (28 loc) · 1.03 KB

File metadata and controls

43 lines (28 loc) · 1.03 KB

semrush-api-client

Version badge npm version

A Node.js/TypeScript client for accessing the SEMrush API easily.

Installation

npm install semrush-api-client

Usage Example

First, 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" });

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests to improve this project.

License

See LICENSE.