{
  "name": "SEC EDGAR Corporate Filings -> CSV / Google Sheets (Cost-Capped $0.25)",
  "nodes": [
    {
      "id": "11111111-1111-4111-8111-111111111111",
      "name": "Run manually",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ],
      "parameters": {}
    },
    {
      "id": "22222222-2222-4222-8222-222222222222",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        0,
        -320
      ],
      "parameters": {
        "content": "## Cost-Capped SEC EDGAR Scraper\n- **Cost guard:** `maxTotalChargeUsd=0.25` + `maxItems: 25` ensures max spend $0.25 per run.\n- **Estimated cost per run:** ~$0.10005 (start $0.00005 + 25 × $0.004).\n- **Retry policy:** `retryOnFail: false` – no automatic retries to avoid unexpected charges.\n- **Auth setup:** Set environment variable `APIFY_TOKEN` in n8n (n8n → Settings → Environment Variables). Never hardcode tokens in workflow!\n- **License:** US Government Public Domain (U.S. SEC EDGAR, zero PII). Commercial use allowed. If redistributing, keep the `attribution` column.\n- **Export CSV:** The Convert to CSV node is already connected. Alternatively, connect a Google Sheets node directly to the HTTP Request node's JSON items output.\n- **RapidAPI alternative:** https://rapidapi.com/fallRainy/api/sec-edgar-corporate-filings (GET /v1/sec-edgar/filings)\n- **Actor store:** https://apify.com/perceptive_city_af7/sec-edgar-filings-scraper",
        "width": 820,
        "height": 260,
        "color": 4
      }
    },
    {
      "id": "33333333-3333-4333-8333-333333333333",
      "name": "Fetch SEC EDGAR Filings (Apify)",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "retryOnFail": false,
      "position": [
        280,
        0
      ],
      "parameters": {
        "method": "POST",
        "url": "https://api.apify.com/v2/acts/8LFIbRbidiHPknMz5/run-sync-get-dataset-items?maxTotalChargeUsd=0.25",
        "authentication": "none",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{$env.APIFY_TOKEN}}"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "format",
              "value": "json"
            },
            {
              "name": "clean",
              "value": "true"
            },
            {
              "name": "timeout",
              "value": "60"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "{\"mode\":\"search\",\"query\":\"artificial intelligence\",\"forms\":\"10-K,10-Q,8-K\",\"startDate\":\"2025-01-01\",\"maxItems\":25}",
        "options": {
          "timeout": 90000
        }
      }
    },
    {
      "id": "44444444-4444-4444-8444-444444444444",
      "name": "Convert to CSV (Google Sheets Ready)",
      "type": "n8n-nodes-base.convertToFile",
      "typeVersion": 1.1,
      "position": [
        560,
        0
      ],
      "parameters": {
        "operation": "csv",
        "binaryPropertyName": "data",
        "options": {
          "fileName": "sec-edgar-filings.csv",
          "headerRow": true
        }
      }
    }
  ],
  "connections": {
    "Run manually": {
      "main": [
        [
          {
            "node": "Fetch SEC EDGAR Filings (Apify)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch SEC EDGAR Filings (Apify)": {
      "main": [
        [
          {
            "node": "Convert to CSV (Google Sheets Ready)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "pinData": {}
}
