# Seo Traffic Api (`api-center/seo-traffic-api`) Actor

Apify Actor that fetches SEO traffic analytics data for a given domain.

Comprehensive traffic overview (visits, bounce rate, pages per visit, time on site, global/country rank)
Traffic source breakdown (organic search, paid search, direct, social, referrals, mail, display ads, AI, affiliate)

- **URL**: https://apify.com/api-center/seo-traffic-api.md
- **Developed by:** [Leo Yan](https://apify.com/api-center) (community)
- **Categories:** SEO tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#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

## SEO Traffic API

Apify Actor that fetches SEO traffic analytics data for a given domain.

### Features

- Comprehensive traffic overview (visits, bounce rate, pages per visit, time on site, global/country rank)
- 12-month monthly visit trends
- Traffic source breakdown (organic search, paid search, direct, social, referrals, mail, display ads, AI, affiliate)
- Traffic source trends over the past 12 months
- Top search keywords with estimated value, search volume, and CPC
- Top traffic regions by country
- AI chatbot traffic trends (ChatGPT, Claude, DeepSeek, etc.)

### Input

The Actor accepts a single required parameter:

| Field    | Type   | Required | Description                                  | Example         |
|----------|--------|----------|----------------------------------------------|-----------------|
| `domain` | string | Yes      | The domain to fetch SEO traffic data for     | `example.com`   |

#### Input Example

```json
{
  "domain": "example.com"
}
```

### Output

The Actor outputs a JSON object with two top-level fields:

| Field    | Type   | Description                                        |
|----------|--------|----------------------------------------------------|
| `domain` | string | The queried domain                                 |
| `data`   | object | Full SEO traffic analytics data (see below)        |

#### `data` Object Structure

| Field                | Type   | Description                                                                |
|----------------------|--------|----------------------------------------------------------------------------|
| `hostname`           | string | The hostname of the domain                                                 |
| `title`              | string | The page title                                                             |
| `description`        | string | The page description                                                       |
| `cached`             | number | Unix timestamp of when the data was cached                                 |
| `overview`           | object | Traffic overview: bounceRate, month, year, pagePerVisit, visits, timeOnSite, globalRank, countryRank |
| `monthlyVisits`      | object | Monthly visit counts keyed by date (`YYYY-MM-DD`)                          |
| `trafficSources`     | object | Traffic distribution by source (direct, search, social, referrals, etc.)   |
| `trafficSourceTrends`| object | Monthly trends for each traffic source over the past 12 months             |
| `topKeywords`        | array  | Top 5 organic search keywords with name, estimatedValue, volume, cpc       |
| `topRegions`         | array  | Top 5 traffic regions with country code, name, and traffic share            |
| `aiTraffic`          | object | AI chatbot traffic trends with historical data                             |

#### Output Example

```json
{
  "domain": "www.google.com",
  "data": {
    "hostname": "google.com",
    "title": "Google Advanced Search",
    "description": "Learn about the Certified Publisher Program. Our publishing software experts will help you maximize revenue and grow your business.",
    "cached": 1786344766589,
    "overview": {
      "bounceRate": "0.28352824215831807",
      "month": "6",
      "year": "2026",
      "pagePerVisit": "8.695346223748027",
      "visits": "84940150026",
      "timeOnSite": "605.4395199614316",
      "hostname": "google.com",
      "globalRank": 1,
      "countryRank": 1
    },
    "monthlyVisits": {
      "2025-07-01": 84453296855,
      "2025-08-01": 83873698954,
      "2025-09-01": 82550325867,
      "2025-10-01": 85326206196,
      "2025-11-01": 82284033110,
      "2025-12-01": 84172772881,
      "2026-01-01": 85756574615,
      "2026-02-01": 78229857909,
      "2026-03-01": 86850607710,
      "2026-04-01": 84751050692,
      "2026-05-01": 87502305979,
      "2026-06-01": 84940150026
    },
    "trafficSources": {
      "socialOrganic": 0.0275,
      "socialPaid": 0.0012,
      "mail": 0.0093,
      "referrals": 0.0171,
      "searchOrganic": 0.0073,
      "searchPaid": 0.0004,
      "direct": 0.9248,
      "genAi": 0.005,
      "affiliate": 0.0002,
      "displayAds": 0.0073
    },
    "trafficSourceTrends": {
      "direct": {
        "2025-07-01": 0.8773,
        "2025-08-01": 0.8759,
        "2025-09-01": 0.878,
        "2025-10-01": 0.8681,
        "2025-11-01": 0.8637,
        "2025-12-01": 0.866,
        "2026-01-01": 0.8583,
        "2026-02-01": 0.8576,
        "2026-03-01": 0.8552,
        "2026-04-01": 0.9212,
        "2026-05-01": 0.9255,
        "2026-06-01": 0.9248
      },
      "search": {
        "2025-07-01": 0.0613,
        "2025-08-01": 0.0634,
        "2025-09-01": 0.0657,
        "2025-10-01": 0.07,
        "2025-11-01": 0.0789,
        "2025-12-01": 0.0765,
        "2026-01-01": 0.0835,
        "2026-02-01": 0.0871,
        "2026-03-01": 0.0913,
        "2026-04-01": 0.0094,
        "2026-05-01": 0.0076,
        "2026-06-01": 0.0077
      },
      "social": {
        "2025-07-01": 0.0055,
        "2025-08-01": 0.0053,
        "2025-09-01": 0.0051,
        "2025-10-01": 0.0069,
        "2025-11-01": 0.0091,
        "2025-12-01": 0.0085,
        "2026-01-01": 0.0076,
        "2026-02-01": 0.0083,
        "2026-03-01": 0.0086,
        "2026-04-01": 0.0327,
        "2026-05-01": 0.0286,
        "2026-06-01": 0.0287
      },
      "referrals": {
        "2025-07-01": 0.0519,
        "2025-08-01": 0.051,
        "2025-09-01": 0.0461,
        "2025-10-01": 0.0493,
        "2025-11-01": 0.0425,
        "2025-12-01": 0.0433,
        "2026-01-01": 0.0446,
        "2026-02-01": 0.0403,
        "2026-03-01": 0.0386,
        "2026-04-01": 0.0167,
        "2026-05-01": 0.0173,
        "2026-06-01": 0.0171
      },
      "paidReferrals": {
        "2025-07-01": 0.0019,
        "2025-08-01": 0.0018,
        "2025-09-01": 0.0023,
        "2025-10-01": 0.0029,
        "2025-11-01": 0.0028,
        "2025-12-01": 0.0031,
        "2026-01-01": 0.0033,
        "2026-02-01": 0.0036,
        "2026-03-01": 0.0039,
        "2026-04-01": 0.0042,
        "2026-05-01": 0.0072,
        "2026-06-01": 0.0073
      },
      "mail": {
        "2025-07-01": 0.0021,
        "2025-08-01": 0.0026,
        "2025-09-01": 0.0028,
        "2025-10-01": 0.0027,
        "2025-11-01": 0.0029,
        "2025-12-01": 0.0026,
        "2026-01-01": 0.0028,
        "2026-02-01": 0.0031,
        "2026-03-01": 0.0024,
        "2026-04-01": 0.0107,
        "2026-05-01": 0.0087,
        "2026-06-01": 0.0093
      },
      "other": {
        "2025-07-01": 0,
        "2025-08-01": 0,
        "2025-09-01": 0,
        "2025-10-01": 0,
        "2025-11-01": 0,
        "2025-12-01": 0,
        "2026-01-01": 0,
        "2026-02-01": 0,
        "2026-03-01": 0,
        "2026-04-01": 0.0052,
        "2026-05-01": 0.0051,
        "2026-06-01": 0.0052
      }
    },
    "topKeywords": [
      {
        "name": "gemini",
        "estimatedValue": 197390210,
        "volume": 130001020,
        "cpc": 0.24
      },
      {
        "name": "google maps",
        "estimatedValue": 92523770,
        "volume": 64808430,
        "cpc": 0.35
      },
      {
        "name": "gmail",
        "estimatedValue": 87284280,
        "volume": 112710250,
        "cpc": 1.78
      },
      {
        "name": "maps",
        "estimatedValue": 47136290,
        "volume": 45816760,
        "cpc": 0.21
      },
      {
        "name": "google",
        "estimatedValue": 44958320,
        "volume": 36774950,
        "cpc": 1.28
      }
    ],
    "topRegions": [
      {
        "country": 840,
        "name": "United States",
        "value": 0.23679350972974017
      },
      {
        "country": 392,
        "name": "Japan",
        "value": 0.059428140900848324
      },
      {
        "country": 356,
        "name": "India",
        "value": 0.05710248670449797
      },
      {
        "country": 76,
        "name": "Brazil",
        "value": 0.049777326688909565
      },
      {
        "country": 826,
        "name": "United Kingdom",
        "value": 0.03518837304351638
      }
    ],
    "aiTraffic": {
      "trends": [
        {
          "name": "chatgpt.com",
          "history": [
            {
              "date": "2026-06-01",
              "value": 46.822769265029336
            },
            {
              "date": "2026-05-01",
              "value": 54.19056888493608
            },
            {
              "date": "2026-04-01",
              "value": 43.86165241236921
            }
          ]
        },
        {
          "name": "claude.ai",
          "history": [
            {
              "date": "2026-06-01",
              "value": 35.27985259713669
            },
            {
              "date": "2026-05-01",
              "value": 32.84519157978467
            },
            {
              "date": "2026-04-01",
              "value": 35.5953696772892
            }
          ]
        },
        {
          "name": "chat.deepseek.com",
          "history": [
            {
              "date": "2026-06-01",
              "value": 11.057065382489355
            },
            {
              "date": "2026-05-01",
              "value": 6.569319528944286
            },
            {
              "date": "2026-04-01",
              "value": 5.708857817895558
            }
          ]
        }
      ]
    }
  }
}
```

### Usage

#### Programmatically on Apify

You can run this Actor via the [Apify API](https://docs.apify.com/api/v2):

```bash
curl -X POST "https://api.apify.com/v2/acts/your-actor-name/runs?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"domain": "example.com"}'
```

### Notes

- Traffic source values are expressed as proportions (e.g., `0.9248` = 92.48%).

### License

This project is licensed under the MIT License.

### Author

Maintained by the project owner. Bug reports and feature requests are welcome.

# Actor input Schema

## `domain` (type: `string`):

The domain to fetch SEO traffic data for (e.g., example.com)

## Actor input object example

```json
{
  "domain": "example.com"
}
```

# Actor output Schema

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

SEO traffic analytics data including overview, monthly visits, traffic sources, keywords, regions, and AI traffic trends

# 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 = {
    "domain": "example.com"
};

// Run the Actor and wait for it to finish
const run = await client.actor("api-center/seo-traffic-api").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 = { "domain": "example.com" }

# Run the Actor and wait for it to finish
run = client.actor("api-center/seo-traffic-api").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 '{
  "domain": "example.com"
}' |
apify call api-center/seo-traffic-api --silent --output-dataset

```

## MCP server setup

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

```

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/OCEo6vqCgglaejoXk/builds/WcnYEzsunICNfRdTy/openapi.json
