PHPackages                             seom/sdk - 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. seom/sdk

ActiveLibrary[API Development](/categories/api)

seom/sdk
========

Official PHP SDK for the Seom SEO Content Generation API

00PHP

Since Jun 8Pushed yesterdayCompare

[ Source](https://github.com/seom-one/seom-php-sdk)[ Packagist](https://packagist.org/packages/seom/sdk)[ RSS](/packages/seom-sdk/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

seom/sdk
========

[](#seomsdk)

Official PHP SDK for the [Seom](https://seom.one) SEO Content Generation API.

Requirements
------------

[](#requirements)

- PHP **8.1+**
- Extensions: `ext-curl`, `ext-json` (both standard in most PHP installs)

Installation
------------

[](#installation)

```
composer require seom-one/sdk
```

Quick start
-----------

[](#quick-start)

```
use Seom\Sdk\SeomClient;

// Get your API key from Settings → API Keys in the Seom dashboard
$client = new SeomClient('sk-seom-...');

// List your last 10 completed articles
$response = $client->articles->list(['status' => 'DONE', 'limit' => 10]);

echo $response['meta']['total'] . " articles total\n";

foreach ($response['data'] as $job) {
    echo $job['article']['title'] . "\n";
}
```

Authentication
--------------

[](#authentication)

Create an API key in your workspace: **Settings → API Keys → New API key**.

```
$client = new SeomClient('sk-seom-...');
```

Using an environment variable (recommended):

```
$client = new SeomClient(getenv('SEOM_API_KEY'));
```

Usage
-----

[](#usage)

### Articles

[](#articles)

```
// List articles (paginated)
$response = $client->articles->list([
    'status' => 'DONE',          // QUEUED | PROCESSING | DONE | FAILED
    'format' => 'BLOG_ARTICLE',  // BLOG_ARTICLE | LINKEDIN_POST | FACEBOOK_POST | TWITTER_THREAD | INSTAGRAM_CAPTION
    'page'   => 1,
    'limit'  => 20,
]);

// Get one article with full HTML content
$response = $client->articles->get('job_abc123');
echo $response['data']['article']['htmlContent'];

// Poll generation status
$response = $client->articles->status('job_abc123');
echo $response['data']['status'] . ' — ' . $response['data']['progress'] . '%';

// Trigger generation (returns immediately)
$response = $client->articles->generate([
    'keyword' => 'best SEO tools 2025',
    'format'  => 'BLOG_ARTICLE',  // optional, defaults to BLOG_ARTICLE
    'locale'  => 'EN_US',         // VI | EN_US | EN_GB
]);
$jobId = $response['data']['jobId'];
echo "Job queued: $jobId\n";

// Generate AND wait for completion (polls automatically)
$response = $client->articles->generateAndWait(
    options:      ['keyword' => 'best SEO tools 2025', 'locale' => 'EN_US'],
    pollInterval: 5,    // check every 5 seconds (default)
    timeout:      600,  // give up after 10 minutes (default)
);
echo $response['data']['article']['title']     . "\n";
echo $response['data']['article']['wordCount'] . " words\n";
echo substr($response['data']['article']['htmlContent'], 0, 500) . "\n";

// Wait for an already-queued job
$response = $client->articles->waitFor('job_abc123');
```

### Keywords

[](#keywords)

```
$response = $client->keywords->list([
    'priority' => 'HIGH',  // HIGH | MEDIUM | LOW
    'page'     => 1,
    'limit'    => 20,
]);

foreach ($response['data'] as $kw) {
    echo $kw['keyword'] . ' — score: ' . $kw['opportunityScore'] . "\n";
}
```

### Workspace

[](#workspace)

```
$response = $client->workspace->get();

echo $response['data']['name']             . "\n"; // "My Workspace"
echo $response['data']['plan']['name']     . "\n"; // "Basic"

$usage = $response['data']['usage'];
echo $usage['articlesThisMonth'] . '/' . $usage['articlesLimit'] . " articles used\n";
```

Error handling
--------------

[](#error-handling)

All API errors throw a `SeomException`:

```
use Seom\Sdk\SeomClient;
use Seom\Sdk\SeomException;

try {
    $client->articles->get('does-not-exist');
} catch (SeomException $e) {
    echo $e->getErrorCode();  // 'NOT_FOUND'
    echo $e->getMessage();    // 'Article not found...'
    echo $e->getStatusCode(); // 404
    echo $e->getDocs();       // 'https://docs.seom.one/api/errors#NOT_FOUND'
}
```

Common error codes:

CodeHTTPMeaning`UNAUTHORIZED`401Missing or invalid API key`FORBIDDEN`403Key doesn't have the required scope`NOT_FOUND`404Resource doesn't exist`VALIDATION_ERROR`400Invalid request body`PAYMENT_REQUIRED`402Monthly article limit reached — upgrade plan`RATE_LIMIT_EXCEEDED`429Too many requests`GENERATION_FAILED`500AI generation failed`GENERATION_TIMEOUT`408`waitFor()` timed outPagination
----------

[](#pagination)

```
$page       = 1;
$allArticles = [];

while (true) {
    $response = $client->articles->list(['page' => $page, 'limit' => 50, 'status' => 'DONE']);
    $allArticles = array_merge($allArticles, $response['data']);

    if (!$response['meta']['hasMore']) {
        break;
    }
    $page++;
}

echo count($allArticles) . " total articles fetched\n";
```

Laravel integration
-------------------

[](#laravel-integration)

No special setup needed — just use Composer autoloading:

```
// In a service provider, controller, or anywhere:
use Seom\Sdk\SeomClient;

class ArticleService
{
    private SeomClient $seom;

    public function __construct()
    {
        $this->seom = new SeomClient(config('services.seom.api_key'));
    }

    public function getArticles(): array
    {
        return $this->seom->articles->list(['status' => 'DONE'])['data'];
    }
}
```

Add to `config/services.php`:

```
'seom' => [
    'api_key' => env('SEOM_API_KEY'),
],
```

Self-hosting / local dev
------------------------

[](#self-hosting--local-dev)

```
$client = new SeomClient(
    apiKey:  'sk-seom-...',
    baseUrl: 'http://localhost:4000/api', // your local dev server (default: https://api.seom.one/api)
);
```

Examples
--------

[](#examples)

See the [`examples/`](examples/) directory:

- [`list-articles.php`](examples/list-articles.php) — paginate through all articles
- [`generate-article.php`](examples/generate-article.php) — generate and wait with error handling
- [`keyword-research.php`](examples/keyword-research.php) — trigger multiple jobs sequentially

API reference
-------------

[](#api-reference)

Full API reference: **[seom.one/docs](https://seom.one/docs)**

License
-------

[](#license)

MIT

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance65

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/130219780?v=4)[progacon](/maintainers/progacon)[@progacon](https://github.com/progacon)

---

Top Contributors

[![buidan](https://avatars.githubusercontent.com/u/5226899?v=4)](https://github.com/buidan "buidan (2 commits)")

### Embed Badge

![Health badge](/badges/seom-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/seom-sdk/health.svg)](https://phpackages.com/packages/seom-sdk)
```

###  Alternatives

[facebook/php-business-sdk

PHP SDK for Facebook Business

90923.5M35](/packages/facebook-php-business-sdk)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[botman/driver-telegram

Telegram driver for BotMan

93452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

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