PHPackages                             nativerank/silktide-semrush-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. nativerank/silktide-semrush-api

ActiveLibrary[API Development](/categories/api)

nativerank/silktide-semrush-api
===============================

SEMrush API client

0.6.0(10y ago)029GPL-2.0+PHPPHP &gt;=5.5.0

Since Mar 30Pushed 10y ago1 watchersCompare

[ Source](https://github.com/crwgregory/semrush-api)[ Packagist](https://packagist.org/packages/nativerank/silktide-semrush-api)[ RSS](/packages/nativerank-silktide-semrush-api/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (1)Dependencies (3)Versions (16)Used By (0)

SEMrush API client
==================

[](#semrush-api-client)

### This repository has been forked from the [Silktide/semrush-api](https://github.com/silktide/semrush-api) repository and been made available on [Packagist](https://packagist.org/packages/nativerank/silktide-semrush-api) so to allow [Pagekit to install it as a dependency.](https://github.com/pagekit/pagekit/issues/630)

[](#this-repository-has-been-forked-from-the-silktidesemrush-api-repository-and-been-made-available-on-packagist-so-to-allow-pagekit-to-install-it-as-a-dependency)

#### There has been a single change to the code base in the ResponseParser that's diverged this fork from the main API.

[](#there-has-been-a-single-change-to-the-code-base-in-the-responseparser-thats-diverged-this-fork-from-the-main-api)

#### As such, the name of the project in the composer.json has been changed from 'silktide/semrush-api' to 'nativerank/silktide-semrush-api' to define the creator of the API, but make it specific to Nativeranks needs.

[](#as-such-the-name-of-the-project-in-the-composerjson-has-been-changed-from-silktidesemrush-api-to-nativeranksilktide-semrush-api-to-define-the-creator-of-the-api-but-make-it-specific-to-nativeranks-needs)

[![Build Status](https://camo.githubusercontent.com/bdff578fb68deb0ee2cba3cd2f76f76a702d0a420aa83c7649ac41f79b17fa3a/68747470733a2f2f7472617669732d63692e6f72672f73696c6b746964652f73656d727573682d6170692e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/silktide/semrush-api)[![Code Climate](https://camo.githubusercontent.com/415123d008b3a7f994b390dd03a01d82f67cae964c5d5d587e13f20f08cd48e2/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f73696c6b746964652f73656d727573682d6170692f6261646765732f6770612e737667)](https://codeclimate.com/github/silktide/semrush-api)[![Test Coverage](https://camo.githubusercontent.com/1d57a581454f59a92c51fc6e1f80590517784a3d58df13c7bb1fdc5c7daa8fd5/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f73696c6b746964652f73656d727573682d6170692f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/silktide/semrush-api)

A PHP API client for the SEMrush API.

Supported actions:
------------------

[](#supported-actions)

- domain\_ranks
- domain\_rank
- domain\_rank\_history
- domain\_organic
- domain\_adwords
- domain\_adwords\_unique

Usage
-----

[](#usage)

### Installation

[](#installation)

```
composer require silktide/semrush-api
composer update

```

### Setup

[](#setup)

This library was designed to use Dependency Injection (DI). If you don't use DI, you could use the factory to set up the API client:

```
$client = \Silktide\SemRushApi\ClientFactory::create("[YOUR SEMRUSH API KEY]");

```

### Caching

[](#caching)

The API library can use a cache to reduce calls to the API. This library comes with an in-memory cache:

```
$cache = new \Silktide\SemRushApi\Cache\MemoryCache();
$client->setCache($cache);

```

You can also write your own cache using the provided CacheInterface (`\Silktide\SemRushApi\Cache\CacheInterface`).

API calls
---------

[](#api-calls)

### Domain ranks

[](#domain-ranks)

Getting the SEMrush "domain\_ranks" for a website:

```
$result = $client->getDomainRanks('silktide.com');

```

### Domain rank

[](#domain-rank)

Getting the SEMrush "domain\_rank" for a website:

```
    $result = $client->getDomainRank(
        'silktide.com',
        [
            'database' => \Silktide\SemRushApi\Data\Database::DATABASE_GOOGLE_US
        ]
    );

```

### Domain rank history

[](#domain-rank-history)

Getting the SEMrush "domain\_rank\_history" for a website:

```
    $result = $client->getDomainRankHistory(
        'silktide.com',
        [
            'database' => \Silktide\SemRushApi\Data\Database::DATABASE_GOOGLE_US
        ]
    );

```

### Domain organic

[](#domain-organic)

Getting the SEMrush "domain\_organic" for a website:

```
    $result = $client->getDomainOrganic(
        'silktide.com',
        [
            'database' => \Silktide\SemRushApi\Data\Database::DATABASE_GOOGLE_US
        ]
    );

```

### Domain adwords

[](#domain-adwords)

Getting the SEMrush "domain\_adwords" for a website:

```
    $result = $client->getDomainAdwords(
        'silktide.com',
        [
            'database' => \Silktide\SemRushApi\Data\Database::DATABASE_GOOGLE_US
        ]
    );

```

### Domain adwords unique

[](#domain-adwords-unique)

Getting the SEMrush "domain\_adwords\_unique" for a website:

```
    $result = $client->getDomainAdwordsUnique(
        'silktide.com',
        [
            'database' => \Silktide\SemRushApi\Data\Database::DATABASE_GOOGLE_US
        ]
    );

```

Using options
-------------

[](#using-options)

Here's an example of passing options to the domain ranks action in order to return a specific set of columns.

```
$result = $client->getDomainRanks('silktide.com', [
    'export_columns' => [
        \Silktide\SemRushApi\Data\Column::COLUMN_OVERVIEW_ADWORDS_BUDGET,
        \Silktide\SemRushApi\Data\Column::COLUMN_OVERVIEW_ADWORDS_KEYWORDS,
        \Silktide\SemRushApi\Data\Column::COLUMN_OVERVIEW_ADWORDS_TRAFFIC
     ]
]);

```

Using results
-------------

[](#using-results)

All API actions will return a `Result` object. Result objects contain a number of `Row` objects and are iterable and countable. Here's a (non exhaustive) example of how they can be used.

```
foreach ($result as $row) {
    $budget = $row->getValue(\Silktide\SemRushApi\Data\Column::COLUMN_OVERVIEW_ADWORDS_BUDGET);
    echo "\nThe AdWords spend of this site in the last month was an estimated ${$budget}";
}

```

###  Health Score

26

—

LowBetter than 40% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~33 days

Total

13

Last Release

3756d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/77e952d494f6ed1b6156ddc80e357e314a2c9f731acd3e5a720c8fb90bcfc8fa?d=identicon)[crwgregory](/maintainers/crwgregory)

---

Top Contributors

[![andywaite](https://avatars.githubusercontent.com/u/6773151?v=4)](https://github.com/andywaite "andywaite (77 commits)")[![mtio](https://avatars.githubusercontent.com/u/9405969?v=4)](https://github.com/mtio "mtio (3 commits)")[![adjohu](https://avatars.githubusercontent.com/u/655857?v=4)](https://github.com/adjohu "adjohu (1 commits)")[![dochne](https://avatars.githubusercontent.com/u/1678803?v=4)](https://github.com/dochne "dochne (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nativerank-silktide-semrush-api/health.svg)

```
[![Health](https://phpackages.com/badges/nativerank-silktide-semrush-api/health.svg)](https://phpackages.com/packages/nativerank-silktide-semrush-api)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.3M49](/packages/tencentcloud-tencentcloud-sdk-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

353.6k](/packages/eslazarev-wildberries-sdk)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k832.6k52](/packages/neuron-core-neuron-ai)[files.com/files-php-sdk

Files.com PHP SDK

2482.9k](/packages/filescom-files-php-sdk)[volcengine/volcengine-php-sdk

119.5k](/packages/volcengine-volcengine-php-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
