{
  "openapi": "3.0.1",
  "info": {
    "title": "NY Attorney General Charities Bureau Registry Scraper",
    "description": "Search the NY Attorney General's Charities Bureau registry by organization name, registration number, EIN, city, or state. Returns registration status, EIN, address, and links to filings, dissolution/merger transactions, and Pennies for Charity fundraising reports.",
    "version": "1.0",
    "x-build-id": "7gOTlDkxRg8INh68X"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~ny-charities-bureau-registry-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-ny-charities-bureau-registry-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/crawlerbros~ny-charities-bureau-registry-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-ny-charities-bureau-registry-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/crawlerbros~ny-charities-bureau-registry-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-ny-charities-bureau-registry-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "registrySearch",
              "transactionSearch",
              "penniesForCharity"
            ],
            "type": "string",
            "description": "Which Charities Bureau dataset to search.",
            "default": "registrySearch"
          },
          "orgName": {
            "title": "Organization name (mode=registrySearch/transactionSearch)",
            "type": "string",
            "description": "Partial/substring match, case-insensitive. Leave empty to search by other filters only (e.g. state, city, regType) without narrowing by name. For mode=transactionSearch specifically, the upstream API applies stricter anti-scraping filtering to broad queries with no `orgName` at all (e.g. transactionType/date-range alone) and may return 0 results even when matches exist -- pairing with `orgName` is recommended for reliable results in that mode. If mode=registrySearch and every filter is left empty, the actor falls back to a demo name (\"red cross\") so the daily test run still returns data.",
            "default": ""
          },
          "orgId": {
            "title": "Registration number / Organization ID (mode=registrySearch)",
            "type": "string",
            "description": "NY Charities Bureau registration number, format `NN-NN-NN` (e.g. `11-30-97`)."
          },
          "ein": {
            "title": "EIN (mode=registrySearch)",
            "type": "string",
            "description": "Federal tax ID, digits only (e.g. `530196605`)."
          },
          "regType": {
            "title": "Registrant type (mode=registrySearch)",
            "enum": [
              "",
              "CLT",
              "CRT",
              "Estates",
              "NFP"
            ],
            "type": "string",
            "description": "Filter by registration category.",
            "default": ""
          },
          "city": {
            "title": "City (mode=registrySearch)",
            "type": "string",
            "description": "Filter by the organization's registered city."
          },
          "state": {
            "title": "State (mode=registrySearch)",
            "enum": [
              "",
              "AL",
              "AK",
              "AZ",
              "AR",
              "CA",
              "CO",
              "CT",
              "DE",
              "DC",
              "FL",
              "GA",
              "HI",
              "ID",
              "IL",
              "IN",
              "IA",
              "KS",
              "KY",
              "LA",
              "ME",
              "MD",
              "MA",
              "MI",
              "MN",
              "MS",
              "MO",
              "MT",
              "NE",
              "NV",
              "NH",
              "NJ",
              "NM",
              "NY",
              "NC",
              "ND",
              "OH",
              "OK",
              "OR",
              "PA",
              "PR",
              "RI",
              "SC",
              "SD",
              "TN",
              "TX",
              "UT",
              "VT",
              "VA",
              "WA",
              "WV",
              "WI",
              "WY"
            ],
            "type": "string",
            "description": "Filter by the organization's registered state.",
            "default": ""
          },
          "oagNumber": {
            "title": "OAG number (mode=transactionSearch)",
            "type": "string",
            "description": "Office of the Attorney General case/matter number (e.g. `OAG-AL-2020-305`)."
          },
          "transactionType": {
            "title": "Transaction type (mode=transactionSearch)",
            "enum": [
              "",
              "Dissolution",
              "NPCL 510/511"
            ],
            "type": "string",
            "description": "Filter by transaction category.",
            "default": ""
          },
          "approvalDateFrom": {
            "title": "Approval date from (mode=transactionSearch)",
            "type": "string",
            "description": "ISO date `YYYY-MM-DD`. Filters transactions approved on/after this date."
          },
          "approvalDateTo": {
            "title": "Approval date to (mode=transactionSearch)",
            "type": "string",
            "description": "ISO date `YYYY-MM-DD`. Filters transactions approved on/before this date."
          },
          "pfcOrgName": {
            "title": "Nonprofit organization name (mode=penniesForCharity)",
            "type": "string",
            "description": "Case-insensitive substring match (e.g. `American Cancer` matches `American Cancer Society Inc`)."
          },
          "pfcFundraiserName": {
            "title": "Professional fundraiser name (mode=penniesForCharity)",
            "type": "string",
            "description": "Case-insensitive substring match."
          },
          "pfcFilingYear": {
            "title": "Filing year (mode=penniesForCharity)",
            "type": "string",
            "description": "4-digit calendar year (e.g. `2024`). Leave empty to search by other filters only (e.g. organization or fundraiser name) without narrowing by year.",
            "default": ""
          },
          "pfcGeoArea": {
            "title": "Region (mode=penniesForCharity)",
            "enum": [
              "",
              "1",
              "2",
              "3",
              "4",
              "5",
              "6",
              "7"
            ],
            "type": "string",
            "description": "Filter by New York region.",
            "default": ""
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Hard cap on emitted records. registrySearch and penniesForCharity fetch one detail page per result, so keep this modest for broad searches.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}