# ESPN Keyword Finder (`coding-doctor-omar/espn-keyword-finder`) Actor

Find all ESPN.com articles that mention any of your favorite keywords and determine the exact match location for each match, with rich keyword and author metadata and match snippets with keyword highlighting!

- **URL**: https://apify.com/coding-doctor-omar/espn-keyword-finder.md
- **Developed by:** [Coding Doctor Omar](https://apify.com/coding-doctor-omar) (community)
- **Categories:** News, Automation, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 matched articles

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## 🔍 ESPN Keyword Finder

<p align="center">
    <img src="https://images.apifyusercontent.com/seztq9XX7CWw6el5_RzL3grX6A0EqtjeLqibf65Um8Y/cb:1/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMudXMtZWFzdC0xLmFtYXpvbmF3cy5jb20vOVpGY1BsVEhQM09Cc3hFN0ktYWN0b3ItaGdQQUZGMUx3SndkdWREOWwtTkVZaGQzUTRGWS1lc3BuX2tleXdvcmRfZmluZGVyLnBuZw.png" width="350", alt="actor logo">
</p>

> Like this Actor? Please leave a ⭐⭐⭐⭐⭐ [review](https://console.apify.com/actors/hgPAFF1LwJwdudD9l/reviews) to support me and help others find this Actor too :)

> Facing errors or having a feature suggestion? Feel free to open a new [issue](https://apify.com/coding-doctor-omar/ESPN-Keyword-Finder/issues/open) and tell me your error(s)/suggestion(s).

### Features

- 🔍 **Multi-keyword tracking** — monitor any number of keywords or phrases across ESPN articles in a single run
- 📰 **Headline vs. body breakdown** — see whether each keyword appeared in the headline, the article content, or both
- 🎯 **Case-sensitive matching (optional)** — toggle exact-case matching on or off depending on your use case
- ✂️ **Contextual match snippets** — every match returns the surrounding text with the keyword clearly highlighted
- ✍️ **Author metadata** — get the name, email (when public), and ESPN profile link for each article's author(s)
- 📊 **Per-keyword and aggregate stats** — total occurrences, headline occurrences, content occurrences, and matching-article counts, both per keyword and across your whole keyword set
- 🗂️ **Clean, structured JSON output** — ready to export to CSV/Excel, pipe into Google Sheets, or feed into your own analytics pipeline
- 🗞️ **Optional section filter** — narrow your search to a specific ESPN news section (e.g. NFL, NBA, MLB, Soccer) instead of scanning all of ESPN

### Use Cases

- **Media monitoring & PR** — track how often your athlete, team, brand, or sponsor is mentioned in ESPN coverage, and where
- **Fantasy sports platforms** — surface player buzz, injury mentions, or lineup news the moment it's published
- **Marketing & sponsorship analytics** — measure sponsor name visibility across ESPN's editorial content over time
- **Journalism & newsroom research** — quickly find every ESPN article referencing a topic, player, or storyline you're covering
- **Academic & sports-media research** — analyze coverage trends, author patterns, or topic frequency over a season
- **Fan engagement apps** — power "trending now" or player-mention feeds using real ESPN article data
- **Competitive content analysis** — benchmark how much coverage a topic gets versus rival storylines

### How to Use ESPN Keyword Finder

1. Click the blue **Try for free** button in this page.
2. You may be asked to sign-in or create a FREE Apify account (no credit card required).
3. Configure the Actor input. DO NOT change the Actor RAM. 8 GB is the highly recommended setting for fast and efficient runs.
4. Click the green **Start** or **Save and start** button to run the Actor.
5. View the results in the output tab once the run finishes. You can choose to view the results as JSON or a table (JSON is preferred since the data has a nested data structure).

### Actor Input Explanation & Example

<table border="1">
    <thead>
        <th>Field Name (JSON)</th>
        <th>Field Name (Input Form)</th>
        <th>Type</th>
        <th>Required</th>
        <th>Description</th>
    </thead>
    <tbody>
        <tr>
            <td><code>keywords</code></td>
            <td>Keywords</td>
            <td><code>array</code></td>
            <td>Yes</td>
            <td>An array of the keywords you want to search for.</td>
        </tr>
        <tr>
            <td><code>section</code></td>
            <td>Section</td>
            <td><code>string</code></td>
            <td>No</td>
            <td>The ESPN news section to search inside. Set it to <code>all</code> to search the entire website. Defaults to <code>soccer</code>.</td>
        </tr>
        <tr>
            <td><code>matchCase</code></td>
            <td>Match Case</td>
            <td><code>boolean</code></td>
            <td>No</td>
            <td>If enabled, the keyword search will be case-sensitive. Default <code>false</code>.</td>
        </tr>
    </tbody>
</table>

Input Example:

```json
{
    "keywords": ["messi"],
    "matchCase": false,
    "section": "all"
}
```

### Actor Output Example

```json
{
  "caseSensitive": false,
  "keywordOccurrences": [
    {
      "keyword": "messi",
      "totalOccurrences": 2230,
      "headlineOccurrences": 178,
      "contentOccurrences": 2052,
      "matchingArticlesCount": 171
    },
  ],
  "matchingArticlesCount": 171,
  "matchingArticles": [
    {
      "id": 49433484,
      "url": "https://www.espn.com/story/_/id/49433484",
      "headline": "How Spain won the World Cup without a marquee goal scorer or elite defense",
      "publishedAt": "2026-07-24T08:00:00Z",
      "keywordMatches": [
        {
          "keyword": "messi",
          "location": "content",
          "matchSnippet": "...eadlock even tighter against Argentina and Lionel [Messi] -- the defending champs and the best player of al..."
        },
        {
          "keyword": "messi",
          "location": "content",
          "matchSnippet": "... of the World Cup Golden Boot race, Argentina had [Messi] and Spain had none.\nShould that really have added..."
        },
        {
          "keyword": "messi",
          "location": "content",
          "matchSnippet": "...moved to Arsenal and might have been the best non-[Messi] creator in the world.\nThe 2018 World Cup gets rem..."
        },
        {
          "keyword": "messi",
          "location": "content",
          "matchSnippet": "...World Cup in 2022, they didn't win because Lionel [Messi] decided to finally fulfill his potential at age 3..."
        },
        {
          "keyword": "messi",
          "location": "content",
          "matchSnippet": "...fill his potential at age 35. No, this version of [Messi] was a lot worse than the previous versions of Mes..."
        },
        {
          "keyword": "messi",
          "location": "content",
          "matchSnippet": "...ssi was a lot worse than the previous versions of [Messi] we saw at previous World Cups. No, the big differ..."
        },
        {
          "keyword": "messi",
          "location": "content",
          "matchSnippet": "...ners. Not only could they all move the ball up to [Messi], they were all rangy enough to cover for his lack..."
        }
      ],
      "authors": [
        {
          "name": "Ryan O'Hanlon",
          "email": "ryan.ohanlon@espn.com",
          "espnProfile": "https://www.espn.com/contributor/ryan-ohanlon"
        }
      ]
    },
    ...
  ]
}
```

For more information on the Actor output, check the Actor [output](https://apify.com/coding-doctor-omar/ESPN-Keyword-Finder/output-schema) page.

### Actor Pricing Explanation

This Actor uses a pay-per-event (PPE) pricing model. The details of the events and their prices are shown below. Prices below are not final and may be discounted for premium users.

<table border="1">
    <thead>
        <th>Event Name</th>
        <th>Price</th>
        <th>Event Description</th>
    </thead>
    <tbody>
        <tr>
            <td><code>section-scraped</code></td>
            <td>$0.03</td>
            <td>A scrape of a single ESPN news section.</td>
        </tr>
        <tr>
            <td><code>matched-article</code></td>
            <td>$0.0025</td>
            <td>A single matched article for your keywords.</td>
        </tr>
    </tbody>
</table>

For more info, check the Actor [pricing](https://apify.com/coding-doctor-omar/ESPN-Keyword-Finder/pricing) page.

### Frequently Asked Questions (FAQs)

**Q:** What if **ESPN Keyword Finder** fails? Would I still be charged?

**A:** No, you only get charged for successful runs. Note that runs can be successful and still not find any matching articles for your keyword(s), in which case you will only be charged a fee according to the number of news sections that were scraped.

<hr>

**Q:** How do I know *where* a keyword matched?

**A:** Each match includes a `location` field showing whether it appeared in the `headline` or the article `content`, along with a `matchSnippet` — a short excerpt of surrounding text with the matched keyword wrapped in square brackets, e.g. `...the [Lakers] pulled off a comeback...`.

<hr>

**Q:** Is keyword matching case-sensitive?

**A:** It's your choice. You can set the `matchCase` input argument to `true` if you want case-sensitive matching. A `caseSensitive` property in the run output tells you which mode was used — leave it `false` for broader matching, or set it to `true` if you need exact-case results (e.g. distinguishing "Bulls" the team from "bulls" the animal). The default for this argument is `false`.

<hr>

**Q:** What author information is included?

**A:** Each article includes an `authors` array with the author's name, and email and ESPN profile URL when publicly available. If ESPN doesn't expose that info for a given author, those fields return `null`.

# Actor input Schema

## `keywords` (type: `array`):

The keywords to look for in articles.

## `section` (type: `string`):

The specific ESPN section you want to search inside. Select 'All' if you want to search the entire ESPN website.

## `matchCase` (type: `boolean`):

If enabled, keyword search will be case-sensitive.

## Actor input object example

```json
{
  "keywords": [
    "messi"
  ],
  "section": "soccer",
  "matchCase": false
}
```

# Actor output Schema

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

No description

# 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 = {
    "keywords": [
        "messi"
    ],
    "section": "soccer",
    "matchCase": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("coding-doctor-omar/espn-keyword-finder").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 = {
    "keywords": ["messi"],
    "section": "soccer",
    "matchCase": False,
}

# Run the Actor and wait for it to finish
run = client.actor("coding-doctor-omar/espn-keyword-finder").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "keywords": [
    "messi"
  ],
  "section": "soccer",
  "matchCase": false
}' |
apify call coding-doctor-omar/espn-keyword-finder --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=coding-doctor-omar/espn-keyword-finder",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/hgPAFF1LwJwdudD9l/builds/CKcW2BtjqlEr5gkdH/openapi.json
