# find_objects

Returns a list of objects rezzed in the region.

```csharp
// See "LSL Helper Functions" page for this function
smartbotsAPI("find_objects", []);
```

```snippet http-api-variables-OmJyUigTgO
```

```snippet http-api-input-basic-parameters-5FcVlaJbq0 action="find_objects"
```

```snippet http-api-input-q5yvAagqsZ
uuid           | optional | Filter a specific object by UUID
in_search      | optional | Look for objects with the “Show in search” property.<br>`0`(default)<br>`1`
current_parcel | optional | Look for objects within the current parcel only.<br>`0`<br>`1` (default)
root_only      | optional | Look for root objects only (linked child objects excluded).<br>`0`<br>`1` (default)
parent         | optional | UUID of parent object — shows child objects of this parent UUID
with_props     | optional | Request additional object properties (Name, Description, etc).<br>`0`<br>`1` (default)
range          | optional | The distance to scan in meters (default: all visible objects)
limit          | optional | Limit the number of returned objects (default: 100, max: 100)
```

```snippet http-api-output-JAwUcmg7i7
found    | Total number of objects found (includes objects outside the limit)
returned | Number of objects returned within the limit
objects  | JSON array of object data (UUID, position, distance, etc.)
```

# Example

Returns nearby objects with a limit of 2 and a scan range of 20 meters:

```csharp
// See "LSL Helper Functions" page for this function
smartbotsAPI("find_objects", ["limit", 2, "range", 20]);
```

### Example JSON Response

```json
{
  "result": "OK",
  "action": "find_objects",
  "found": 30,
  "returned": 2,
  "objects": [
    {
      "UUID": "2e4c4962-0316-ecf4-ccf3-7c9db5b05bfc",
      "LocalID": 552702023,
      "Position": { "X": 111.69685, "Y": 234.43146, "Z": 3003.1833 },
      "LocalPosition": { "X": 111.69685, "Y": 234.43146, "Z": 3003.1833 },
      "ParcelLocalID": 7,
      "Distance": 3.2783988,
      "Flags": { "InSearch": false },
      "RootUUID": null,
      "Props": {
        "Name": "NLS",
        "Description": "",
        "OwnerID": "7351a3c1-009e-4a95-b737-413ad34ebed1",
        "CreatorID": "7351a3c1-009e-4a95-b737-413ad34ebed1",
        "SalePrice": 10,
        "Permissions": {
          "NextOwnerMask": "Transfer, Move",
          "OwnerMask": 2147483647
        },
        "TextureIDs": [
          "89556747-24cb-43ed-920b-47caed15465f"
        ]
      },
      "Type": "Primitive"
    },
    {
      "UUID": "b23bedce-cc61-5828-4d56-2e08c7cf8b17",
      "LocalID": 540403275,
      "Distance": 3.2799234,
      "Position": { "X": 117.94934, "Y": 235.63309, "Z": 3004.069 },
      "Flags": { "InSearch": false },
      "Props": {
        "Name": "S2 Pro Switch - Industrial Large - ACCESS v1.2.0",
        "Description": "LandingLights,1337",
        "OwnerID": "7351a3c1-009e-4a95-b737-413ad34ebed1"
      },
      "Type": "Primitive"
    }
  ]
}
```