# Metros Cubicos Agency Profile API Documentation

Scrappa's `GET /api/metroscubicos/agency` returns a seller summary and one page of the seller's listings.

## Input

`seller_id` is the id from the listing detail (`agency.seller_id`). `page` is 1-based with 48 listings per page, up to page 42.

## What you get

`agency` holds the `seller_id`, the seller `nickname`, `listings_total` and `facets`: the number of listings per operation, property type and state. `total`, `pagination` and `listings` work like the search endpoint, and every listing has the same fields as a search card. The seller page shows no name, logo or verified flag; those are part of the listing detail.

## Not found

A seller with no active listing and a seller that does not exist look the same on the site. Both return a non-billable `404`. A page past the last page returns an empty list with `total` 0.

- **Documentation:** [https://scrappa.co/docs/metroscubicos-api/metroscubicos_agency](https://scrappa.co/docs/metroscubicos-api/metroscubicos_agency)
- **API group:** Metros Cubicos API
- **Endpoint:** `GET https://scrappa.co/api/metroscubicos/agency`

## 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 |
| --- | --- | --- | --- |
| `seller_id` | integer | Yes | Seller id from the listing detail, agency.seller_id. |
| `page` | integer | No | Listings page, 1 to 42. 48 listings per page. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/metroscubicos/agency?seller_id=2721306408"
```

## Example response

```json
{
    "success": true,
    "agency": {
        "seller_id": 2721306408,
        "nickname": "STANZA_SOLUCIONES_INM_",
        "listings_total": 94,
        "facets": {
            "operation": [
                {
                    "name": "Venta",
                    "listings": 85
                },
                {
                    "name": "Renta",
                    "listings": 9
                }
            ],
            "property_type": [
                {
                    "name": "Casas",
                    "listings": 45
                }
            ],
            "state": [
                {
                    "name": "Jalisco",
                    "listings": 93
                }
            ]
        }
    },
    "total": 94,
    "returned": 1,
    "pagination": {
        "page": 1,
        "limit": 48,
        "pages_count": 2,
        "has_next_page": true,
        "has_previous_page": false
    },
    "listings": [
        {
            "id": "MLM-6326040252",
            "title": "Splendor Coyoacan",
            "url": "https://departamento.mercadolibre.com.mx/MLM-6326040252-splendor-coyoacan-_JM",
            "headline": "Departamento en venta",
            "is_development": true,
            "price": {
                "amount": 5371700,
                "currency": "MXN",
                "from": true
            },
            "attributes": {
                "bedrooms": {
                    "min": 2,
                    "max": 3
                },
                "bathrooms": {
                    "min": 2,
                    "max": 2
                },
                "parking": null,
                "area": {
                    "min": 64,
                    "max": 95,
                    "kind": "built"
                },
                "raw": [
                    "2 a 3 dormitorios",
                    "2 ba\u00f1os",
                    "64 - 95 m\u00b2 construidos"
                ]
            },
            "location": "Avenida Divisi\u00f3n Del Norte 2325, Benito Ju\u00e1rez, Distrito Federal",
            "image": "https://http2.mlstatic.com/D_NQ_NP_2X_666237-MLM118578393547_102026-E.webp",
            "delivery": "Pronta entrega",
            "units_available": "3 unidades disponibles",
            "featured": true,
            "seller": null
        }
    ],
    "meta": {
        "endpoint_family": "agency",
        "billable": true,
        "attempts": 1
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 404 | Not Found | No seller with active listings has that id (`not_found`). Non-billable. |
| 422 | Validation Error | A query parameter is missing, unknown or unusable. Unknown parameters are rejected, never ignored. Non-billable. |
| 503 | Upstream Unavailable | Metros Cubicos could not be reached after retries, answered with an error, or returned an unexpected answer (`upstream_unavailable`, `upstream_blocked`, `upstream_changed`). Retryable and never billed. Clients are never rate limited. |

## 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)
