example-data.com
Menu
Browse docs and collections

agents

agents

Page 2 of 3.

Overview

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/agents?limit=25"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/agents?limit=25"
);
const { data, meta } = await res.json();

TypeScript example

// Download once: mkdir -p types && curl -o types/agents.d.ts https://example-data.com/types/agents.d.ts
import type { Agent, ListEnvelope } from "./types/agents";

const res = await fetch(
  "https://example-data.com/api/v1/agents?limit=25"
);
const { data, meta } = (await res.json()) as ListEnvelope<Agent>;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/agents",
    params={"limit": 25},
)
data = res.json()

Response

{
  "data": [
    {
      "id": 25,
      "userId": 36,
      "brokerage": "Coldwell Banker",
      "licenseNumber": "KWS5RPBD94",
      "specialty": "land",
      "yearsExperience": 35,
      "rating": 4.3,
      "ratingCount": 81,
      "createdAt": "2021-07-18T14:23:21.197Z"
    },
    {
      "id": 26,
      "userId": 227,
      "brokerage": "RE/MAX",
      "licenseNumber": "8RFLYG6HO5",
      "specialty": "rental",
      "yearsExperience": 24,
      "rating": 3.5,
      "ratingCount": 263,
      "createdAt": "2022-05-31T06:34:57.046Z"
    },
    {
      "id": 27,
      "userId": 187,
      "brokerage": "Berkshire Hathaway HomeServices",
      "licenseNumber": "64VL77ELFM",
      "specialty": "commercial",
      "yearsExperience": 13,
      "rating": 5,
      "ratingCount": 115,
      "createdAt": "2023-03-13T21:24:50.005Z"
    }
  ],
  "meta": {
    "page": 2,
    "limit": 24,
    "total": 50,
    "totalPages": 3
  },
  "links": {
    "self": "/api/v1/agents?page=2&limit=24",
    "first": "/api/v1/agents?page=1&limit=24",
    "last": "/api/v1/agents?page=3&limit=24",
    "next": "/api/v1/agents?page=3&limit=24",
    "prev": "/api/v1/agents?page=1&limit=24"
  }
}