# Gratka Agent Profile API Documentation

Scrappa's `GET /api/gratka/agent` returns the agency and agent behind one Gratka listing, with their other listings.

## Derived from a listing

Gratka has no standalone agency page. This endpoint reads the contact block of the listing you send in `listing_url`, so the profile is the advertiser of that listing. It costs one lookup.

## What you get

`company` with `id`, `name`, `type` (`AGENCY` or `OWNER`), `address` and `logo`, `person` with `name`, `type` and `photo`, and `listings`, the other listings of the same advertiser as in search results, with `listing_count`. An owner who sells directly has no `company.id`.

## Privacy

Phone numbers and fax numbers are not returned.

- **Documentation:** [https://scrappa.co/docs/gratka-api/gratka_agent](https://scrappa.co/docs/gratka-api/gratka_agent)
- **API group:** Gratka API
- **Endpoint:** `GET https://scrappa.co/api/gratka/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 |
| --- | --- | --- | --- |
| `listing_url` | string | Yes | Listing url returned by search. The advertiser of this listing is returned. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/gratka/agent?listing_url=https%3A%2F%2Fgratka.pl%2Fnieruchomosci%2Fmieszkanie-krakow-bronowice-ojcowska%2Fob%2F49402269"
```

## Example response

```json
{
    "success": true,
    "agent": {
        "company": {
            "id": 222179,
            "name": "Nieruchomo\u015bci Splendor",
            "type": "AGENCY",
            "address": [
                "Tadeusza Ko\u015bciuszki 75/40",
                "30-114 Krak\u00f3w"
            ],
            "logo": "https://d-gr.cdngr.pl/kadry/k/r/gr-plogo/a4/bb/222179_1629328035.jpg"
        },
        "person": {
            "name": "Iwona Franusiak",
            "type": "AGENT",
            "photo": "https://img2.staticmorizon.com.pl/thumbnail/example/200/200/2/thumbnail.jpg"
        },
        "listing_count": 1,
        "listings": [
            {
                "id": "49402269",
                "url": "https://gratka.pl/nieruchomosci/mieszkanie-krakow-bronowice-ojcowska/ob/49402269",
                "title": "mieszkanie do wynaj\u0119cia",
                "headline": "Mieszkanie do wynaj\u0119cia, 153 m\u00b2, 5 pokoi Krak\u00f3w Bronowice",
                "price": {
                    "amount": 4900,
                    "currency": "PLN"
                },
                "price_formatted": "4 900 z\u0142",
                "price_per_m2": {
                    "amount": 32.03,
                    "currency": "PLN"
                },
                "price_per_m2_formatted": "32 z\u0142/m\u00b2",
                "area_m2": 153,
                "rooms": 5,
                "rooms_label": "5 pokoi",
                "floor_label": "pi\u0119tro 1",
                "address": {
                    "voivodeship": "ma\u0142opolskie",
                    "city": "Krak\u00f3w",
                    "district": "Bronowice",
                    "neighbourhood": null,
                    "street": "Ojcowska",
                    "street_number": null,
                    "county": null,
                    "commune": null,
                    "latitude": null,
                    "longitude": null
                },
                "photos": [
                    {
                        "url": "https://d-gr.cdngr.pl/kadry/k/r/gr-ogl/aa/bb/49402269_1.jpg",
                        "alt": "Mieszkanie do wynaj\u0119cia 153m2 Krak\u00f3w Bronowice - zdj\u0119cie 1"
                    }
                ],
                "photo_count": 12,
                "plans_count": 0,
                "has_3d_view": false,
                "has_video": false,
                "description": "Przestronne mieszkanie w nowym budynku...",
                "added_at": "2026-10-26",
                "refreshed_at": null,
                "is_promoted": false,
                "is_development": false,
                "agent": {
                    "company": {
                        "id": 222179,
                        "name": "Nieruchomo\u015bci Splendor",
                        "type": "AGENCY",
                        "address": [
                            "Tadeusza Ko\u015bciuszki 75/40",
                            "30-114 Krak\u00f3w"
                        ],
                        "logo": "https://d-gr.cdngr.pl/kadry/k/r/gr-plogo/a4/bb/222179_1629328035.jpg"
                    },
                    "person": {
                        "name": "Iwona Franusiak",
                        "type": "AGENT",
                        "photo": "https://img2.staticmorizon.com.pl/thumbnail/example/200/200/2/thumbnail.jpg"
                    }
                }
            }
        ],
        "source_listing_id": "49402269"
    },
    "meta": {
        "endpoint_family": "agent",
        "billable": true,
        "attempts": 1
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 404 | Not Found | No listing exists at that address on Gratka (`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 | Gratka could not be reached after retries, answered with an error, or returned a page without the expected data (`upstream_unavailable`, `upstream_blocked`, `upstream_rejected`, `parser_drift`). 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)
