# Competitor-Based Keyword Recommendations for On-Page SEO (`antonio_espresso/keyword-competitor-recommendation`) Actor

This actor takes a keyword, language, and Google engine, then returns structured SEO insights: ideal word count, title/content terms with usage ranges, relevant questions (H1–H3, PAA), and competitor data including URLs, rankings, titles, and content scores.

- **URL**: https://apify.com/antonio_espresso/keyword-competitor-recommendation.md
- **Developed by:** [Antonio Blago](https://apify.com/antonio_espresso) (community)
- **Categories:** Automation, SEO tools, E-commerce
- **Features:** Full permissions
- **Stats:** 76 total users, 0 monthly users, 100.0% runs succeeded, 4 bookmarks
- **User rating**: 3.17 out of 5 stars

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## **Apify SEO Keyword Analyzer and Recommendations**

An **Apify Actor** that performs SEO keyword analysis.
It allows you to analyze keywords, retrieve content recommendations, and gain insights into competitors.

***

### ⚠️ Please note:

The output may take **up to 2 minutes** to process, depending on keyword complexity and competitor data volume. It does make a live analysis. Please be a patient.
If you do not get a results in the output, write me an email to info@antonioblago.com

***

***

### **📌 Features**

✅ **Automated Query Submission** → Submits keyword queries to SEO analysis.\
✅ **Retrieves Content Optimization Suggestions** → Title terms, content terms & suggested questions.\
✅ **Competitor Insights** → Extracts ranking competitor data for given keywords.\
✅ **Structured JSON Output** → Provides easy-to-interpret results for analysis.\
✅ **Ideal for SEO Audits, Content Strategy & Keyword Research**.

***

### **📊 Content Scoring Logic**

Each competitor URL is assigned a **Content Score**, which reflects how well the page is optimized for the target keyword compared to other top-ranking pages.

The scoring is based on multiple content quality dimensions:

| Component                    | Description                                                                                       | Weight (%) |
| ---------------------------- | ------------------------------------------------------------------------------------------------- | ---------- |
| **Title Term Coverage**      | Measures how well important keyword-related terms appear in the page’s `<title>`.                 | 20%        |
| **Content Term Coverage**    | Analyzes how frequently and naturally key terms occur throughout the page content.                | 35%        |
| **Keyword Spread & Density** | Evaluates the distribution and placement of keywords across headings, paragraphs, and body.       | 15%        |
| **Semantic Relevance (NLP)** | Uses natural language processing to assess how topically aligned the page is to the main keyword. | 20%        |
| **Structure Quality**        | Considers formatting aspects like heading structure, paragraphs, and use of semantic HTML tags.   | 10%        |

***

#### **Score Ranges Explained**

| Score Range | Interpretation                                                          |
| ----------- | ----------------------------------------------------------------------- |
| **90–100**  | Highly optimized content with strong semantic and structural alignment. |
| **70–89**   | Well-structured and relevant content with moderate optimization gaps.   |
| **<70**     | Low alignment to keyword intent, missing key terms or poor structure.   |

***

#### **Why this Score Matters**

This isn’t just about keyword stuffing — the score reflects **how search-optimized, relevant, and semantically strong** the content is.

The system uses competitive SERP data to determine which terms matter most, how they’re used by top-ranking pages, and how your content compares. It goes beyond exact matches and evaluates **semantic context, keyword prominence**, and **topic completeness**.

***

#### **Example Output (with Score Breakdown)**

```json
{
  "competitors": [
    {
      "rank": 1,
      "url": "https://example.com",
      "content_score": 91,
      "score_breakdown": {
        "title": 18,
        "content_terms": 33,
        "spread_density": 12,
        "nlp_relevance": 18,
        "structure": 10
      }
    }
  ]
}
```

***

Let me know if you want this section embedded into your full Apify README in one go.

***

### **⚙️ Input Parameters**

The actor accepts the following input in **JSON format**:

```json
{
    "keyword": "seo check",
    "language": "English",
    "google_engine": "google.com"
}
```

| Parameter       | Type   | Description                                          |
|---------------|--------|-----------------------------------------------------|
| `keyword`      | String | The target keyword for analysis (required).        |
| `language`     | String | Language for keyword analysis (default: English). Supported languages include English, Spanish, French, German, Chinese, Japanese, Italian, Dutch, Russian, and many more. |
| `google_engine` | String | Google search engine version (default: google.com). Supported versions include google.com, google.co.uk, google.ca, google.de, google.fr, google.es, google.it, google.nl, google.ru, google.co.in, google.com.br, and many more. |

***

### **📤 Output Format**

The actor returns structured JSON output with keyword analysis details.

#### **1️⃣ Keyword Analysis Results**

Example output:

```json
{
    "query": "seo check",
    "metrics": {
        "word_count": { "target": 1200 }
    },
    "terms_txt": {
        "title": ["SEO", "check", "analysis"],
        "content_basic": ["SEO tips", "best practices"]
    },
    "competitors": [
        { "rank": 1, "url": "https://example.com", "content_score": 85 }
    ]
}
```

***

### **🚀 How to Run**

#### **Option 1: Using Apify Console**

1. Go to the [Apify Actor Page](https://apify.com).
2. Click **Run** and provide the input JSON.
3. Retrieve results from the **Dataset Storage**.

#### **Option 2: API Execution (cURL)**

Run the actor directly via **API**:

```sh
cat > input.json <<'EOF'
{
    "keyword": "seo check",
    "language": "English",
    "google_engine": "google.com"
}
EOF

curl "https://api.apify.com/v2/acts/YOUR_ACTOR_ID/runs?token=$API_TOKEN" \
  -X POST \
  -d @input.json \
  -H 'Content-Type: application/json'
```

***

### **🔍 Example Use Cases**

💡 **SEO Audits** → Get keyword insights and content term recommendations.\
💡 **Competitor Analysis** → Identify top-ranking competitors and their strategies.\
💡 **Content Optimization** → Improve keyword usage in articles for higher rankings.

***

### **📚 Resources**

- [Apify Docs](https://docs.apify.com)
- [Help](mailto:info@antonioblago.com)
- [SEO Support](https://antonioblago.de)

***

### **🛠️ Author & Support**

Developed by **\[Antonio Blago]**
💬 Need help? Reach out via **[Apify Community](https://forum.apify.com/)**

***

# Actor input Schema

## `keyword` (type: `string`):

The keyword for competitor analysis.

## `language` (type: `string`):

The language for the search results.

## `google_engine` (type: `string`):

The Google domain to use for the search.

## Actor input object example

```json
{
  "keyword": "seo check",
  "language": "English",
  "google_engine": "google.com"
}
```

# 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 = {
    "keyword": "seo check",
    "language": "English",
    "google_engine": "google.com"
};

// Run the Actor and wait for it to finish
const run = await client.actor("antonio_espresso/keyword-competitor-recommendation").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 = {
    "keyword": "seo check",
    "language": "English",
    "google_engine": "google.com",
}

# Run the Actor and wait for it to finish
run = client.actor("antonio_espresso/keyword-competitor-recommendation").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 '{
  "keyword": "seo check",
  "language": "English",
  "google_engine": "google.com"
}' |
apify call antonio_espresso/keyword-competitor-recommendation --silent --output-dataset

```

## MCP server setup

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

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/zrikMXxBEbEj3a6Pc/builds/dN3zg2hTgrcaEl08q/openapi.json
