# Find the download URL(s) for a UHRP URL (inferred)

> For the complete documentation index, see [llms.txt](https://bsvblockchain.com/docs/llms.txt).

**GET** `/find`

Base URL: `https://{host}`

Queries this server's knowledge of advertisement tokens for the given
UHRP URL.  Returns one or more download URLs if the server is currently
advertising the content, or 404 if not found.

## Query parameters

- `uhrpUrl` (string, required)
  The UHRP URL to resolve.  May be bare Base58Check or prefixed
  with `uhrp://`.

## Responses

### 200

Content found; download URLs returned.

- `uhrpUrl` (string, required)
  The resolved UHRP URL (echoed from query parameter).
- `urls` (string<uri>[], required)
  One or more HTTPS download URLs where the content is currently
  available.  Clients SHOULD try each in order and use the first
  that responds successfully.
- `expiresAt` (integer)
  UNIX timestamp of the earliest advertisement token expiry across
  all returned hosts.
- `contentLength` (integer)
  Byte length of the content as advertised in the token.

Example:

```json
{
  "uhrpUrl": "uhrp://XYZ123abc...",
  "urls": [
    "https://storage.example.com/files/abc123"
  ],
  "expiresAt": 1714100000,
  "contentLength": 204800
}
```

### 400

Bad request — invalid input.

- `error` (string, required)
  Human-readable error description.
- `code` (string)
  Machine-readable error code (see specs/errors.md).

Example:

```json
{
  "error": "invalid UHRP URL",
  "code": "ERR_INVALID_PARAMETER"
}
```

### 404

The requested UHRP URL is not known to this server.

- `error` (string, required)
  Human-readable error description.
- `code` (string)
  Machine-readable error code (see specs/errors.md).

Example:

```json
{
  "error": "invalid UHRP URL",
  "code": "ERR_INVALID_PARAMETER"
}
```

### 500

Internal server error.

- `error` (string, required)
  Human-readable error description.
- `code` (string)
  Machine-readable error code (see specs/errors.md).

Example:

```json
{
  "error": "invalid UHRP URL",
  "code": "ERR_INVALID_PARAMETER"
}
```