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

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

- **URL**: https://beta-securitybyobscurity.apify.com/powerai/realtor-agents-search-scraper.md
- **Developed by:** [PowerAI](https://beta-securitybyobscurity.apify.com/powerai) (community)
- **Categories:** Real estate, Lead generation, E-commerce
- **Stats:** 5 total users, 5 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

$9.99 / 1,000 results

This Actor is paid per result. You are not charged for the Apify platform usage, but only a fixed price for dataset items the Actor outputs.

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

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

// 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 = {}

# 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("💾 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 powerai/realtor-agents-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=powerai/realtor-agents-search-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Realtor Agents Search Scraper",
        "description": "Search and scrape real estate agents from Realtor Canada with advanced filtering and sorting options using our API wrapper service",
        "version": "0.0",
        "x-build-id": "7KhStzj3xL9LBZ043"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/powerai~realtor-agents-search-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-powerai-realtor-agents-search-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/powerai~realtor-agents-search-scraper/runs": {
            "post": {
                "operationId": "runs-sync-powerai-realtor-agents-search-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/powerai~realtor-agents-search-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-powerai-realtor-agents-search-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": {
                    "FirstName": {
                        "title": "First Name",
                        "type": "string",
                        "description": "First name to search for agents"
                    },
                    "LastName": {
                        "title": "Last Name",
                        "type": "string",
                        "description": "Last name to search for agents"
                    },
                    "CompanyName": {
                        "title": "Company Name",
                        "type": "string",
                        "description": "Company name to search for agents"
                    },
                    "City": {
                        "title": "City",
                        "type": "string",
                        "description": "City to search for agents (e.g., 'Toronto', 'Vancouver')",
                        "default": "Toronto"
                    },
                    "SortOrder": {
                        "title": "Sort Order",
                        "enum": [
                            "A",
                            "D"
                        ],
                        "type": "string",
                        "description": "Sort order for results",
                        "default": "A"
                    },
                    "SortBy": {
                        "title": "Sort By",
                        "enum": [
                            "11",
                            "3",
                            "2",
                            "8",
                            "9"
                        ],
                        "type": "string",
                        "description": "Sort field for results",
                        "default": "11"
                    },
                    "CultureId": {
                        "title": "Culture ID",
                        "enum": [
                            "1",
                            "2"
                        ],
                        "type": "string",
                        "description": "Culture ID for language preference",
                        "default": "1"
                    },
                    "ProvinceIds": {
                        "title": "Province IDs",
                        "type": "integer",
                        "description": "Province ID to filter by location",
                        "default": 35
                    },
                    "Languages": {
                        "title": "Languages",
                        "type": "integer",
                        "description": "Language ID to filter by language"
                    },
                    "Specialties": {
                        "title": "Specialties",
                        "type": "integer",
                        "description": "Specialty ID to filter by expertise"
                    },
                    "Designations": {
                        "title": "Designations",
                        "type": "integer",
                        "description": "Designation ID to filter by certification"
                    },
                    "isCccMember": {
                        "title": "CCC Member",
                        "type": "boolean",
                        "description": "Filter by Canadian Commercial Network membership"
                    },
                    "maxResults": {
                        "title": "Max Results",
                        "minimum": 25,
                        "maximum": 50000,
                        "type": "integer",
                        "description": "Maximum number of agents to fetch (default: 50, max: 1000)",
                        "default": 50
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
