# World Universities Scraper (`moving_beacon-owner1/world-universities-scraper`) Actor

This service aggregates university information from over 120 countries using the Hipolabs Universities API, allowing users to search for more than 10,000 educational institutions by country, university name, or domain.

- **URL**: https://apify.com/moving\_beacon-owner1/world-universities-scraper.md
- **Developed by:** [Jamshaid Arif](https://apify.com/moving_beacon-owner1) (community)
- **Categories:** Developer tools, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## 🎓 World Universities Scraper — Apify Actor

Scrapes **university data from 120+ countries** via the [Hipolabs Universities API](https://github.com/Hipo/university-domains-list). Search by country, name, or domain across 10,000+ institutions worldwide. No API key required.

### Features

- **120+ countries** selectable from the UI — batch query multiple countries in one run.
- **Name search** — find universities by keyword (e.g. "Technology", "Medical", "Engineering").
- **Domain search** — find by web domain (e.g. "edu.pk", "ac.uk", "mit").
- **Post-fetch filtering** — include/exclude by name keywords, filter by domain TLD.
- **Deduplication** — remove duplicate entries (same name + country).
- **4 output formats** — enriched, raw, minimal, domains-only.
- **Sorting** — by name, country, or domain.
- **Run summary** — country breakdown, TLD distribution, and stats saved to key-value store.

### Input Example

```json
{
    "countries": ["Pakistan", "India", "United Kingdom"],
    "nameSearch": "Engineering",
    "excludeNameKeywords": "virtual,distance,online",
    "domainTldFilter": "edu.pk,ac.in,ac.uk",
    "deduplicate": true,
    "sortBy": "country_asc",
    "outputFormat": "enriched",
    "addSequentialId": true,
    "maxResults": 0
}
````

#### Input Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `countries` | array | `["Pakistan"]` | Countries to search (leave empty + set name/domain for global search) |
| `nameSearch` | string | — | Search by university name keyword |
| `domainSearch` | string | — | Search by web domain |
| `nameContainsFilter` | string | — | Post-fetch: keep only names containing ALL these keywords (comma-separated) |
| `excludeNameKeywords` | string | — | Post-fetch: remove names containing ANY of these keywords |
| `domainTldFilter` | string | — | Only keep domains ending in these TLDs (comma-separated) |
| `deduplicate` | boolean | `true` | Remove duplicate name+country pairs |
| `sortBy` | string | `name_asc` | Sort order |
| `outputFormat` | string | `enriched` | Output shape |
| `maxResults` | integer | `0` | Limit output (0 = unlimited) |
| `addSequentialId` | boolean | `true` | Add sequential ID to each record |

### Output Formats

#### Enriched (default)

| Field | Example |
|---|---|
| `id` | `1` |
| `name` | `University of Engineering and Technology` |
| `country` | `Pakistan` |
| `alpha_two_code` | `PK` |
| `state_province` | `Punjab` |
| `primary_domain` | `uet.edu.pk` |
| `primary_website` | `http://www.uet.edu.pk/` |
| `all_domains` | `uet.edu.pk` |
| `all_websites` | `http://www.uet.edu.pk/` |
| `domain_count` | `1` |
| `website_count` | `1` |
| `tld` | `edu.pk` |
| `has_state_province` | `true` |

#### Minimal

`id`, `name`, `country`, `country_code`, `domain`, `website`

#### Domains Only

`id`, `name`, `country`, `domain_1`, `domain_2`…, `website_1`, `website_2`…, `domain_count` — useful for SEO, link building, or backlink analysis.

#### Raw

Original API structure with `name`, `country`, `alpha_two_code`, `state_province`, `domains[]`, `web_pages[]`.

### Use Cases

- **Education Research** — catalog universities by country, region, or specialization.
- **SEO & Link Building** — extract `.edu` domains for backlink prospecting.
- **Lead Generation** — find engineering/medical/business schools in specific countries.
- **Data Enrichment** — match university names in your CRM to official domains and websites.
- **Market Analysis** — count institutions per country, compare TLD distribution.
- **Application Portals** — populate university dropdowns with verified data.

### Example Queries

| Goal | Settings |
|---|---|
| All Pakistani universities | `countries: ["Pakistan"]` |
| Engineering schools worldwide | `nameSearch: "Engineering"` |
| UK universities on `.ac.uk` | `countries: ["United Kingdom"]`, `domainTldFilter: "ac.uk"` |
| South Asian medical colleges | `countries: ["Pakistan","India","Bangladesh","Sri Lanka"]`, `nameSearch: "Medical"` |
| Remove online/virtual schools | `excludeNameKeywords: "virtual,distance,online,open"` |

# Actor input Schema

## `countries` (type: `array`):

Select one or more countries to fetch universities from. Leave empty to search all countries (requires a name or domain filter).

## `nameSearch` (type: `string`):

Search universities by name keyword (e.g. 'Technology', 'Engineering', 'Medical'). Partial matches work. Leave empty to get all universities in selected countries.

## `domainSearch` (type: `string`):

Search by web domain (e.g. 'edu.pk', 'ac.uk', 'harvard'). Leave empty for no domain filter.

## `nameContainsFilter` (type: `string`):

After fetching, only keep universities whose name contains ALL of these keywords (case-insensitive, comma-separated). E.g. 'Engineering,Technology' keeps only names containing both words.

## `excludeNameKeywords` (type: `string`):

Remove universities whose name contains ANY of these keywords (case-insensitive, comma-separated). E.g. 'virtual,distance,online' removes online-only institutions.

## `domainTldFilter` (type: `string`):

Only keep universities with domains ending in specific TLDs (comma-separated). E.g. 'edu,edu.pk,ac.uk'. Leave empty for no filter.

## `deduplicate` (type: `boolean`):

Remove duplicate universities (same name + same country).

## `sortBy` (type: `string`):

How to sort the output.

## `outputFormat` (type: `string`):

How to structure each university record.

## `maxResults` (type: `integer`):

Limit number of records saved. 0 = no limit.

## `addSequentialId` (type: `boolean`):

Add auto-incrementing ID (1, 2, 3…) to each record.

## Actor input object example

```json
{
  "countries": [
    "Pakistan"
  ],
  "deduplicate": true,
  "sortBy": "name_asc",
  "outputFormat": "enriched",
  "maxResults": 0,
  "addSequentialId": true
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("moving_beacon-owner1/world-universities-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("moving_beacon-owner1/world-universities-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{}' |
apify call moving_beacon-owner1/world-universities-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=moving_beacon-owner1/world-universities-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "World Universities Scraper",
        "description": "This service aggregates university information from over 120 countries using the Hipolabs Universities API, allowing users to search for more than 10,000 educational institutions by country, university name, or domain.",
        "version": "0.0",
        "x-build-id": "HQQqVF1ZCK15XsfbH"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/moving_beacon-owner1~world-universities-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-moving_beacon-owner1-world-universities-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/moving_beacon-owner1~world-universities-scraper/runs": {
            "post": {
                "operationId": "runs-sync-moving_beacon-owner1-world-universities-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/moving_beacon-owner1~world-universities-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-moving_beacon-owner1-world-universities-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": {
                    "countries": {
                        "title": "Countries",
                        "type": "array",
                        "description": "Select one or more countries to fetch universities from. Leave empty to search all countries (requires a name or domain filter).",
                        "items": {
                            "type": "string",
                            "enum": [
                                "Afghanistan",
                                "Albania",
                                "Algeria",
                                "Argentina",
                                "Armenia",
                                "Australia",
                                "Austria",
                                "Azerbaijan",
                                "Bahrain",
                                "Bangladesh",
                                "Belarus",
                                "Belgium",
                                "Bolivia",
                                "Bosnia and Herzegovina",
                                "Brazil",
                                "Brunei",
                                "Bulgaria",
                                "Cambodia",
                                "Cameroon",
                                "Canada",
                                "Chile",
                                "China",
                                "Colombia",
                                "Costa Rica",
                                "Croatia",
                                "Cuba",
                                "Cyprus",
                                "Czech Republic",
                                "Denmark",
                                "Dominican Republic",
                                "Ecuador",
                                "Egypt",
                                "El Salvador",
                                "Estonia",
                                "Ethiopia",
                                "Finland",
                                "France",
                                "Georgia",
                                "Germany",
                                "Ghana",
                                "Greece",
                                "Guatemala",
                                "Honduras",
                                "Hong Kong",
                                "Hungary",
                                "Iceland",
                                "India",
                                "Indonesia",
                                "Iran",
                                "Iraq",
                                "Ireland",
                                "Israel",
                                "Italy",
                                "Jamaica",
                                "Japan",
                                "Jordan",
                                "Kazakhstan",
                                "Kenya",
                                "Kuwait",
                                "Kyrgyzstan",
                                "Latvia",
                                "Lebanon",
                                "Libya",
                                "Lithuania",
                                "Luxembourg",
                                "Macau",
                                "Malaysia",
                                "Maldives",
                                "Malta",
                                "Mexico",
                                "Moldova",
                                "Mongolia",
                                "Morocco",
                                "Mozambique",
                                "Myanmar",
                                "Nepal",
                                "Netherlands",
                                "New Zealand",
                                "Nicaragua",
                                "Nigeria",
                                "North Macedonia",
                                "Norway",
                                "Oman",
                                "Pakistan",
                                "Palestine",
                                "Panama",
                                "Paraguay",
                                "Peru",
                                "Philippines",
                                "Poland",
                                "Portugal",
                                "Puerto Rico",
                                "Qatar",
                                "Romania",
                                "Russian Federation",
                                "Rwanda",
                                "Saudi Arabia",
                                "Senegal",
                                "Serbia",
                                "Singapore",
                                "Slovakia",
                                "Slovenia",
                                "Somalia",
                                "South Africa",
                                "South Korea",
                                "Spain",
                                "Sri Lanka",
                                "Sudan",
                                "Sweden",
                                "Switzerland",
                                "Syrian Arab Republic",
                                "Taiwan",
                                "Tajikistan",
                                "Tanzania",
                                "Thailand",
                                "Trinidad and Tobago",
                                "Tunisia",
                                "Turkey",
                                "Turkmenistan",
                                "Uganda",
                                "Ukraine",
                                "United Arab Emirates",
                                "United Kingdom",
                                "United States",
                                "Uruguay",
                                "Uzbekistan",
                                "Venezuela",
                                "Vietnam",
                                "Yemen",
                                "Zambia",
                                "Zimbabwe"
                            ]
                        },
                        "default": [
                            "Pakistan"
                        ]
                    },
                    "nameSearch": {
                        "title": "Name Search",
                        "type": "string",
                        "description": "Search universities by name keyword (e.g. 'Technology', 'Engineering', 'Medical'). Partial matches work. Leave empty to get all universities in selected countries."
                    },
                    "domainSearch": {
                        "title": "Domain Search",
                        "type": "string",
                        "description": "Search by web domain (e.g. 'edu.pk', 'ac.uk', 'harvard'). Leave empty for no domain filter."
                    },
                    "nameContainsFilter": {
                        "title": "Post-fetch Name Filter",
                        "type": "string",
                        "description": "After fetching, only keep universities whose name contains ALL of these keywords (case-insensitive, comma-separated). E.g. 'Engineering,Technology' keeps only names containing both words."
                    },
                    "excludeNameKeywords": {
                        "title": "Exclude Name Keywords",
                        "type": "string",
                        "description": "Remove universities whose name contains ANY of these keywords (case-insensitive, comma-separated). E.g. 'virtual,distance,online' removes online-only institutions."
                    },
                    "domainTldFilter": {
                        "title": "Domain TLD Filter",
                        "type": "string",
                        "description": "Only keep universities with domains ending in specific TLDs (comma-separated). E.g. 'edu,edu.pk,ac.uk'. Leave empty for no filter."
                    },
                    "deduplicate": {
                        "title": "Deduplicate Results",
                        "type": "boolean",
                        "description": "Remove duplicate universities (same name + same country).",
                        "default": true
                    },
                    "sortBy": {
                        "title": "Sort By",
                        "enum": [
                            "name_asc",
                            "name_desc",
                            "country_asc",
                            "country_desc",
                            "domain_asc"
                        ],
                        "type": "string",
                        "description": "How to sort the output.",
                        "default": "name_asc"
                    },
                    "outputFormat": {
                        "title": "Output Format",
                        "enum": [
                            "enriched",
                            "raw",
                            "minimal",
                            "domains_only"
                        ],
                        "type": "string",
                        "description": "How to structure each university record.",
                        "default": "enriched"
                    },
                    "maxResults": {
                        "title": "Maximum Results",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Limit number of records saved. 0 = no limit.",
                        "default": 0
                    },
                    "addSequentialId": {
                        "title": "Add Sequential ID",
                        "type": "boolean",
                        "description": "Add auto-incrementing ID (1, 2, 3…) to each record.",
                        "default": 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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
