A JavaScript client for the Ahrefs API v3, part of the SpaceCat Shared library. It allows you to query the Ahrefs API for top pages, backlinks, organic traffic data, and more.
Install the package using npm:
npm install @adobe/spacecat-shared-ahrefs-client
import AhrefsAPIClient, { fetch } from '@adobe/spacecat-shared-ahrefs-client';
const config = {
apiKey: '<API_KEY>',
apiBaseUrl: '<API_BASE_URL>',
};
const client = new AhrefsAPIClient(config, fetch);
const context = {}; // Your AWS Lambda context object
const client = AhrefsAPIClient.createFrom(context);
To run tests:
npm run test
Lint your code:
npm run lint
To remove node_modules
and package-lock.json
:
npm run clean
- Repository: GitHub
- Issue Tracking: GitHub Issues
- License: Apache-2.0