# parcel_info

Returns detailed information about a parcel, including owner, group, prim counts, and other properties.

```csharp
// See "LSL Helper Functions" page for this function
smartbotsAPI("parcel_info", [
  "x", 25,
  "y", 32,
  "getvalue", "ownerprims"
]);
```

# Variables

The following table shows input values (you send them with the API call) and returned output values.

## Input

| Variable | Required | Description |
|----------|----------|-------------|
| x        | optional | The X coordinate of the point in the parcel |
| y        | optional | The Y coordinate of the point in the parcel |
| getvalue | optional | Limit return list to this entry (see return values below) |

## Output

*(To be received in* `*http_response*` *LSL event, see* [*docs*](/doc/doing-http-api-calls-c6FSEMF7bP) *for details)*

| Variable | Description |
|----------|-------------|
| result   | OK - command completed successfully<br>FAIL - command failed |
| resulttext | Detailed reason for the failure |
| custom   | The value from input "custom" parameter. See above |
| \*\*\*   | A lot of variables, see below |

# Comments

This API request returns a lot of information about a parcel. You can retrieve information about:

* A parcel at a specific point (using `x` and `y` coordinates)
* The current bot's parcel (omit `x` and `y` to fetch this info)

# Return values

This request returns a large amount of information about the parcel. The following entries are returned:

| Entry | Description |
|-------|-------------|
| parcel_area | Parcel area, in m² |
| parcel_claimdate | The date when the parcel was created/claimed |
| parcel_description | Description of the parcel. **Important:** The description is URL-escaped (it may contain new-line characters). Use `llUnescapeURL()` to decode. |
| parcel_group | The UUID of the parcel group |
| parcel_groupowned | `True` if the parcel is group-owned |
| parcel_groupprims | Total number of primitives owned by the parcel group on this parcel |
| parcel_maxprims | Maximum number of primitives this parcel supports |
| parcel_totalprims | Total number of primitives on this parcel |
| parcel_musicurl | The music URL of the parcel |
| parcel_cleantime | Auto-return time (minutes) |
| parcel_owner | Parcel owner UUID |
| parcel_ownerprims | Number of prims owned by the parcel owner (resident or group) |
| parcel_saleprice | Price of the parcel (if parcel is for sale) |
| parcel_snapshot | Key of the parcel snapshot |
| parcel_landingpoint | Landing point of the parcel |
| parcel_flags | Various flags, separated by commas |

# JSON response

Starting from January 2018, it is possible to get a JSON-formatted response from the SmartBots API:

```json
{
  "action": "parcel_info",
  "parcel_area": "10960",
  "parcel_claimdate": "8/13/2011 11:49:01 AM",
  "parcel_cleantime": "0",
  "parcel_description": "SmartBots official office!\\n\\nGive a direct group invitation (by group inviter bots), scheduled notices and group IMs! Subscription is L$79/week.\\n\\nautomatic group inviter bot invite bots inviter rent bot for rent auto group export notice spam",
  "parcel_flags": "AllowFly, AllowOtherScripts, AllowLandmark, ShowDirectory, AllowGroupScripts, CreateGroupObjects, AllowAPrimitiveEntry, AllowGroupObjectEntry, AllowVoiceChat, UseEstateVoiceChan",
  "parcel_group": "20d1b192-8d6d-374d-fa65-efe607894550",
  "parcel_groupowned": "False",
  "parcel_groupprims": "46",
  "parcel_landingpoint": "<201.613, 100.423, 32.2699>",
  "parcel_maxprims": "3344",
  "parcel_musicurl": "",
  "parcel_name": "SmartBots: Second Life bots for L$79 / Inviter bot + notices",
  "parcel_owner": "cd93067e-7c4e-41c0-ba91-be01f4bafe35",
  "parcel_ownerprims": "2351",
  "parcel_saleprice": "0",
  "parcel_snapshot": "b60a21e4-58ec-4538-d705-c9b9666b05d9",
  "parcel_totalprims": "2471",
  "result": "OK"
}
```

# Limiting the number of return values

The `parcel_info` API request returns a large amount of data, which may be critical for LSL scripts.  
To limit the returned entries to specific ones, use the `getvalue` parameter (see examples).

# Examples

**1. Get all information about the parcel the bot is on:**

```
action=parcel_info
```

**2. Get the group UUID of the current bot's parcel:**

```
action=parcel_info&getvalue=group
```

**3. Get the number of owner’s prims at point** `**<25,32,0>**`**:**

```
action=parcel_info&getvalue=ownerprims&x=25&y=32
```