{
  "openapi": "3.0.1",
  "info": {
    "title": "Grant & Foundation Funding Intel - Grants.gov + 990-PF",
    "description": "Federal grant opportunities (Grants.gov) + private-foundation giving (IRS 990-PF via ProPublica) in one schema. Funder, eligibility/recipient, amount, focus area, deadline. Funder-to-recipient enrichment, giving history, funder-match scoring, monitor mode. For grant writers and nonprofits.",
    "version": "0.1",
    "x-build-id": "HbkzjEFoGylX8oNKc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/seibs.co~grant-funding-intel/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-seibs.co-grant-funding-intel",
        "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/seibs.co~grant-funding-intel/runs": {
      "post": {
        "operationId": "runs-sync-seibs.co-grant-funding-intel",
        "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/seibs.co~grant-funding-intel/run-sync": {
      "post": {
        "operationId": "run-sync-seibs.co-grant-funding-intel",
        "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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "grant_search",
              "foundation_search",
              "funder_profile",
              "funder_match"
            ],
            "type": "string",
            "description": "grant_search = federal grant opportunities (Grants.gov). foundation_search = private foundations (990-PF) by name/state/focus/size. funder_profile = deep profile of specific funders (EINs + agency codes) with multi-year giving history. funder_match = surface + score funders most likely to fund a cause/region.",
            "default": "grant_search"
          },
          "keywords": {
            "title": "Keywords",
            "maxItems": 20,
            "type": "array",
            "description": "Search terms. grant_search: matches opportunity title/description (e.g. 'workforce development'). foundation_search: matches foundation name. Hard cap of 20.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "agencies": {
            "title": "Federal agency codes (Grants.gov)",
            "type": "string",
            "description": "Pipe-separated Grants.gov agency codes for grant_search / funder_profile, e.g. 'NSF' or 'HHS|ED|USDA'. Leave blank for all agencies.",
            "default": ""
          },
          "eligibilities": {
            "title": "Eligibility filter",
            "maxItems": 20,
            "type": "array",
            "description": "Who can apply (grant_search). Plain tokens or Grants.gov codes. Common: nonprofits_with_501c3, public_higher_education, state_governments, city_or_township_governments, individuals, small_businesses, indian_tribal_governments. Hard cap of 20.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "funding_categories": {
            "title": "Funding category filter",
            "maxItems": 20,
            "type": "array",
            "description": "Funding activity category (grant_search / funder_match). Plain tokens or Grants.gov codes. Common: education, health, housing, environment, arts, community_development, employment_labor_and_training, food_and_nutrition, science_and_technology. Hard cap of 20.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "opp_statuses": {
            "title": "Opportunity statuses (Grants.gov)",
            "type": "string",
            "description": "Pipe-separated Grants.gov statuses for grant_search: posted, forecasted, closed, archived. Default 'posted' (open opportunities).",
            "default": "posted"
          },
          "states": {
            "title": "States",
            "maxItems": 51,
            "type": "array",
            "description": "Two-letter state codes. foundation_search/funder_match: filter foundations by state of domicile (e.g. ['CA','NY']). Hard cap of 51 (50 states + DC).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "ntee_major": {
            "title": "NTEE major group (foundation focus)",
            "type": "array",
            "description": "ProPublica NTEE major-group ids for foundation_search (1=Arts, 2=Education, 3=Environment/Animals, 4=Health, 5=Human Services, 6=International, 7=Public/Societal Benefit, 8=Religion). Numbers only.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "min_assets": {
            "title": "Minimum foundation assets (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only surface foundations whose latest fair-market asset value meets this floor (foundation_search/funder_match). Requires include_giving_history to filter on enriched assets. Leave 0 for no floor.",
            "default": 0
          },
          "eins": {
            "title": "Foundation EINs (funder_profile)",
            "maxItems": 50,
            "type": "array",
            "description": "Employer Identification Numbers of foundations to deep-profile (e.g. ['56-2618866']). Each yields a funder record + multi-year giving history. Hard cap of 50.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "cause": {
            "title": "Cause / project (funder_match)",
            "type": "string",
            "description": "Free-text description of what you need funded (funder_match), e.g. 'after-school literacy program in rural Ohio'. Drives federal-opportunity keyword + foundation matching.",
            "default": ""
          },
          "focus_area": {
            "title": "Focus area (funder_match)",
            "type": "string",
            "description": "Target focus area for funder_match, e.g. 'Education', 'Health', 'Human Services', 'Environment'. Maps to NTEE buckets for foundation matching.",
            "default": ""
          },
          "irs_xml_url": {
            "title": "990-PF e-file XML URL (funder_profile, optional)",
            "type": "string",
            "description": "Optional. URL to a specific 990-PF e-file XML document. When supplied, recipient-level Part XV grant lines are parsed into grant_award records. The IRS serves machine-readable 990s only as per-year bulk ZIPs, so live per-filing extraction is gated; this lets you point at one filing.",
            "default": ""
          },
          "include_giving_history": {
            "title": "Include multi-year giving history",
            "type": "boolean",
            "description": "For foundations, fetch the full 990-PF filing series and compute year-over-year grants paid, payout ratio vs the 5% minimum, asset trend, and giving direction. Adds grant_history_enrichment PPE per foundation. On by default in funder_profile.",
            "default": false
          },
          "include_opportunity_detail": {
            "title": "Fetch full opportunity detail (Grants.gov)",
            "type": "boolean",
            "description": "Fetch each opportunity's detail page for award floor/ceiling, eligibility text, funding categories, and deadlines. Off = faster, metadata-only rows.",
            "default": true
          },
          "max_results_per_query": {
            "title": "Max results per query",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Hard cap on records returned per keyword/search. Default 25.",
            "default": 25
          },
          "contact_email": {
            "title": "Contact email (optional, polite User-Agent)",
            "type": "string",
            "description": "Optional contact email added to the outbound User-Agent so the public APIs can reach you. Not required; not stored.",
            "default": ""
          },
          "slack_webhook_url": {
            "title": "Slack webhook (monitor mode)",
            "type": "string",
            "description": "Optional. When this actor runs on a schedule, post a new-opportunity / new-grant digest to this Slack incoming webhook. Adds scheduled_delta_run PPE on scheduled runs only.",
            "default": ""
          },
          "use_apify_proxy": {
            "title": "Use Apify Proxy",
            "type": "boolean",
            "description": "Route requests through Apify Proxy. DATACENTER is sufficient - Grants.gov and ProPublica are public APIs that do not block datacenter IPs.",
            "default": true
          },
          "apify_proxy_groups": {
            "title": "Proxy groups",
            "type": "array",
            "description": "Apify Proxy groups. DATACENTER is fine for both upstreams.",
            "default": [
              "DATACENTER"
            ],
            "items": {
              "type": "string"
            }
          },
          "concurrency": {
            "title": "Max concurrent requests",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Parallel requests to the upstream public APIs. Capped at 8 to stay polite.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}