# isReachable

> **isReachable**(`serviceURL`, `options?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`boolean`\>

Defined in: [packages/synapse-core/src/sp/is-reachable.ts:33](https://github.com/FilOzone/synapse-sdk/blob/5989c4b03ed2fe4cf8b1ef29efe1d4ff1ad4c7bc/packages/synapse-core/src/sp/is-reachable.ts#L33)

Check whether a provider's PDP API answers a ping.

GET /pdp/ping

Returns `false` instead of throwing when [ping](/reference/filoz/synapse-core/sp/functions/ping/) fails with an HTTP, network or timeout error.
Still throws `AbortError` when the signal aborts, and rethrows any other error, such as an invalid
service URL, so caller mistakes are not reported as an unreachable provider.

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `serviceURL` | `string` | The service URL of the PDP API. |
| `options?` | [`OptionsType`](/reference/filoz/synapse-core/sp/namespaces/ping/type-aliases/optionstype/) | [isReachable.OptionsType](/reference/filoz/synapse-core/sp/namespaces/isreachable/type-aliases/optionstype/) |

## Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`boolean`\>

Whether the provider answered [isReachable.OutputType](/reference/filoz/synapse-core/sp/namespaces/isreachable/type-aliases/outputtype/)

## Example

```ts
import * as SP from '@filoz/synapse-core/sp'

if (await SP.isReachable('https://pdp.example.com', { timeout: 5000 })) {
  console.log('provider is up')
}
```

## Throws

Errors [isReachable.ErrorType](/reference/filoz/synapse-core/sp/namespaces/isreachable/type-aliases/errortype/)