# NGOBase Scraper (`shahidirfan/ngobase-scraper`) Actor

Extract NGO, nonprofit, charity, and humanitarian organization data from NGOBase. Collect organization profiles, locations, categories, contact details, websites, and other key NGO information for research, lead generation, market analysis, and datasets.

- **URL**: https://apify.com/shahidirfan/ngobase-scraper.md
- **Developed by:** [Shahid Irfan](https://apify.com/shahidirfan) (community)
- **Stats:** 2 total users, 1 monthly users, 85.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.49 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

### What does NGOBase Scraper do?

NGOBase Scraper collects structured public information about NGOs, charities, and nonprofit organizations listed on [NGOBase](https://ngobase.org). Use a keyword such as `UNICEF`, or location and work-area filters, to build a clean dataset for research, nonprofit discovery, partnership mapping, grant prospecting, and directory analysis.

Each dataset item contains the organization name, NGOBase profile URL, location, published work areas, public website, social links when available, logo, short introduction, and collection metadata. Missing source fields are left out instead of being filled with `null` values.

### Why use NGOBase Scraper?

- **Search NGO and charity listings** by keyword, country, state or province, city, and work area.

- **Collect structured organization data** that is ready for CSV, JSON, Excel, XML, or downstream analysis.

- **Avoid duplicate records** when the same profile appears across multiple pages or targets.

- **Limit collection size** with result and page limits for quick tests or scheduled runs.

- **Connect results to workflows** through Apify datasets, API access, schedules, webhooks, and integrations.

### What data can you extract from NGOBase?

| Field         | Description                                   |
| ------------- | --------------------------------------------- |
| `id`          | NGOBase profile identifier when available     |
| `name`        | NGO, charity, or nonprofit name               |
| `url`         | NGOBase profile URL                           |
| `logo`        | Public organization logo when available       |
| `website`     | Organization website when published           |
| `facebook`    | Facebook page when published                  |
| `linkedin`    | LinkedIn page when published                  |
| `city`        | Organization city                             |
| `country`     | Organization country                          |
| `work_areas`  | Work areas and sub-areas published by NGOBase |
| `description` | Short public organization introduction        |
| `source_url`  | Listing page used for the record              |
| `source`      | Source website name                           |
| `scraped_at`  | UTC collection timestamp                      |

### How to use NGOBase Scraper

1. Open the Actor on Apify.
2. Provide a keyword or filter values.
3. Set the result limit and maximum page count.
4. Choose the result order when supported by the selected listing.
5. Run the Actor.
6. Download the dataset or connect it to your workflow.

Keyword input takes priority over location and work-area filters. When no search value is provided, the Actor starts from the public all-NGOs listing.

### Input Parameters

| Parameter | Type | Required | Default | Description |
| --------- | ---- | -------- | ------- | ----------- |

| `keyword` | String | No | - | Keyword search when no location filter is supplied |
| `country` | String | No | - | Country name or NGOBase country code |
| `state` | String | No | - | State or province, used with `country` |
| `city` | String | No | - | City, used with `country` |
| `workArea` | String | No | - | Work-area name or code such as `Health` or `HLT` |
| `subWorkArea` | String | No | - | Optional sub-work-area name or code |
| `sorting` | String | No | `default` | `default`, `name_a_to_z`, or `year_new_to_old` |
| `resultsWanted` | Integer | No | `20` | Maximum unique records to save |
| `maxPages` | Integer | No | `10` | Maximum pages per target |
| `proxyConfiguration` | Object | No | Apify Proxy | Optional proxy settings |

For a city filter, provide a country as well. The Actor resolves names against NGOBase’s public filter values, so users do not need to know internal location codes.

### Usage Examples

#### Keyword search

Collect NGOBase results related to UNICEF:

```json
{
    "keyword": "UNICEF",
    "resultsWanted": 20,
    "maxPages": 3
}
```

#### Country and work-area filter

Collect health organizations in Pakistan:

```json
{
    "country": "Pakistan",
    "workArea": "Health",
    "sorting": "name_a_to_z",
    "resultsWanted": 100,
    "maxPages": 10
}
```

#### City filter

Collect organizations listed in Toronto:

```json
{
    "country": "Canada",
    "city": "Toronto",
    "resultsWanted": 50,
    "maxPages": 5
}
```

### Sample Output

```json
{
    "id": "207",
    "name": "Shaukat Khanum Memorial Cancer Hospital & Research Centre",
    "url": "https://ngobase.org/profile/207",
    "logo": "https://ngobase.org/images/ngo_logos/PK/Shaukat-Khanum-Memorial-Cancer-Hospital-%26-Research-Centre-ngo.jpg",
    "website": "https://shaukatkhanum.org.pk/",
    "facebook": "https://www.facebook.com/skmch",
    "city": "Lahore",
    "country": "Pakistan",
    "work_areas": [
        {
            "area": "Specific Diseases",
            "sub_area": "Cancer Care"
        }
    ],
    "description": "Shaukat Khanum cancer hospital is a charity dedicated to providing free cancer treatment in Pakistan.",
    "source_url": "https://ngobase.org/ngos/list_all_ngos",
    "source": "ngobase.org",
    "scraped_at": "2026-09-07T00:00:00.000Z"
}
```

### Tips for Best Results

- Start with `resultsWanted: 20` to verify a search before collecting a larger dataset.

- Use `country` together with `city` for the most precise city filter.

- Use `maxPages` as a safety limit for broad country and global searches.

- Enable Apify Proxy for larger or scheduled runs, or when NGOBase returns an access challenge.

- Review the dataset preview before connecting it to a production workflow.

- Public listings can change. Report changed fields or missing pages through the Actor Issues tab.

### Integrations

- **Apify API** - Read dataset items programmatically after a run.
- **Google Sheets** - Export organization records for review and collaboration.
- **Webhooks** - Trigger downstream processing when a run finishes.
- **Make or Zapier** - Send new NGO records into CRM, research, or notification workflows.
- **CSV, Excel, JSON, and XML** - Export the dataset in common analysis formats.

### Frequently Asked Questions

#### Can I collect a specific NGOBase country or city?

Yes. Use `country` and `city` together. The Actor resolves public filter names and follows the resulting listing pages.

#### Can I search by an organization name?

Yes. Set `keyword` to an organization name, mission term, or other search phrase. Keyword search takes priority over location and work-area filters.

#### Can I collect all NGOBase results?

You can set a high `resultsWanted` value and increase `maxPages`, subject to the source listing and run limits. Start with a smaller run to confirm the filter first.

#### Why are some fields missing?

The Actor omits fields that NGOBase does not publish for a particular organization. This keeps the dataset free from misleading always-null columns and empty placeholder values.

#### Can I export the results?

Yes. Apify datasets support JSON, CSV, Excel, XML, and other export formats.

#### Can I schedule the Actor?

Yes. Create an Apify schedule to run a saved input hourly, daily, weekly, or at another interval.

#### Is it legal to collect NGOBase data?

Public data collection may be subject to applicable laws, privacy rules, and NGOBase terms. You are responsible for using the data lawfully, respecting access controls, and following the source website's published rules.

### Support

For issues, feature requests, or custom Actor work, use the Issues tab on the Actor page or contact the developer through Apify.

### Legal Notice

This Actor is intended for legitimate collection of publicly available NGO and nonprofit directory data. Users are responsible for complying with NGOBase terms, applicable laws, privacy requirements, and any restrictions attached to the collected data.

# Actor input Schema

## `keyword` (type: `string`):

Search NGO names and public listing text. Takes priority over location and work-area filters.

## `country` (type: `string`):

Country name or NGOBase country code, for example United States or US. Used when no keyword is supplied.

## `state` (type: `string`):

Optional state or province name/code. A country is required when using this field.

## `city` (type: `string`):

Optional city name or NGOBase city value. A country is required when using this field.

## `workArea` (type: `string`):

Work area name or NGOBase code, for example Health or HLT.

## `subWorkArea` (type: `string`):

Optional sub work area name or NGOBase code. A work area is recommended.

## `sorting` (type: `string`):

Result order.

## `resultsWanted` (type: `integer`):

Maximum number of unique NGO records to save.

## `maxPages` (type: `integer`):

Maximum listing pages to request for the selected search target.

## `proxyConfiguration` (type: `object`):

Optional Apify Proxy configuration for reliable runs.

## Actor input object example

```json
{
  "sorting": "default",
  "resultsWanted": 20,
  "maxPages": 3,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "sorting": "default",
    "resultsWanted": 20,
    "maxPages": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("shahidirfan/ngobase-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "sorting": "default",
    "resultsWanted": 20,
    "maxPages": 3,
}

# Run the Actor and wait for it to finish
run = client.actor("shahidirfan/ngobase-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "sorting": "default",
  "resultsWanted": 20,
  "maxPages": 3
}' |
apify call shahidirfan/ngobase-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,shahidirfan/ngobase-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/b3YcYeG5Di0irvTbV/builds/ltamfvPMdL8dUABuF/openapi.json
