{
  "openapi": "3.0.1",
  "info": {
    "title": "Nonprofit & IRS 990 Scraper - Charities, Officers & Leads",
    "description": "Scrape U.S. nonprofits & IRS Form 990 data: name, EIN, address, NTEE category, 501(c) status, multi-year revenue/expenses/assets, officers & key-employee compensation, and a lead score. Filter by state, category, subsection & revenue. B2B leads + monitoring. No browser.",
    "version": "0.1",
    "x-build-id": "CnJ01fTAbPklk9hKk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~nonprofit-990-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-nonprofit-990-scraper",
        "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/scrapesage~nonprofit-990-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-nonprofit-990-scraper",
        "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/scrapesage~nonprofit-990-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-nonprofit-990-scraper",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "organizations"
            ],
            "type": "string",
            "description": "<b>Search</b> = discover organizations by keyword, state, NTEE category and 501(c) subsection (the usual lead-gen flow). <b>Organizations</b> = look up specific orgs by EIN (or paste ProPublica URLs in Start URLs).",
            "default": "search"
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Keywords to search organization names & purposes, e.g. <code>food bank</code>, <code>private school</code>, <code>animal rescue</code>, <code>community foundation</code>. Each term runs as a separate search. Leave empty to browse purely by the filters below (state / category / subsection).",
            "items": {
              "type": "string"
            }
          },
          "eins": {
            "title": "EINs (Organizations mode)",
            "type": "array",
            "description": "Employer Identification Numbers to look up directly, e.g. <code>53-0196605</code> or <code>530196605</code>. Used when Mode = Specific organizations.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Paste ProPublica Nonprofit Explorer URLs — organization pages (<code>.../nonprofits/organizations/530196605</code>) or search URLs (<code>.../nonprofits/search?q=...&state[id]=CA</code>). They are auto-routed.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Filter by the organization's state — two-letter USPS codes, e.g. <code>CA</code>, <code>TX</code>, <code>NY</code>. Applied as a server-side search filter and verified on each record. Leave empty for all states.",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Filter by city (case-insensitive, exact city name), e.g. <code>Los Angeles</code>, <code>Chicago</code>.",
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP codes (prefix)",
            "type": "array",
            "description": "Filter by ZIP — full ZIP (<code>90012</code>) or a prefix (<code>900</code> matches 900xx).",
            "items": {
              "type": "string"
            }
          },
          "nteeMajorGroups": {
            "title": "NTEE categories",
            "type": "array",
            "description": "Filter by the org's broad NTEE category. Applied as a server-side search filter.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5",
                "6",
                "7",
                "8",
                "9",
                "10"
              ],
              "enumTitles": [
                "Arts, Culture & Humanities",
                "Education",
                "Environment & Animals",
                "Health",
                "Human Services",
                "International, Foreign Affairs",
                "Public & Societal Benefit",
                "Religion-Related",
                "Mutual / Membership Benefit",
                "Unknown / Unclassified"
              ]
            }
          },
          "nteeCodePrefixes": {
            "title": "NTEE code prefixes",
            "type": "array",
            "description": "Finer filter on the full NTEE code (checked per record), e.g. <code>B</code> = education, <code>E</code> = health, <code>P</code> = human services, <code>A6</code> = museums, <code>T</code> = philanthropy/foundations.",
            "items": {
              "type": "string"
            }
          },
          "subsectionCodes": {
            "title": "501(c) subsection",
            "type": "array",
            "description": "Filter by IRS 501(c) subsection. Applied as a server-side search filter.",
            "items": {
              "type": "string",
              "enum": [
                "3",
                "4",
                "5",
                "6",
                "7",
                "8",
                "9",
                "10",
                "19"
              ],
              "enumTitles": [
                "501(c)(3) — charitable / educational",
                "501(c)(4) — social welfare",
                "501(c)(5) — labor / agricultural",
                "501(c)(6) — business league / chamber",
                "501(c)(7) — social & recreational club",
                "501(c)(8) — fraternal beneficiary",
                "501(c)(9) — employee beneficiary (VEBA)",
                "501(c)(10) — domestic fraternal",
                "501(c)(19) — veterans organization"
              ]
            }
          },
          "organizationKind": {
            "title": "Public charity vs private foundation",
            "enum": [
              "any",
              "publicCharity",
              "privateFoundation"
            ],
            "type": "string",
            "description": "Narrow 501(c)(3)s to <b>public charities</b> (operating nonprofits — the usual lead target) or <b>private foundations</b> (grantmakers — useful for fundraising teams).",
            "default": "any"
          },
          "only501c3": {
            "title": "501(c)(3) only",
            "type": "boolean",
            "description": "Only return 501(c)(3) charitable organizations (the most common and most-targeted type).",
            "default": false
          },
          "nameQuery": {
            "title": "Name contains",
            "type": "string",
            "description": "Only return organizations whose name contains this text (case-insensitive)."
          },
          "minRevenue": {
            "title": "Min annual revenue ($)",
            "type": "integer",
            "description": "Only orgs with latest-year total revenue at or above this (a proxy for budget / buying power). E.g. <code>1000000</code> for $1M+."
          },
          "maxRevenue": {
            "title": "Max annual revenue ($)",
            "type": "integer",
            "description": "Only orgs with latest-year total revenue at or below this."
          },
          "minAssets": {
            "title": "Min total assets ($)",
            "type": "integer",
            "description": "Only orgs with latest-year total assets at or above this."
          },
          "minOfficerCompensation": {
            "title": "Min top-officer compensation ($)",
            "type": "integer",
            "description": "Only orgs whose highest-paid officer earns at least this much — a strong signal of a well-resourced, professionally-staffed organization. Requires officer extraction (on by default)."
          },
          "withOfficersOnly": {
            "title": "Only orgs with named officers",
            "type": "boolean",
            "description": "Skip organizations that don't report Key Employees & Officers on their latest 990 (typically very small 990-N/990-EZ filers). Keeps only records with decision-maker contacts.",
            "default": false
          },
          "activeOnly": {
            "title": "Active organizations only",
            "type": "boolean",
            "description": "Only organizations with an active IRS tax-exempt status.",
            "default": false
          },
          "includeOfficers": {
            "title": "Include officers & compensation",
            "type": "boolean",
            "description": "Extract the Key Employees & Officers (names, titles, compensation) from each org's latest Form 990. This is the decision-maker lead wedge. Turning it off makes runs faster and cheaper (financial firmographics only).",
            "default": true
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of organization records to return in this run.",
            "default": 200
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 12,
            "type": "integer",
            "description": "How many organizations to fetch in parallel. 5 is a good, polite default.",
            "default": 5
          },
          "monitorMode": {
            "title": "Monitoring mode — only new / newly-filed orgs",
            "type": "boolean",
            "description": "Remember which organizations (and filing years) were already returned in a named key-value store and emit ONLY orgs that are new — or that have filed a newer 990 — since the last run. Each is tagged <code>monitorEvent: \"new\"</code> or <code>\"updated\"</code>. Run on a Schedule to capture fresh nonprofits / fresh financials as leads. Works alongside Apify Schedules (the schedule starts the run; monitoring decides what's new).",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Names the memory used by monitoring mode. Use a distinct key per saved watch (e.g. per state/category) so different monitors don't share state.",
            "default": "default"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy used for requests to ProPublica. Apify Proxy (datacenter) is recommended and on by default; the actor automatically rotates sessions and escalates to US residential if needed.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}