{
  "openapi": "3.0.1",
  "info": {
    "title": "FARA Foreign Influence Intelligence & Monitoring",
    "description": "Monitor U.S. FARA foreign-agent activity, don't just search it. Scored registrant and foreign-principal profiles, diligence-routing decisions, foreign-principal influence replay, and cross-run change detection — what changed, who to watch, why now — from official DOJ data.",
    "version": "1.1",
    "x-build-id": "JpXf3pytXh5byKjwV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ryanclinton~fara-foreign-agents/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ryanclinton-fara-foreign-agents",
        "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/ryanclinton~fara-foreign-agents/runs": {
      "post": {
        "operationId": "runs-sync-ryanclinton-fara-foreign-agents",
        "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/ryanclinton~fara-foreign-agents/run-sync": {
      "post": {
        "operationId": "run-sync-ryanclinton-fara-foreign-agents",
        "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": {
          "registrantName": {
            "title": "Registrant Name",
            "type": "string",
            "description": "Search for registrant/agent by name (case-insensitive substring match)"
          },
          "foreignPrincipalName": {
            "title": "Foreign Principal Name",
            "type": "string",
            "description": "Search by foreign principal (government, entity, or person represented)"
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Filter by country of foreign principal (e.g., China, Russia, Saudi Arabia)"
          },
          "registrationNumber": {
            "title": "Registration Number",
            "type": "string",
            "description": "Look up a specific registrant by FARA registration number"
          },
          "status": {
            "title": "Status",
            "enum": [
              "Active",
              "Terminated",
              "Both"
            ],
            "type": "string",
            "description": "Filter by registration status",
            "default": "Active"
          },
          "matchMode": {
            "title": "Name Match Mode",
            "enum": [
              "contains",
              "exact",
              "fuzzy"
            ],
            "type": "string",
            "description": "How registrantName is matched. contains = case-insensitive substring (default); exact = full-string equality; fuzzy = token-set similarity (catches word reorderings and minor variants).",
            "default": "contains"
          },
          "includeDocuments": {
            "title": "Include Filing Documents",
            "type": "boolean",
            "description": "Fetch document links for each registrant (slower due to rate limits)",
            "default": true
          },
          "includePrincipals": {
            "title": "Include Foreign Principals",
            "type": "boolean",
            "description": "Fetch foreign principals for each registrant",
            "default": true
          },
          "newSinceDate": {
            "title": "New Registrations Since",
            "type": "string",
            "description": "Only return registrants registered after this date (MM-DD-YYYY)"
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of registrant profiles to return",
            "default": 50
          },
          "minExposureTier": {
            "title": "Minimum Exposure Tier",
            "enum": [
              "LOW",
              "MEDIUM",
              "HIGH",
              "CRITICAL"
            ],
            "type": "string",
            "description": "Only return registrants at or above this descriptive foreign-influence exposure tier. Registrants below it are counted in the run summary, not dropped silently."
          },
          "outputProfile": {
            "title": "Output Profile",
            "enum": [
              "minimal",
              "standard",
              "full"
            ],
            "type": "string",
            "description": "How much detail to include per registrant. minimal = decision fields only; standard = + risk factors; full = + raw foreign-principal and document arrays.",
            "default": "standard"
          },
          "outputMode": {
            "title": "Output Mode",
            "enum": [
              "records",
              "dashboard"
            ],
            "type": "string",
            "description": "records = one row per registrant plus a run summary. dashboard = a single digest record (counts, tiers, review queue, top countries, top document types, top agents) with no per-registrant rows.",
            "default": "records"
          },
          "outputEntity": {
            "title": "Output Entity",
            "enum": [
              "registrants",
              "relationships",
              "filings",
              "principals",
              "timeline"
            ],
            "type": "string",
            "description": "Shape of the per-record rows. registrants = one unified profile per registrant (default); relationships = one graph-edge row (source/target/REPRESENTS) per registrant-principal pair (Neo4j/Gephi/Maltego-ready); filings = one row per filing document; principals = aggregate by foreign principal (registrant counts, countries, agents); timeline = one chronological event per filing.",
            "default": "registrants"
          },
          "watchlistName": {
            "title": "Watchlist / Portfolio Name",
            "type": "string",
            "description": "Optional. Name a watchlist (or portfolio) to enable cross-run monitoring: results are compared against your last run under the same name and tagged with changeFlag / change reasons / events (new registration, status change, new/removed principal, new document, termination, reactivation, exposure escalation). The run summary carries a monitoring rollup (new registrants/principals/documents, escalations) and longitudinal stats (average/max exposure, trend, changes in the last 30/90 days). Leave blank for a stateless one-off screen."
          },
          "portfolioName": {
            "title": "Portfolio Name (alias)",
            "type": "string",
            "description": "Alias for Watchlist Name. Use whichever term fits your workflow — both enable the same cross-run monitoring. If both are set, watchlistName wins."
          },
          "watchMode": {
            "title": "Watchlist Mode",
            "enum": [
              "fullWithDiff",
              "diffOnly"
            ],
            "type": "string",
            "description": "Only applies when a watchlist is set. fullWithDiff = emit every registrant with its change signals (default); diffOnly = emit only registrants that changed since the last run (a clean change feed). The run summary always reflects the full screened set.",
            "default": "fullWithDiff"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Required. FARA's per-registrant endpoints (foreign principals and filing documents) block datacenter IPs, so principal/document enrichment needs a proxy. Apify Proxy (datacenter) is the default; if principals and documents come back empty, switch the proxy group to Residential.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}