Download the PHP package silktide/semrush-api without Composer
On this page you can find all versions of the php package silktide/semrush-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package semrush-api
SEMrush API client
A PHP API client for the SEMrush API.
Supported actions:
- domain_ranks
- domain_domains
- domain_rank
- domain_rank_history
- domain_organic
- domain_adwords
- domain_adwords_unique
- advertiser_publishers
- advertiser_text_ads
- advertiser_rank
- phrase_this (https://www.semrush.com/api-analytics/#phrase_this)
Usage
Installation
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:
Caching
The API library can use a PSR-16 style cache to reduce calls to the API.
API calls
Domain ranks
Getting the SEMrush "domain_ranks" for a website:
Domain rank
Getting the SEMrush "domain_rank" for a website:
Domain rank history
Getting the SEMrush "domain_rank_history" for a website:
Domain organic
Getting the SEMrush "domain_organic" for a website:
Domain adwords
Getting the SEMrush "domain_adwords" for a website:
Domain adwords unique
Getting the SEMrush "domain_adwords_unique" for a website:
Using options
Here's an example of passing options to the domain ranks action in order to return a specific set of columns.
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.
All versions of semrush-api with dependencies
guzzlehttp/guzzle Version ^6.1 | ^7.0
psr/log Version ^1.0
psr/simple-cache Version ^1.0
silktide/capiture Version ^1.2