Skip to content
Scrappa Get API key
OneRoof API 1 credit/request

OneRoof Agency API Documentation

GET https://scrappa.co/api/oneroof/agency

OneRoof Agency API returns an agency (office) profile by numeric id: name, branch, address with coordinates, public phone, email and website, description, banner and counts of listings for sale, rent, sold and lease and of agents. Use the id with the search route (office_id) to list the agency's listings. An unknown id answers 404. Failed requests are not billed.

OneRoof Agency API Documentation 1 credit/request

Endpoint

Request preview
GET
https://scrappa.co/api/oneroof/agency
Auth header
x-api-key
Cost
1 credit/request
id = 1234567890
Response preview
200 OK
{
    "data": {
        "id": 107,
        "name": "Bayleys Real Estate Ltd (Licensed: REAA 2008) - Bayleys, Remuera",
        "email": "office@example.co.nz",
        "phone": "+64 9 000 0000",
        "photo": "https://s.oneroof.co.nz/image/3b/29/3b291efc7b46be09a66f4c4058daf534.jpg?x-oss-process=image/quality,q_80",
        "banner": "https://s.oneroof.co.nz/image/9a/01/9a0168ca52acd05f60736ce7377d459f.jpg?x-oss-process=image/quality,q_80",
        "branch": "Bayleys",
        "counts": {
            "sold": 1826,
            "agents": 49,
            "for_rent": 0,
            "for_sale": 156,
...

Parameters

Start with the required fields, then add optional filters only when your use case needs them.

Runnable path

1 required parameter needed before sending a request.

id integer Required

Required. The numeric agency id (office.id) from a search item.

Example value 1234567890

Response Schema

Example response fields are illustrative; inspect the JSON before integrating.

Example response fields

Scan these fields before integrating.

data meta success
JSON Response
200 OK
{
    "data": {
        "id": 107,
        "name": "Bayleys Real Estate Ltd (Licensed: REAA 2008) - Bayleys, Remuera",
        "email": "office@example.co.nz",
        "phone": "+64 9 000 0000",
        "photo": "https://s.oneroof.co.nz/image/3b/29/3b291efc7b46be09a66f4c4058daf534.jpg?x-oss-process=image/quality,q_80",
        "banner": "https://s.oneroof.co.nz/image/9a/01/9a0168ca52acd05f60736ce7377d459f.jpg?x-oss-process=image/quality,q_80",
        "branch": "Bayleys",
        "counts": {
            "sold": 1826,
            "agents": 49,
            "for_rent": 0,
            "for_sale": 156,
            "for_lease": 0
        },
        "address": {
            "full": "303, Remuera Road, Remuera, Auckland",
            "region": "Auckland",
            "suburb": "Remuera",
            "district": "Auckland City",
            "latitude": -36.880517,
            "longitude": 174.795576
        },
        "website": "www.bayleys.co.nz",
        "description": "Bayleys Remuera is relocated at 303 Remuera Road, a state of the art, real estate office designed with one thing in mind \u2013 to provide the best possible environment for our business to provide exceptional service to our clients.\n\nLocated in the heart of the Remuera Village, this central location prov"
    },
    "meta": {
        "billable": true,
        "endpoint_family": "agency"
    },
    "success": true
}

Errors

Handle these documented responses before retrying or showing customer-facing failures.

422

Validation Error

A parameter is missing or invalid. This response is not billable.

{
    "errors": {
        "id": [
            "The id field is required."
        ]
    },
    "message": "The request validation failed"
}
404

Not Found

The agency does not exist. This response is not billable.

{
    "meta": {
        "billable": false,
        "retryable": false,
        "endpoint_family": "agency"
    },
    "error": {
        "code": "NOT_FOUND",
        "message": "The requested record was not found."
    },
    "success": false
}
503

Upstream Unavailable

OneRoof could not be reached. This response is not billable and is retryable.

{
    "meta": {
        "billable": false,
        "retryable": true,
        "endpoint_family": "agency"
    },
    "error": {
        "code": "UPSTREAM_UNAVAILABLE",
        "message": "OneRoof could not be reached. Please retry shortly."
    },
    "success": false
}

Generate Code with AI

Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.

Try It Live

Test this endpoint in our interactive playground with real data.