# Domain and IP Pinger API

> Domain and IP Pinger checks whether any domain name or public IP address is reachable and responding in real time. It returns an alive status and successful round trips, while paid plans add packet loss percentages and latency metrics.

**Endpoint:** `POST https://api.apiverve.com/v1/pinger`  
**Category:** Networking  
**Cost:** 2 credits per call  
**Canonical page:** https://apiverve.com/marketplace/pinger

## Overview

A ping API to ping a domain online or ping an IP address without opening a terminal. Send a POST request with a hostname or public IP address and the desired ping count, and the service sends ICMP echo requests to the target in real time from our servers, reporting whether it answered and how many round trips completed.

The Free plan returns the host, an alive flag and the number of successful round trips. That covers a quick check of host reachability on a status page, in a support tool, or in a bot that answers whether a site is down for everyone or only for one user.

Paid plans add the numbers needed to test server latency: the resolved numeric IP, a packet loss check as a percentage, minimum, average and maximum round-trip times in milliseconds, their standard deviation and every individual time. Paid plans can also set a custom timeout in milliseconds. Private, loopback and other non-public addresses are refused, so only hosts on the public internet can be pinged.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl -X POST "https://api.apiverve.com/v1/pinger" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"host":"google.com","timeout":1,"roundTrips":1}'
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `host` | string | Yes | The host name or public IP that you want to ping. A URL (https://example.com/path) or host:port is reduced to its host |
| `timeout` | integer | No | The timeout for the ping request in milliseconds. default 1500. range 100-3000. Premium field |
| `roundTrips` | integer | No | How many pings to send before averaging the round-trip time. default 1. range 1-5 |

## Response fields

- `host` — string · The hostname or IP address that was pinged
- `numericHost` — string · The numeric IP address of the host that was pinged · (premium)
- `alive` — boolean · Whether the host is reachable and responding to ping requests
- `roundTrips` — number · Number of successful ping round trips completed
- `packetLoss` — number · Percentage of packets lost during the ping operation · (premium)
- `minMS` — number · Minimum round trip time in milliseconds · (premium)
- `avgMS` — number · Average round trip time in milliseconds · (premium)
- `maxMS` — number · Maximum round trip time in milliseconds · (premium)
- `stdDev` — number · Standard deviation of round trip times · (premium)
- `times` — array · Array of individual round trip times in milliseconds · (premium)

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "host": "google.com",
    "numericHost": "2607:f8b0:4001:c6e::8a",
    "alive": true,
    "roundTrips": 3,
    "packetLoss": 0,
    "minMS": 0.652,
    "avgMS": 0.6846666666666666,
    "maxMS": 0.712,
    "stdDev": 0.02478350706058811,
    "times": [
      0.712,
      0.652,
      0.69
    ]
  }
}
```

## Use cases

- **Server Reachability Checks** — DevOps engineers trigger ping checks during deployments to confirm that newly provisioned web servers respond before routing production traffic to them.
- **Network Latency Monitoring** — When network engineers detect sluggish connections, they inspect round-trip responses across public IP endpoints to diagnose potential packet drop issues.
- **Domain Availability Verification** — To catch outages fast, internal status dashboards poll critical external third-party hostnames and display immediate alive indicators to support staff.
- **Automated Incident Triage** — Alerting systems ping reported remote servers to verify reachability before paging on-call staff for an offline alert.

## SDKs

- **npm** — `npm install @apiverve/pinger` (https://www.npmjs.com/package/@apiverve/pinger)
- **NuGet** — `dotnet add package APIVerve.API.DomainandIPPinger` (https://www.nuget.org/packages/APIVerve.API.DomainandIPPinger)
- **Source** — https://github.com/apiverve/pinger-api

## More

- Full reference: https://docs.apiverve.com/ref/pinger
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
