# OneRoof Agent API Documentation

<p><strong>OneRoof Agent API</strong> returns an agent profile by numeric id: name, job title, photo, biography, public phone and email, listing and sales statistics, serviced suburbs, skills, awards, testimonial, social links and agency. An unknown id answers 404. Failed requests are not billed.</p>

- **Documentation:** [https://scrappa.co/docs/oneroof-api/oneroof_agent](https://scrappa.co/docs/oneroof-api/oneroof_agent)
- **API group:** OneRoof API
- **Endpoint:** `GET https://scrappa.co/api/oneroof/agent`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer | Yes | Required. The numeric agent id (agents[].id) from a search item. |

## Example response

```json
{
    "data": {
        "id": 117482,
        "bio": "Deliberate, focused, principled; for Chester, real estate is all-consuming.Ask him why, and he\u2019ll tell you it's all about the relationships. For Chester, that means building trust with good people, earned through sound advice, good judgment and dependable action.An integral member o",
        "url": "https://www.oneroof.co.nz/agent/chester-duffett-117482",
        "name": "Chester Duffett",
        "slug": "chester-duffett-117482",
        "email": "agent@example.co.nz",
        "phone": "021 000 0000",
        "photo": "https://s.oneroof.co.nz/image/6d/fe/6dfecbb6f02e24a52d84ab4f2b4977a3.jpg?x-oss-process=image/quality,q_80",
        "stats": {
            "rating": null,
            "sold_total": 12,
            "sold_value": null,
            "sold_recently": 9,
            "days_on_market": null,
            "listings_for_sale": 14
        },
        "awards": [],
        "banner": "https://s.oneroof.co.nz/image/9a/01/9a0168ca52acd05f60736ce7377d459f.jpg?x-oss-process=image/quality,q_80",
        "office": {
            "id": 107,
            "name": "Bayleys Real Estate Ltd (Licensed: REAA 2008) - Bayleys, Remuera",
            "slug": "bayleys-real-estate-ltd-licensed-reaa-2008-bayleys-remuera-107",
            "photo": "https://s.oneroof.co.nz/image/3b/29/3b291efc7b46be09a66f4c4058daf534.jpg?x-oss-process=image/quality,q_80",
            "address": "303, Remuera Road, Remuera, Auckland"
        },
        "skills": [],
        "social": [],
        "bio_html": "<p>Deliberate, focused, principled; for Chester, real estate is all-consuming.</p><p>Ask him why, and he\u2019ll tell you it's all about the relationships. For Chester, that means building trust with good people, earned through sound advice, good judgment and dependable action.</p><p>An integral member o",
        "job_title": "Salesperson",
        "video_url": null,
        "testimonial": "[{'person': ' ', 'body': 'Chester went above and beyond the call of duty to ensure that our property was very well presented before it went into the market. Throughout the sale campaign, he did not di",
        "serviced_suburbs": [
            "Remuera",
            "Epsom"
        ]
    },
    "meta": {
        "billable": true,
        "endpoint_family": "agent"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A parameter is missing or invalid. This response is not billable. |
| 404 | Not Found | The agent does not exist. This response is not billable. |
| 503 | Upstream Unavailable | OneRoof could not be reached. This response is not billable and is retryable. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
