# Square Yards Agent Profile API Documentation

Read the public profile of one agent by id: name, agency, location, languages, years of experience, RERA number, rating and review count when present, active listings, profile views, badges, the about sections and the agent current sale and rent listings in the same item shape as /search. The agent id is the agent.id of any listing. Phone numbers are never returned. An agent without a public profile is a non-billable 404.

- **Documentation:** [https://scrappa.co/docs/squareyards-api/squareyards_agent](https://scrappa.co/docs/squareyards-api/squareyards_agent)
- **API group:** Square Yards API
- **Endpoint:** `GET https://scrappa.co/api/squareyards/v1/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 | Agent id such as 331378, taken from agent.id of a search or listing item. |
| `slug` | string | No | Optional agent slug from agent.slug. The slug is cosmetic upstream, so it can be left out. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/squareyards/v1/agent?id=331378"
```

## Example response

```json
{
    "success": true,
    "data": {
        "profile_url": "https://www.squareyards.com/agent/agent/331378",
        "id": 331378,
        "name": "Yogesh Bapu Ghadigaonkar",
        "image": "https://img.squareyards.com/connect/profilepic/919987110619639185290230926953.jpg",
        "agency": "Aaradhya Fortune Pvt Ltd",
        "location": "Bhandup West, Mumbai",
        "languages": [
            "English",
            "Hindi",
            "Marathi"
        ],
        "experience_years": 7,
        "rera_number": "A041332501948",
        "rating": null,
        "review_count": null,
        "active_listings": 60,
        "profile_views": 1175,
        "badges": [
            "pro-agent"
        ],
        "about": {
            "description": null,
            "sections": {
                "Specialization": [
                    "New Sale",
                    "Commercial",
                    "Residential"
                ]
            }
        },
        "listings": {
            "sale": [],
            "rent": []
        }
    },
    "meta": {
        "endpoint_family": "agent",
        "billable": true
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A public parameter is missing or invalid, or a city, property type, bedroom value or sort cannot be resolved. The response is not billable. |
| 404 | Resource Not Found | The requested Square Yards resource does not exist. The response is not billable. |
| 503 | Unexpected Upstream Response | Square Yards answered with a body that is not the documented shape. The response is not billable. |
| 503 | Upstream Unavailable | Square Yards was temporarily unavailable or blocked the request. The response is not billable and the request never answers 429. |

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