# University Faculty & Research Lab Scraper (`moving_beacon-owner1/university-faculty-research-lab-scraper`) Actor

Scrapes university faculty and research directories, automatically detecting person listings and extracting names, titles, emails, departments, research interests, and profile URLs.

- **URL**: https://apify.com/moving\_beacon-owner1/university-faculty-research-lab-scraper.md
- **Developed by:** [Jamshaid Arif](https://apify.com/moving_beacon-owner1) (community)
- **Categories:** Automation, Developer tools, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.99 / 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

## University Faculty & Research Lab Scraper

Crawls university faculty and research-lab directory pages and returns one record per
person: name, academic title, email, department and research interests. It works on any
institution's directory because it **auto-detects the person-card layout** — no
per-university configuration needed — and accepts your own CSS/XPath selectors when a
site needs them.

### How auto-detection works

The scraper groups every repeated container on the page by tag + class, scores each group
by how many of its members contain a person-name link, a `mailto:` and an academic title
keyword, and picks the winner. On near-ties it prefers the *larger* group, since the
tighter one usually drops the people who have no photo or no listed email.

### Input

| Field | Default | Description |
|---|---|---|
| `start_urls` | `["https://www.eecs.mit.edu/role/faculty/"]` | Directory pages to crawl. |
| `selectors` | `{}` | Optional overrides: `item`, `name`, `title`, `email`, `profile_link`, `research_interests` (CSS or XPath). |
| `follow_profiles` | `false` | Fetch each profile page to fill in missing email / title / research interests. |
| `max_pages` | `3` | Paginated listing pages to follow per start URL. |
| `limit` | `100` | Max people to return. |

Runs with empty input (MIT EECS faculty, 100 people).

### Output

```json
{
  "name": "Rachit Agarwal",
  "title": "Associate Professor of Computer Science",
  "email": "RA625@cornell.edu",
  "department": "Faculty",
  "research_interests": "Architecture; Systems + Networking; Theory of Computing",
  "profile_url": "https://www.cs.cornell.edu/~rachit/",
  "source_url": "https://www.cs.cornell.edu/people/faculty"
}
```

### Verified against

| Directory | Cards detected | Field fill (first 6) |
|---|---|---|
| MIT EECS (`eecs.mit.edu/role/faculty/`) | 183 | name 6/6, title 6/6, email 6/6, profile 6/6 |
| Cornell CS (`cs.cornell.edu/people/faculty`) | 20 | name 6/6, title 6/6, email 5/6, research 4/6 |

Two structurally different sites — MIT uses `people-entry` grid cells with heading links,
Cornell renders names as bare `<span>`s inside `views-row` — both handled by the same
heuristics with no selectors supplied.

# Actor input Schema

## `start_urls` (type: `array`):

One or more faculty / research-lab directory pages to crawl. Each is crawled independently, following 'next page' links up to Max pages.

## `selectors` (type: `object`):

Optional CSS or XPath selectors to override auto-detection. Keys: item, name, title, email, profile\_link, research\_interests. Leave empty to auto-detect the person card layout.

## `follow_profiles` (type: `boolean`):

Fetch each person's profile page (depth 1) to fill in a missing email, title or research interests. Slower — one extra request per person.

## `max_pages` (type: `integer`):

How many paginated listing pages to follow per start URL (via rel=next / 'Next' links).

## `limit` (type: `integer`):

Maximum number of people to return across all start URLs.

## Actor input object example

```json
{
  "start_urls": [
    "https://www.eecs.mit.edu/role/faculty/"
  ],
  "selectors": {},
  "follow_profiles": false,
  "max_pages": 3,
  "limit": 100
}
```

# Actor output Schema

## `results` (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 = {
    "start_urls": [
        "https://www.eecs.mit.edu/role/faculty/"
    ],
    "selectors": {},
    "follow_profiles": false,
    "max_pages": 3,
    "limit": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("moving_beacon-owner1/university-faculty-research-lab-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 = {
    "start_urls": ["https://www.eecs.mit.edu/role/faculty/"],
    "selectors": {},
    "follow_profiles": False,
    "max_pages": 3,
    "limit": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("moving_beacon-owner1/university-faculty-research-lab-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 '{
  "start_urls": [
    "https://www.eecs.mit.edu/role/faculty/"
  ],
  "selectors": {},
  "follow_profiles": false,
  "max_pages": 3,
  "limit": 100
}' |
apify call moving_beacon-owner1/university-faculty-research-lab-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,moving_beacon-owner1/university-faculty-research-lab-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/LoND1aEkga4JEI6Qo/builds/SH1gUJ9QprTyxb0ud/openapi.json
