# Fathom Quote Extractor (`synkco/fathom-quote-extractor`) Actor

Extract video download  URL from fathom meeting recordings for given quotes from the meeting recordings which you could use to create a video meeting highlight from different clips or use for other kinds of analysis and LLM usage.

- **URL**: https://apify.com/synkco/fathom-quote-extractor.md
- **Developed by:** [Nagendra Yadav](https://apify.com/synkco) (community)
- **Categories:** Videos, Developer tools, Automation
- **Security:** Limited permissions
- **Stats:** 3 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.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/actors/running/actors-in-store.md#pay-per-event

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

## Fathom Quote Extractor

An Apify Actor that extracts video chunk download URLs for specific quotes from Fathom meeting recordings.

### Features

- Extract video chunk URLs for exact quotes from Fathom transcripts
- Batch processing of multiple quotes in a single run
- Fuzzy matching to handle transcription variations (filler words, punctuation)
- Structured JSON output with download URLs and metadata

### Input

The Actor accepts the following input:

```json
{
  "fathomShareUrl": "https://fathom.video/share/ABC123",
  "quotes": [
    "This is the first quote to find",
    "This is another quote to extract"
  ],
  "delayBetweenQuotes": 1.0,
  "pageLoadTimeout": 30
}
```

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `fathomShareUrl` | string | Yes | Fathom share URL (must start with `https://fathom.video/share/`) |
| `quotes` | array | Yes | Array of quote strings to find in the transcript |
| `delayBetweenQuotes` | number | No | Delay in seconds between processing quotes (default: 1.0) |
| `pageLoadTimeout` | number | No | Page load timeout in seconds (default: 30) |

### Output

The Actor outputs a dataset with the following structure:

```json
{
  "fathomShareUrl": "https://fathom.video/share/ABC123",
  "results": [
    {
      "quote": "This is the first quote to find",
      "downloadURL": "https://fathom-recording-data.storage.googleapis.com/chunk/...",
      "found": true,
      "chunkId": "12345678_1_00042"
    },
    {
      "quote": "This is another quote to extract",
      "downloadURL": "",
      "found": false,
      "chunkId": null
    }
  ],
  "processedAt": "2024-01-15T10:30:00.000Z",
  "totalQuotes": 2,
  "quotesFound": 1,
  "quotesNotFound": 1
}
```

### Local Development

#### Prerequisites

- Python 3.10+
- Chrome browser (for local testing)
- Apify CLI

#### Setup

1. Clone the repository
2. Create a virtual environment:
   ```bash
   python -m venv .venv
   source .venv/bin/activate  # On Windows: .venv\Scripts\activate
   ```
3. Install dependencies:
   ```bash
   pip install -r requirements.txt
   ```

#### Running Locally

1. Create input file at `storage/key_value_stores/default/INPUT.json`:
   ```json
   {
     "fathomShareUrl": "https://fathom.video/share/YOUR_SHARE_ID",
     "quotes": ["Your quote to find"]
   }
   ```

2. Run the Actor:
   ```bash
   apify run
   ```

3. Check output in `storage/datasets/default/`

### Deployment

#### Deploy to Apify

```bash
apify login
apify push
```

#### CI/CD

This repository includes GitHub Actions workflows for:

- **Lint & Test**: Runs on every push and PR
- **Deploy to Apify**: Automatically deploys on push to `main` branch

Required secrets for deployment:

- `APIFY_TOKEN`: Your Apify API token

### How It Works

1. **Navigate**: Opens the Fathom share URL in a headless Chrome browser
2. **Load Transcript**: Clicks the TRANSCRIPT tab and waits for content
3. **Find Quote**: Searches transcript segments using:
   - Exact text matching
   - Fuzzy matching (ignoring filler words like "uh", "um")
   - Word overlap matching (70% threshold)
4. **Capture URL**: Clicks the matching segment and captures the video chunk URL from network requests
5. **Output**: Returns structured results with download URLs

### Limitations

- Requires a valid, non-expired Fathom share URL
- Quote must exist in the transcript (verbatim or with minor variations)
- Download URLs are time-limited (typically 6 hours)

### License

MIT

# Actor input Schema

## `fathomShareUrl` (type: `string`):

Public share URL of the Fathom meeting recording

## `quotes` (type: `array`):

Array of exact quote strings to search for in the transcript

## `pageLoadTimeout` (type: `integer`):

Maximum time in seconds to wait for page to load

## `delayBetweenQuotes` (type: `integer`):

Delay in seconds between processing each quote (rate limiting)

## Actor input object example

```json
{
  "fathomShareUrl": "https://fathom.video/share/XzMiaQ5WEEhtY1ybir4YyWSgZyNxyqNZ",
  "quotes": [
    "Hi Suz. How are you?"
  ],
  "pageLoadTimeout": 30,
  "delayBetweenQuotes": 1
}
```

# 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 = {
    "fathomShareUrl": "https://fathom.video/share/XzMiaQ5WEEhtY1ybir4YyWSgZyNxyqNZ",
    "quotes": [
        "Hi Suz. How are you?"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("synkco/fathom-quote-extractor").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 = {
    "fathomShareUrl": "https://fathom.video/share/XzMiaQ5WEEhtY1ybir4YyWSgZyNxyqNZ",
    "quotes": ["Hi Suz. How are you?"],
}

# Run the Actor and wait for it to finish
run = client.actor("synkco/fathom-quote-extractor").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 '{
  "fathomShareUrl": "https://fathom.video/share/XzMiaQ5WEEhtY1ybir4YyWSgZyNxyqNZ",
  "quotes": [
    "Hi Suz. How are you?"
  ]
}' |
apify call synkco/fathom-quote-extractor --silent --output-dataset

```

## MCP server setup

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

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/naWB0wI7MDpTHYR9E/builds/iuyY2c2kVIuva2jTh/openapi.json
