# SEO Domain Intelligence Pro (`oskarcodex/my-actor`) Actor

Analyze domains with SEO data including organic traffic, rankings, Authority Score, backlinks, referring domains, top keywords, competitors, and estimated traffic value. Bulk domain analysis with structured results ready for research, reporting, and automation.

- **URL**: https://apify.com/oskarcodex/my-actor.md
- **Developed by:** [Oskar Maciej Stegienka](https://apify.com/oskarcodex) (community)
- **Categories:**
- **Stats:** 2 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $199.00 / 30-day access pass

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Semrush Pro Analyzer

Analyze one or more domains with SEMrush data and return a structured dataset containing rank, organic traffic, estimated traffic cost, Authority Score, backlinks, referring domains/IPs, top organic keywords, and organic competitors.

### Input

- `domains` — domains to analyze.
- `keyword_limit` — number of top organic keywords to return per domain.
- `competitor_limit` — number of organic competitors to return per domain.

### Secrets

Set these in **Code → Environment variables** and mark them as secrets:

- `SEMRUSH_API_KEY` — required SEMrush API key.
- `BILLING_STATE_SECRET` — strongly recommended stable random secret used only to sign 30-day access-pass state.

If `BILLING_STATE_SECRET` is missing, the Actor falls back to `SEMRUSH_API_KEY` for signing so the code works immediately. Before public launch, set a dedicated `BILLING_STATE_SECRET`; changing the signing secret invalidates existing pass signatures.

### Monetization: 30-day access pass

The Actor uses Apify **Pay per event** with this custom event:

- Event name: `monthly-event`
- Store title: `30-day access pass`
- Price: **$199**
- Access period: **30 days from a successful charge**

Behavior:

1. On a customer's first run, the Actor charges `monthly-event` once.
2. The successful charge activates access for 30 days for that Apify user.
3. Runs during those 30 days do not charge `monthly-event` again.
4. The first run after expiry charges the event again and starts a new 30-day period.
5. If a customer's max total charge for the run is lower than the $199 event price, the Actor stops before performing SEMrush work.

This emulates a 30-day pass, not a true calendar-time recurring subscription. Apify PPE only charges when the Actor runs, so an expired customer who does not start another run is not charged automatically.

The access state is stored in a named key-value store that persists across runs. The record is HMAC-signed with the owner-only secret so a customer cannot simply edit `paid_until` to extend access. A short cross-run lease is also used to reduce accidental duplicate charges from near-simultaneous runs.

### Platform usage

The project is configured for **standard Actor runs** (`usesStandbyMode: false`). Keep **Pay per event + usage** disabled in Apify monetization if you want the customer-facing price to remain the event price without separate platform-usage charges.

### Local billing test

Apify supports local PPE testing without real billing. Run the Actor with `ACTOR_TEST_PAY_PER_EVENT=true`; charge calls are logged locally instead of charging a customer.

# Actor input Schema

## `domains` (type: `array`):

Enter one or more domains to analyze, for example example.com

## `keyword_limit` (type: `integer`):

Number of top organic keywords returned for each domain.

## `competitor_limit` (type: `integer`):

Number of organic competitors returned for each domain.

## Actor input object example

```json
{
  "domains": [
    "google.com"
  ],
  "keyword_limit": 3,
  "competitor_limit": 3
}
```

# Actor output Schema

## `results` (type: `string`):

Structured SEO analysis results stored in the default dataset.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "domains": [
        "google.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("oskarcodex/my-actor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "domains": ["google.com"] }

# Run the Actor and wait for it to finish
run = client.actor("oskarcodex/my-actor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "domains": [
    "google.com"
  ]
}' |
apify call oskarcodex/my-actor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,oskarcodex/my-actor"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/TnvfRYWTomy5ox9wZ/builds/K6hE8KZa20YIsF5g7/openapi.json
