{
  "openapi": "3.0.1",
  "info": {
    "title": "Nonprofit Data API with Grants, RFPs and Charity Check: Candid",
    "description": "Search US nonprofits and read full profiles with Form 990 financials, leaders and programs, Charity Check IRS Pub 78, BMF and OFAC status, demographics, grant funders, recipients and transactions, and open RFPs through the Candid (GuideStar, Foundation Center) APIs by EIN. Bring your own key.",
    "version": "0.1",
    "x-build-id": "bTLqOMiy15nPlue1p"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~nonprofit-grants-data-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-nonprofit-grants-data-api",
        "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/nabeelbaghoor~nonprofit-grants-data-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-nonprofit-grants-data-api",
        "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/nabeelbaghoor~nonprofit-grants-data-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-nonprofit-grants-data-api",
        "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": "What to read",
            "enum": [
              "nonprofitSearch",
              "nonprofitProfile",
              "charityCheck",
              "demographics",
              "grantFunders",
              "grantRecipients",
              "grantTransactions",
              "rfpSearch",
              "rfpFunder"
            ],
            "type": "string",
            "description": "Each mode calls one Candid API product and needs that product's subscription key. Nonprofit search uses Essentials; profile by EIN uses Premier; Charity Check and Demographics use their own APIs; the three grants modes use the Grants API; the two RFP modes use the RFP API.",
            "default": "nonprofitSearch"
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "string",
            "description": "Search modes. A name, EIN or keywords, such as food bank or 13-1837418. Sent as search_terms to Essentials, query to the Grants API and search_term to the RFP API."
          },
          "eins": {
            "title": "EINs",
            "type": "array",
            "description": "Profile, Charity Check, Demographics and RFP by funder modes. One nine digit EIN per line, with or without the dash. Demographics and RFP by funder also take numeric Candid entity IDs such as 6908122.",
            "items": {
              "type": "string"
            }
          },
          "subjectCodes": {
            "title": "Subject codes (PCS)",
            "type": "array",
            "description": "Optional. Candid Philanthropy Classification System subject codes, such as SE (health) or SB (education). Nonprofit search, grants and RFP modes.",
            "items": {
              "type": "string"
            }
          },
          "populationCodes": {
            "title": "Population served codes (PCS)",
            "type": "array",
            "description": "Optional. PCS population codes, such as PA01 (children and youth) or PG0302 (low-income people). Nonprofit search, grants and RFP modes.",
            "items": {
              "type": "string"
            }
          },
          "geonameIds": {
            "title": "GeoNames location IDs",
            "type": "array",
            "description": "Optional. Numeric GeoNames IDs, such as 6252001 (United States) or 5332921 (California). Grants modes take one; RFP modes take several (geographic area).",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Optional. Two letter US state codes, one per line.",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Optional. US city names, one per line.",
            "items": {
              "type": "string"
            }
          },
          "zipCode": {
            "title": "ZIP code",
            "type": "string",
            "description": "Optional. A five digit ZIP code, alone or as the center of the radius below."
          },
          "radiusMiles": {
            "title": "Radius (miles)",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Optional. Miles around the ZIP code, 1 to 50."
          },
          "nteeMajorCodes": {
            "title": "NTEE major codes",
            "type": "array",
            "description": "Optional. National Taxonomy of Exempt Entities major group letters, such as K (food, agriculture and nutrition) or T (philanthropy).",
            "items": {
              "type": "string"
            }
          },
          "profileLevels": {
            "title": "Candid Seal of Transparency levels",
            "type": "array",
            "description": "Optional. Only organizations holding one of these seal levels.",
            "items": {
              "type": "string",
              "enum": [
                "bronze",
                "silver",
                "gold",
                "platinum"
              ],
              "enumTitles": [
                "Bronze",
                "Silver",
                "Gold",
                "Platinum"
              ]
            }
          },
          "pub78VerifiedOnly": {
            "title": "IRS Pub 78 verified only",
            "type": "boolean",
            "description": "Optional. Only organizations listed in IRS Publication 78 (eligible to receive tax deductible contributions)."
          },
          "excludeRevoked": {
            "title": "Exclude revoked organizations",
            "type": "boolean",
            "description": "Optional. Leave out organizations whose tax exempt status the IRS revoked."
          },
          "minRevenue": {
            "title": "Minimum total revenue (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Most recent year total revenue, at least this many US dollars."
          },
          "maxRevenue": {
            "title": "Maximum total revenue (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Most recent year total revenue, at most this many US dollars."
          },
          "searchSortBy": {
            "title": "Sort nonprofits by",
            "enum": [
              "",
              "organization_name",
              "bmf_gross_receipts",
              "bmf_assets",
              "distance",
              "year_founded"
            ],
            "type": "string",
            "description": "Leave on relevance, or sort by name, gross receipts, assets, distance from the ZIP code or year founded.",
            "default": ""
          },
          "years": {
            "title": "Grant years",
            "type": "array",
            "description": "Optional. Years the grants were awarded, in YYYY format.",
            "items": {
              "type": "string"
            }
          },
          "locationType": {
            "title": "Apply the location to",
            "enum": [
              "",
              "funder",
              "recipient",
              "area_served"
            ],
            "type": "string",
            "description": "With a GeoNames ID: whether it is the funder's location, the recipient's location or the area served.",
            "default": ""
          },
          "supportCodes": {
            "title": "Support strategy codes",
            "type": "array",
            "description": "Optional. PCS support strategy codes, such as UA (general support).",
            "items": {
              "type": "string"
            }
          },
          "transactionCodes": {
            "title": "Transaction type codes",
            "type": "array",
            "description": "Optional. PCS transaction codes, such as TA (cash grants).",
            "items": {
              "type": "string"
            }
          },
          "funderIds": {
            "title": "Funder keys or EINs",
            "type": "array",
            "description": "Optional. Candid funder keys, such as GATE023 (Bill and Melinda Gates Foundation), or EINs with the option below.",
            "items": {
              "type": "string"
            }
          },
          "recipientIds": {
            "title": "Recipient keys or EINs",
            "type": "array",
            "description": "Optional. Candid recipient keys, such as 279943, or EINs with the option below.",
            "items": {
              "type": "string"
            }
          },
          "idsAreEins": {
            "title": "Funder and recipient IDs are EINs",
            "type": "boolean",
            "description": "Turn on when the funder and recipient lists hold EINs rather than Candid keys (sent as id_type=ein)."
          },
          "includeGovernment": {
            "title": "Include US government grantmakers",
            "enum": [
              "",
              "yes",
              "no"
            ],
            "type": "string",
            "description": "Whether US government grantmakers are listed.",
            "default": ""
          },
          "minAmount": {
            "title": "Minimum grant amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Only grants of at least this many US dollars."
          },
          "maxAmount": {
            "title": "Maximum grant amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Only grants of at most this many US dollars."
          },
          "grantSortBy": {
            "title": "Sort grants by",
            "enum": [
              "",
              "amount",
              "count",
              "funder_name",
              "recip_name",
              "year_issued"
            ],
            "type": "string",
            "description": "Funders sort by funder name, amount or count; recipients by recipient name, amount or count; transactions by either name, year, amount or count.",
            "default": ""
          },
          "updatedSince": {
            "title": "Added or updated since",
            "type": "string",
            "description": "Optional, yyyy-mm-dd. Grants modes: records added or updated on or after this date. RFP modes: opportunities added since this date."
          },
          "rfpSortByDeadline": {
            "title": "Sort RFPs by deadline",
            "type": "boolean",
            "description": "RFP modes. Sort opportunities by deadline (combine with ascending order for the soonest first)."
          },
          "sortOrder": {
            "title": "Sort order",
            "enum": [
              "",
              "asc",
              "desc"
            ],
            "type": "string",
            "description": "Ascending or descending, for the sort chosen above.",
            "default": ""
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "The most rows this run returns and charges for. Searches page 25 at a time; a grants search stops at 2,500 rows.",
            "default": 100
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 480,
            "type": "integer",
            "description": "Pacing for calls to Candid. Trial keys allow 10 a minute, sandbox keys 60 and production keys 480. Throttled calls are retried after a pause.",
            "default": 60
          },
          "apiKey": {
            "title": "Candid subscription key",
            "type": "string",
            "description": "The subscription key of the Candid API product your mode uses (Essentials, Premier, Charity Check, Demographics, Grants or RFP), from your Candid developer account. Stored as a secret, sent only in the Subscription-Key header to api.candid.org and never logged. You can instead set the DATA_API_KEY environment secret."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}