{
  "openapi": "3.0.1",
  "info": {
    "title": "US Regulatory & Public Filings Radar (SEC, FDA, Gov)",
    "description": "Aggregate & score SEC EDGAR filings, FDA recalls, Federal Register rules, and USASpending awards into normalized JSON with delta alerts.",
    "version": "0.1",
    "x-build-id": "sPeA4IDLeXCASTVl2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/striped_tailgate~us-regulatory-filings-radar/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-striped_tailgate-us-regulatory-filings-radar",
        "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/striped_tailgate~us-regulatory-filings-radar/runs": {
      "post": {
        "operationId": "runs-sync-striped_tailgate-us-regulatory-filings-radar",
        "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/striped_tailgate~us-regulatory-filings-radar/run-sync": {
      "post": {
        "operationId": "run-sync-striped_tailgate-us-regulatory-filings-radar",
        "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": {
          "keywords": {
            "title": "Keywords / Topics",
            "type": "array",
            "description": "Keywords, product names, regulations, or entities to monitor across all selected sources (e.g., \"artificial intelligence\", \"GLP-1\", \"cybersecurity\"). Leave empty alongside tickers for a broad daily feed.",
            "items": {
              "type": "string"
            }
          },
          "tickers": {
            "title": "US Stock Tickers (SEC EDGAR + Cross-Source)",
            "type": "array",
            "description": "Optional public company tickers (e.g., NVDA, LLY, AAPL). Automatically resolves Ticker -> CIK via SEC company_tickers.json, fetches recent company submissions, and cross-searches company names across FDA and USASpending.",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "title": "Enabled Data Sources",
            "type": "array",
            "description": "Official public APIs to query: sec_edgar, federal_register, openfda, usaspending.",
            "default": [
              "sec_edgar",
              "federal_register",
              "openfda",
              "usaspending"
            ],
            "items": {
              "type": "string"
            }
          },
          "lookbackDays": {
            "title": "Lookback Days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Number of days back from today (UTC) to search when startDate is omitted.",
            "default": 14
          },
          "startDate": {
            "title": "Start Date (YYYY-MM-DD)",
            "type": "string",
            "description": "Optional explicit start date in YYYY-MM-DD format. Overrides lookbackDays."
          },
          "endDate": {
            "title": "End Date (YYYY-MM-DD)",
            "type": "string",
            "description": "Optional explicit end date in YYYY-MM-DD format. Defaults to today (UTC)."
          },
          "secForms": {
            "title": "SEC Form Types",
            "type": "array",
            "description": "SEC EDGAR form types to include (e.g., 8-K, D, SC 13D, SC 13G, 10-K, 10-Q, S-1).",
            "default": [
              "8-K",
              "D",
              "SC 13D",
              "SC 13G",
              "10-K"
            ],
            "items": {
              "type": "string"
            }
          },
          "federalRegisterTypes": {
            "title": "Federal Register Document Types",
            "type": "array",
            "description": "Document types: RULE, PRORULE, NOTICE, PRESDOCU.",
            "default": [
              "RULE",
              "PRORULE",
              "NOTICE"
            ],
            "items": {
              "type": "string"
            }
          },
          "federalRegisterAgencies": {
            "title": "Federal Register Agency Slugs",
            "type": "array",
            "description": "Optional Federal Register agency slugs (e.g., securities-and-exchange-commission, food-and-drug-administration, federal-trade-commission, bureau-of-industry-and-security).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "significantRulesOnly": {
            "title": "Economically Significant Rules Only",
            "type": "boolean",
            "description": "When enabled, filters Federal Register results to rules designated as significant under EO 12866.",
            "default": false
          },
          "usaspendingAwardScope": {
            "title": "USASpending Award Scope",
            "enum": [
              "both",
              "contracts",
              "grants"
            ],
            "type": "string",
            "description": "Which federal award categories to query from USASpending.gov.",
            "default": "both"
          },
          "minMaterialityScore": {
            "title": "Minimum Materiality Score (0-100)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Filter output records to items meeting or exceeding this calculated materiality/risk score.",
            "default": 0
          },
          "maxItemsPerSource": {
            "title": "Max Items Per Source",
            "minimum": 1,
            "maximum": 250,
            "type": "integer",
            "description": "Maximum number of normalized records collected per enabled source.",
            "default": 50
          },
          "onlyNew": {
            "title": "Only Emit Unseen Records (Delta Mode)",
            "type": "boolean",
            "description": "Uses a persistent Apify Key-Value Store to track previously emitted record_ids and push only newly discovered items on scheduled runs.",
            "default": false
          },
          "persistState": {
            "title": "Persist Seen State Without Filtering",
            "type": "boolean",
            "description": "When true, annotates is_new against the Key-Value Store and saves newly seen IDs even if onlyNew is false.",
            "default": false
          },
          "stateStoreName": {
            "title": "State Key-Value Store Name",
            "type": "string",
            "description": "Named Apify Key-Value Store used for cross-run deduplication.",
            "default": "us-regulatory-radar-state"
          },
          "secUserAgent": {
            "title": "SEC Compliant User-Agent",
            "type": "string",
            "description": "Required by SEC EDGAR fair-access policy (format: AppName/Version ContactEmail).",
            "default": "USRegulatoryRadar/1.0 (compliance-alerts@apify-actor.org)"
          },
          "openfdaApiKey": {
            "title": "Optional openFDA API Key",
            "type": "string",
            "description": "Optional openFDA API key for elevated rate limits (not required for standard runs)."
          },
          "failOnPartialError": {
            "title": "Fail Run on Partial Source Error",
            "type": "boolean",
            "description": "If true, fails the Actor whenever any enabled source fails instead of returning partial results from healthy sources.",
            "default": false
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}