> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.modex.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.modex.com/_mcp/server.

# List an office's agents

GET https://api.modex.com/v1/resources/real-estate-offices/{real_estate_office_id}/real-estate-agents

Active agents whose most recent office is this one, ordered by ID. Cursor-paginated, and limited to your permitted states.

**Includes:** same as **Show Real Estate Agent**.
**Query parameters:** `include`, `limit`, `cursor`.

Reference: https://docs.modex.com/api-reference/real-estate-data/real-estate-offices/list-real-estate-office-agents

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `real_estate_office_id` (string, required)

### Query parameters

- `include` (string, optional) — Comma-separated extras: mortgage, real_estate, census, contacts. contacts is returned only after an agent has been unlocked.
- `limit` (integer, optional) — Page size. Defaults to 25. Maximum is 100.
- `cursor` (string, optional) — Cursor from pagination.next_cursor on the previous page. Leave disabled for the first page.

## Response

### 200

OK

- `data` (list of V1ResourcesRealEstateOfficesRealEstateOfficeIdRealEstateAgentsGetResponsesContentApplicationJsonSchemaDataItems, optional) — The records on this page.
- `pagination` (V1ResourcesRealEstateOfficesRealEstateOfficeIdRealEstateAgentsGetResponsesContentApplicationJsonSchemaPagination, optional) — Cursor details for the next and previous pages. See Pagination in Getting started.

## Types

### V1ResourcesRealEstateOfficesRealEstateOfficeIdRealEstateAgentsGetResponsesContentApplicationJsonSchemaDataItems

- `id` (string, optional) — Agent ID
- `type` (string, optional) — Always `real_estate_agent`
- `name` (string, optional) — Full name
- `office` (V1ResourcesRealEstateOfficesRealEstateOfficeIdRealEstateAgentsGetResponsesContentApplicationJsonSchemaDataItemsOffice, optional) — Current office: `id`, `name`, `address`
- `transaction_states` (list of string, optional) — Two-letter codes of states where the agent has transactions
- `mls_organizations` (list of V1ResourcesRealEstateOfficesRealEstateOfficeIdRealEstateAgentsGetResponsesContentApplicationJsonSchemaDataItemsMlsOrganizationsItems, optional) — MLSs the agent belongs to: `id`, `name`
- `has_contact_data` (boolean, optional) — Whether contact data exists to unlock

### V1ResourcesRealEstateOfficesRealEstateOfficeIdRealEstateAgentsGetResponsesContentApplicationJsonSchemaPagination

Cursor details for the next and previous pages. See Pagination in Getting started.

- `per_page` (integer, optional) — Page size used for this response.
- `next_cursor` (string, optional) — Pass as `cursor` to get the next page. `null` on the last page.
- `next_page_url` (string, optional) — Full URL of the next page. `null` on the last page.
- `prev_cursor` (any, optional) — Pass as `cursor` to get the previous page. `null` on the first page.
- `prev_page_url` (any, optional) — Full URL of the previous page. `null` on the first page.

### V1ResourcesRealEstateOfficesRealEstateOfficeIdRealEstateAgentsGetResponsesContentApplicationJsonSchemaDataItemsOffice

Current office: `id`, `name`, `address`

- `id` (string, optional) — Modex ID (UUID)
- `name` (string, optional) — Name
- `address` (V1ResourcesRealEstateOfficesRealEstateOfficeIdRealEstateAgentsGetResponsesContentApplicationJsonSchemaDataItemsOfficeAddress, optional)

### V1ResourcesRealEstateOfficesRealEstateOfficeIdRealEstateAgentsGetResponsesContentApplicationJsonSchemaDataItemsMlsOrganizationsItems

- `id` (string, optional) — Modex ID (UUID)
- `name` (string, optional) — Name

### V1ResourcesRealEstateOfficesRealEstateOfficeIdRealEstateAgentsGetResponsesContentApplicationJsonSchemaDataItemsOfficeAddress

- `street` (string, optional)
- `city` (string, optional) — Breakdown by city
- `state` (string, optional)
- `zipcode` (string, optional)
- `formatted` (string, optional)

## Examples

**Response**

```json
{
  "data": [
    {
      "id": "e7f8a9b0-c1d2-4e3f-9a4b-5c6d7e8f9a01",
      "type": "real_estate_agent",
      "name": "Casey Morgan",
      "office": {
        "id": "f0a1b2c3-d4e5-4f60-8a7b-9c0d1e2f3a44",
        "name": "Cascade Realty Group",
        "address": {
          "street": "2300 NE Broadway",
          "city": "Portland",
          "state": "OR",
          "zipcode": "97232",
          "formatted": "2300 NE Broadway, Portland, OR 97232"
        }
      },
      "transaction_states": [
        "OR",
        "WA"
      ],
      "mls_organizations": [
        {
          "id": "a9b8c7d6-e5f4-4a3b-9c2d-1e0f9a8b7c6d",
          "name": "Example Regional MLS"
        }
      ],
      "has_contact_data": true
    },
    {
      "id": "f8a9b0c1-d2e3-4f40-8b5c-6d7e8f9a0b12",
      "type": "real_estate_agent",
      "name": "Morgan Alvarez",
      "office": {
        "id": "f0a1b2c3-d4e5-4f60-8a7b-9c0d1e2f3a44",
        "name": "Cascade Realty Group",
        "address": {
          "street": "2300 NE Broadway",
          "city": "Portland",
          "state": "OR",
          "zipcode": "97232",
          "formatted": "2300 NE Broadway, Portland, OR 97232"
        }
      },
      "transaction_states": [
        "OR",
        "WA"
      ],
      "mls_organizations": [
        {
          "id": "a9b8c7d6-e5f4-4a3b-9c2d-1e0f9a8b7c6d",
          "name": "Example Regional MLS"
        }
      ],
      "has_contact_data": true
    }
  ],
  "pagination": {
    "per_page": 2,
    "next_cursor": "eyJyZWFsX2VzdGF0ZV9hZ2VudHMuaWQiOiJmOGE5YjBjMS1kMmUzLTRmNDAtOGI1Yy02ZDdlOGY5YTBiMTIiLCJfcG9pbnRzVG9OZXh0SXRlbXMiOnRydWV9",
    "next_page_url": "https://api.modex.com/v1/resources/real-estate-offices/f0a1b2c3-d4e5-4f60-8a7b-9c0d1e2f3a44/real-estate-agents?cursor=eyJyZWFsX2VzdGF0ZV9hZ2VudHMuaWQiOiJmOGE5YjBjMS1kMmUzLTRmNDAtOGI1Yy02ZDdlOGY5YTBiMTIiLCJfcG9pbnRzVG9OZXh0SXRlbXMiOnRydWV9"
  }
}
```

**SDK Code**

```python Agents
import requests

url = "https://api.modex.com/v1/resources/real-estate-offices/real_estate_office_id/real-estate-agents"

querystring = {"cursor":"{{cursor}}","include":"mortgage,real_estate,census,contacts","limit":"25"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Agents
const url = 'https://api.modex.com/v1/resources/real-estate-offices/real_estate_office_id/real-estate-agents?cursor=%7B%7Bcursor%7D%7D&include=mortgage%2Creal_estate%2Ccensus%2Ccontacts&limit=25';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Agents
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.modex.com/v1/resources/real-estate-offices/real_estate_office_id/real-estate-agents?cursor=%7B%7Bcursor%7D%7D&include=mortgage%2Creal_estate%2Ccensus%2Ccontacts&limit=25"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Agents
require 'uri'
require 'net/http'

url = URI("https://api.modex.com/v1/resources/real-estate-offices/real_estate_office_id/real-estate-agents?cursor=%7B%7Bcursor%7D%7D&include=mortgage%2Creal_estate%2Ccensus%2Ccontacts&limit=25")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Agents
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.modex.com/v1/resources/real-estate-offices/real_estate_office_id/real-estate-agents?cursor=%7B%7Bcursor%7D%7D&include=mortgage%2Creal_estate%2Ccensus%2Ccontacts&limit=25")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Agents
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.modex.com/v1/resources/real-estate-offices/real_estate_office_id/real-estate-agents?cursor=%7B%7Bcursor%7D%7D&include=mortgage%2Creal_estate%2Ccensus%2Ccontacts&limit=25', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Agents
using RestSharp;

var client = new RestClient("https://api.modex.com/v1/resources/real-estate-offices/real_estate_office_id/real-estate-agents?cursor=%7B%7Bcursor%7D%7D&include=mortgage%2Creal_estate%2Ccensus%2Ccontacts&limit=25");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Agents
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.modex.com/v1/resources/real-estate-offices/real_estate_office_id/real-estate-agents?cursor=%7B%7Bcursor%7D%7D&include=mortgage%2Creal_estate%2Ccensus%2Ccontacts&limit=25")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```