---
hide_title: false
hide_table_of_contents: false
pagination_next: null
pagination_prev: null
---

# Acl.prototype.lookup()

The **`lookup(ipAddress)`** method returns the name associated with the `Acl` instance.

## Syntax

```js
acl.lookup(ipAddress)
```

### Parameters

- `ipAddress` _: string_
  - IPv4 or IPv6 address to lookup

### Return value

An Object of the form `{ action: 'ALLOW' | 'BlOCK', prefix: string }`, where `prefix` is the IP
address prefix that was matched in the ACL.

## Example

```js
/// <reference types="@fastly/js-compute" />
import { Acl } from 'fastly:acl';
addEventListener('fetch', async (evt) => {
  const myAcl = Acl.open('myacl');
  const match = await myAcl.lookup(evt.client.address);
  evt.respondWith(new Response(match?.action === 'BLOCK' ? 'blocked' : 'allowed'));
});
```
