# Realtor Agents Search Scraper (`powerai/realtor-agents-search-scraper`) Actor

Search and scrape real estate agents from Realtor Canada with advanced filtering and sorting options using our API wrapper service

- **URL**: https://apify.com/powerai/realtor-agents-search-scraper.md
- **Developed by:** [PowerAI](https://apify.com/powerai) (community)
- **Categories:** Real estate, Lead generation, E-commerce
- **Stats:** 33 total users, 1 monthly users, 100.0% runs succeeded, 1 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

## Realtor Agents Search Scraper

This actor searches for real estate agents on Realtor Canada using our API wrapper service to find property professionals based on various criteria.

### Features

- **Comprehensive Agent Search**: Search agents by name, company, city, or province
- **Advanced Filtering**: Filter by specialties, designations, languages, and more
- **Multiple Sorting Options**: Sort results by name, city, province, or custom criteria
- **Real-time Results**: Get instant agent listings from Realtor Canada
- **API Integration**: Uses our secure API wrapper service
- **Error Handling**: Comprehensive error handling and logging
- **Automatic Pagination**: Automatically fetches multiple pages with maximum efficiency (50 records per page)

### Input

The actor accepts the following input parameters:

#### Required Parameters

At least one search parameter must be provided:

- **FirstName**: First name to search for
- **LastName**: Last name to search for
- **CompanyName**: Company name to search for
- **City**: City to search for agents

#### Optional Parameters

- **SortOrder**: Sort order (A-ascending, D-descending)
- **SortBy**: Sort field (11-no preference, 3-last name, 2-first name, 8-city, 9-province)
- **CultureId**: Culture ID (1-English, 2-French, default: 1)
- **ProvinceIds**: Province ID to filter by
- **Languages**: Language ID to filter by
- **Specialties**: Specialty ID to filter by
- **Designations**: Designation ID to filter by
- **isCccMember**: Filter by Canadian Commercial Network membership
- **maxResults**: Maximum number of agents to fetch (default: 50, max: 1000)

### Output

The actor outputs each agent as an individual data item. Each agent contains:

```json
{
    "IndividualID": 12345,
    "Name": "John Smith",
    "FirstName": "John",
    "LastName": "Smith",
    "Position": "Real Estate Agent",
    "Photo": "https://example.com/photo.jpg",
    "PhotoHighRes": "https://example.com/photo-high.jpg",
    "CccMember": false,
    "HasListings": true,
    "PermitShowListingLink": true,
    "PermitFreetextEmail": true,
    "RelativeDetailsURL": "/agent/john-smith",
    "AgentPhotoLastUpdated": "2024-01-01T00:00:00Z",
    "RankMyAgentKey": "abc123",
    "RealSatisfiedKey": "def456",
    "TestimonialTreeKey": "ghi789",
    "CorporationDisplayTypeId": "1",
    "Organization": {
        "OrganizationID": 67890,
        "Name": "ABC Real Estate",
        "OrganizationType": "Real Estate Brokerage",
        "Designation": "Licensed",
        "HasListings": true,
        "PermitFreetextEmail": true,
        "PermitShowListingLink": true,
        "RelativeDetailsURL": "/brokerage/abc-real-estate",
        "PhotoLastupdate": "2024-01-01T00:00:00Z",
        "Address": {
            "AddressText": "123 Main St, Toronto, ON",
            "PermitShowAddress": true
        },
        "Phones": [
            {
                "PhoneType": "Office",
                "PhoneNumber": "416-555-0123",
                "AreaCode": "416",
                "PhoneTypeId": "1"
            }
        ]
    },
    "Phones": [
        {
            "PhoneType": "Mobile",
            "PhoneNumber": "416-555-0123",
            "AreaCode": "416",
            "PhoneTypeId": "2"
        }
    ],
    "Websites": [
        {
            "Website": "https://johnsmith.com/",
            "WebsiteTypeId": "1"
        }
    ],
    "Emails": [
        {
            "ContactId": "contact123"
        }
    ],
    "scrapedAt": "2025-01-14T10:30:00.000Z"
}
```

### Usage

1. **Input Configuration**: Provide search criteria and filtering options
2. **Set Max Results**: Specify how many agents you want to fetch (up to 1000)
3. **Run the Actor**: Execute the actor with your input
4. **Get Results**: Receive individual agent listings in the dataset

### Examples

#### Search by Name

```json
{
  "FirstName": "John",
  "LastName": "Smith",
  "SortOrder": "A",
  "SortBy": 3,
  "maxResults": 50
}
```

#### Search by Company

```json
{
  "CompanyName": "ABC Real Estate",
  "maxResults": 100
}
```

#### Search by City

```json
{
  "City": "Toronto",
  "ProvinceIds": 35,
  "SortBy": 8,
  "maxResults": 75
}
```

#### Search with Specialties

```json
{
  "City": "Vancouver",
  "Specialties": 1,
  "Designations": 2,
  "isCccMember": true,
  "maxResults": 25
}
```

### Agent Data Structure

Each agent listing includes:

#### Basic Information

- **IndividualID**: Unique agent identifier
- **Name**: Full name of the agent
- **FirstName**: First name of the agent
- **LastName**: Last name of the agent
- **Position**: Agent's position/title
- **Photo**: Agent's photo URL
- **PhotoHighRes**: High-resolution photo URL

#### Contact Information

- **Phones**: Array of phone numbers with types
- **Websites**: Array of website URLs
- **Emails**: Array of email contact information

#### Organization Information

- **Organization**: Detailed organization/brokerage information
  - **OrganizationID**: Unique organization identifier
  - **Name**: Organization name
  - **Address**: Organization address
  - **Phones**: Organization phone numbers
  - **OrganizationType**: Type of organization
  - **Designation**: Organization designation

#### Status and Permissions

- **CccMember**: Canadian Commercial Network membership status
- **HasListings**: Whether agent has active listings
- **PermitShowListingLink**: Permission to show listing links
- **PermitFreetextEmail**: Permission for freetext email

#### URLs and Keys

- **RelativeDetailsURL**: Relative URL to agent details page
- **RankMyAgentKey**: Key for RankMyAgent integration
- **RealSatisfiedKey**: Key for RealSatisfied integration
- **TestimonialTreeKey**: Key for testimonial system

### Search Parameters

#### Sort Options

- **SortBy**: 11 (No preference), 3 (Last name), 2 (First name), 8 (City), 9 (Province)
- **SortOrder**: A (Ascending), D (Descending)

#### Culture Options

- **CultureId**: 1 (English), 2 (French)

#### Filter Options

- **ProvinceIds**: Province ID for location filtering
- **Languages**: Language ID for language filtering
- **Specialties**: Specialty ID for expertise filtering
- **Designations**: Designation ID for certification filtering
- **isCccMember**: Boolean for Canadian Commercial Network membership

### Support

For technical support or questions about this actor, please contact our support team.

# Actor input Schema

## `FirstName` (type: `string`):

First name to search for agents

## `LastName` (type: `string`):

Last name to search for agents

## `CompanyName` (type: `string`):

Company name to search for agents

## `City` (type: `string`):

City to search for agents (e.g., 'Toronto', 'Vancouver')

## `SortOrder` (type: `string`):

Sort order for results

## `SortBy` (type: `string`):

Sort field for results

## `CultureId` (type: `string`):

Culture ID for language preference

## `ProvinceIds` (type: `integer`):

Province ID to filter by location

## `Languages` (type: `integer`):

Language ID to filter by language

## `Specialties` (type: `integer`):

Specialty ID to filter by expertise

## `Designations` (type: `integer`):

Designation ID to filter by certification

## `isCccMember` (type: `boolean`):

Filter by Canadian Commercial Network membership

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

Maximum number of agents to fetch (default: 50, max: 1000)

## Actor input object example

```json
{
  "City": "Toronto",
  "SortOrder": "A",
  "SortBy": "11",
  "CultureId": "1",
  "ProvinceIds": 35,
  "maxResults": 50
}
```

# 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 = {
    "City": "Toronto",
    "ProvinceIds": 35
};

// Run the Actor and wait for it to finish
const run = await client.actor("powerai/realtor-agents-search-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 = {
    "City": "Toronto",
    "ProvinceIds": 35,
}

# Run the Actor and wait for it to finish
run = client.actor("powerai/realtor-agents-search-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 '{
  "City": "Toronto",
  "ProvinceIds": 35
}' |
apify call powerai/realtor-agents-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,powerai/realtor-agents-search-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/7sUN8mxoTEMksnkBZ/builds/5QIpMCVYgNX7F9WTt/openapi.json
