# FARA Scraper: Foreign Agents, Principals, Countries (`thoob/fara-foreign-agent-feed`) Actor

Structured registrant-to-foreign-principal relationships from the official US DOJ FARA bulk data, filterable by country and registrant, with a what-changed-since-last-run mode. Billed only per delivered record.

- **URL**: https://apify.com/thoob/fara-foreign-agent-feed.md
- **Developed by:** [Pono Data](https://apify.com/thoob) (community)
- **Categories:** News, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.02 / 1,000 relationship records

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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## FARA Foreign Agent Feed

Structured registrant-to-foreign-principal relationships from the official U.S. Department of Justice Foreign Agents Registration Act (FARA) bulk data. Filter by country or registrant, get a clean relationship row for each match, and run a changes-only mode that returns just what is new, terminated, or reactivated since your last run.

You pay only for a delivered relationship record. Filtered-out rows, unchanged rows, and corrupt source rows cost nothing.

### What a record is

One row per registrant-to-foreign-principal relationship, joined across the two official FARA extracts:

- the US registrant (the agent registered under FARA): name, business name, US city and state, active or terminated
- the foreign principal they represent: name, country or location, the principal's address
- the relationship: registration date, termination date, active flag, and in changes mode the change type
- provenance on every row: `sourceUrl`, `retrievedAt`, `confidence`, `jurisdiction`

Every value appears verbatim in the official FARA extract named in `sourceUrl`. Nothing is guessed or inferred.

### Sample output

A real slice, active relationships representing China and Russia (abbreviated):

| country | foreignPrincipal | registrantName | relationshipActive | sourceUrl |
|---|---|---|---|---|
| CHINA | Huawei Technologies Co., Ltd. | Ruder Finn, Inc. | true | efile.fara.gov/bulk/zip/FARA_All_ForeignPrincipals.csv.zip |
| CHINA | Stilwell Museum of Chongqing | Dume, Manuel Jesus | true | efile.fara.gov/bulk/zip/FARA_All_ForeignPrincipals.csv.zip |
| RUSSIA | Alexey Kuzovkin | Sher Tremonte LLP | true | efile.fara.gov/bulk/zip/FARA_All_ForeignPrincipals.csv.zip |

### Two modes

- **full**: every relationship matching your filter.
- **changes**: only relationships that are new, newly terminated, or reactivated since this account's last run. The state is tracked per account in a named store, so it is your timeline, not a shared one. The first changes run has no baseline, so it returns everything matching once and tracks deltas from there.

### Filters

- **countries**: keep only foreign principals representing these countries or locations, spelled as FARA spells them in capitals (CHINA, RUSSIA, SAUDI ARABIA, TAIWAN). Empty means every country.
- **registrantSearch**: keep only relationships whose registrant name or business name contains this text.
- **activeOnly**: drop relationships FARA has marked terminated.
- **includeRegistrantDetails**: join the Registrants extract for business name, US location, and registrant status. On by default.
- **maxRecords**: a safety cap on how many records a run delivers and bills. 0 means no cap; the platform spend cap is honored regardless.

### What to expect

- The full FARA picture is about 17,600 active and historical relationships across roughly 270 countries and locations, updated daily by the DOJ.
- The whole dataset is public and free directly from DOJ. What this actor sells is the targeted, enriched, change-monitored slice: a country watch, a registrant watch, or a daily "what changed" feed, with the registrant join and provenance already done.
- FARA's own export has a small number of rows (about nine the day this was built) with a stray-quote bug that shifts their columns. This actor detects those by their non-numeric registration number, routes them to a free `rejected` dataset so you can see them, and never bills or guesses them.

### Pricing

One meter. You are billed per delivered relationship record that matched your filter. A run that matches nothing, a row filtered out, an unchanged row in changes mode, and a corrupt source row are all free. See PRICING.md for the per-record price.

### Source and scope

- Source: the official FARA eFile bulk repository (`efile.fara.gov/bulk`), public domain, no key, no anti-bot, retrieved with a declared identifying User-Agent.
- FARA is a US federal disclosure regime. Registrants and foreign principals are entities and parties named in public statutory filings. This actor carries only that public-record data and stamps `jurisdiction=US`.
- This is a data tool, not legal or compliance advice. A FARA record is a filing, not a finding.

### See also

More clean, pay-only-for-results data tools from Pono Data:

- [FCC Filings & Proceedings Lookup](https://apify.com/thoob/fcc-ecfs-filings) - public FCC filings and proceedings
- [Regulatory Change Monitor](https://apify.com/thoob/regulatory-change-monitor) - federal rulemaking from the Federal Register
- [FDA Food Recall & Enforcement Alerts](https://apify.com/thoob/fda-food-recall-feed) - US food recalls and enforcement reports

Full catalog: https://apify.com/thoob

# Actor input Schema

## `countries` (type: `array`):

Filter to foreign principals representing these countries or locations, matched exactly as FARA spells them in capitals (for example CHINA, RUSSIA, SAUDI ARABIA, TAIWAN). Leave empty to include every country.
## `registrantSearch` (type: `string`):

Optional. Keep only relationships whose US registrant name or business name contains this text (case-insensitive). Leave empty to include every registrant.
## `activeOnly` (type: `boolean`):

When on, drop relationships that FARA has marked terminated (a foreign-principal termination date is present).
## `includeRegistrantDetails` (type: `boolean`):

Join the FARA Registrants extract to add each registrant's business name, US city and state, and active or terminated status. Turn off for a faster run that uses only the foreign-principals extract.
## `mode` (type: `string`):

full returns every relationship matching your filter. changes returns only relationships that are new, newly terminated, or reactivated since this account's last run, tracked per account. The first changes run has no baseline, so it returns everything matching once, then tracks deltas from there.
## `maxRecords` (type: `integer`):

Safety cap on how many relationship records this run delivers and bills. 0 means no cap. In changes mode, records beyond the cap are not dropped: they are delivered on a later run, never billed twice. The platform spend cap (ACTOR_MAX_TOTAL_CHARGE_USD) is honored regardless.

## Actor input object example

```json
{
  "countries": [],
  "activeOnly": false,
  "includeRegistrantDetails": true,
  "mode": "full",
  "maxRecords": 0
}
````

# Actor output Schema

## `registrations` (type: `string`):

One row per registrant-to-foreign-principal relationship.

# 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 = {
    "countries": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("thoob/fara-foreign-agent-feed").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 = { "countries": [] }

# Run the Actor and wait for it to finish
run = client.actor("thoob/fara-foreign-agent-feed").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 '{
  "countries": []
}' |
apify call thoob/fara-foreign-agent-feed --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=thoob/fara-foreign-agent-feed",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "FARA Scraper: Foreign Agents, Principals, Countries",
        "description": "Structured registrant-to-foreign-principal relationships from the official US DOJ FARA bulk data, filterable by country and registrant, with a what-changed-since-last-run mode. Billed only per delivered record.",
        "version": "0.0",
        "x-build-id": "ckLdZZ7IpeJKaFbDl"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/thoob~fara-foreign-agent-feed/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-thoob-fara-foreign-agent-feed",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/thoob~fara-foreign-agent-feed/runs": {
            "post": {
                "operationId": "runs-sync-thoob-fara-foreign-agent-feed",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/thoob~fara-foreign-agent-feed/run-sync": {
            "post": {
                "operationId": "run-sync-thoob-fara-foreign-agent-feed",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "countries": {
                        "title": "Countries or locations represented",
                        "type": "array",
                        "description": "Filter to foreign principals representing these countries or locations, matched exactly as FARA spells them in capitals (for example CHINA, RUSSIA, SAUDI ARABIA, TAIWAN). Leave empty to include every country.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "registrantSearch": {
                        "title": "Registrant name contains",
                        "type": "string",
                        "description": "Optional. Keep only relationships whose US registrant name or business name contains this text (case-insensitive). Leave empty to include every registrant."
                    },
                    "activeOnly": {
                        "title": "Active relationships only",
                        "type": "boolean",
                        "description": "When on, drop relationships that FARA has marked terminated (a foreign-principal termination date is present).",
                        "default": false
                    },
                    "includeRegistrantDetails": {
                        "title": "Enrich with registrant details",
                        "type": "boolean",
                        "description": "Join the FARA Registrants extract to add each registrant's business name, US city and state, and active or terminated status. Turn off for a faster run that uses only the foreign-principals extract.",
                        "default": true
                    },
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "full",
                            "changes"
                        ],
                        "type": "string",
                        "description": "full returns every relationship matching your filter. changes returns only relationships that are new, newly terminated, or reactivated since this account's last run, tracked per account. The first changes run has no baseline, so it returns everything matching once, then tracks deltas from there.",
                        "default": "full"
                    },
                    "maxRecords": {
                        "title": "Max delivered records",
                        "minimum": 0,
                        "maximum": 100000,
                        "type": "integer",
                        "description": "Safety cap on how many relationship records this run delivers and bills. 0 means no cap. In changes mode, records beyond the cap are not dropped: they are delivered on a later run, never billed twice. The platform spend cap (ACTOR_MAX_TOTAL_CHARGE_USD) is honored regardless.",
                        "default": 0
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
