PHPackages                             mflor/pwned - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. mflor/pwned

ActiveLibrary[API Development](/categories/api)

mflor/pwned
===========

A clean and simple PHP library for interacting with all HaveIBeenPwned.com's API endpoints

5.0.0(1y ago)1616.0k↓31.7%11MITPHPPHP ^8.0

Since Mar 13Pushed 1y ago1 watchersCompare

[ Source](https://github.com/MFlor/pwned)[ Packagist](https://packagist.org/packages/mflor/pwned)[ Fund](https://www.buymeacoffee.com/mflor)[ Fund](https://ko-fi.com/MFlor)[ RSS](/packages/mflor-pwned/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (3)Versions (8)Used By (1)

Pwned
=====

[](#pwned)

[![Build Status](https://github.com/MFlor/pwned/actions/workflows/tests.yml/badge.svg)](https://codecov.io/gh/MFlor/pwned)[![Coverage Status](https://camo.githubusercontent.com/e3ef1675d68450f15f4dcb620785fecfd0e8f1b47f7a2d9bd2e4eb49f6b2b685/68747470733a2f2f636f6465636f762e696f2f67682f4d466c6f722f70776e65642f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d4c30593135464f4b5450)](https://codecov.io/gh/MFlor/pwned)[![Total Downloads](https://camo.githubusercontent.com/de9e4273bf81a6a7e51c7f695f39e93dfac9bfa648651719bcd0ebcc7b56fdfc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d666c6f722f70776e6564)](https://packagist.org/packages/mflor/pwned)[![Latest Version](https://camo.githubusercontent.com/5cf32d2b888516bfcf8e9f959b4eeeb851176822b7a00811e18a0bfa4fd30f65/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d666c6f722f70776e6564)](https://packagist.org/packages/mflor/pwned)[![License](https://camo.githubusercontent.com/5ecb06fdd43f1cd0e7be2e3ce3627b5bb0e8327196009e976e452b2ce15ea137/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6d666c6f722f70776e6564)](https://packagist.org/packages/mflor/pwned)

#### A clean and simple PHP library for interacting with all [HaveIBeenPwned.com's](https://haveibeenpwned.com/API/v3) API endpoints

[](#a-clean-and-simple-php-library-for-interacting-with-all-haveibeenpwnedcoms-api-endpoints)

This package wraps the entire HaveIBeenPwned API in a simple, easy to use, PHP library, that can be used in any project.

Many other packages wrapping the API, are either supposed to be used in a framework, or only wraps the password checker.

Installation
------------

[](#installation)

Install the library with composer:

```
composer require mflor/pwned
```

### Authorisation

[](#authorisation)

Authorisation is required for all APIs that enable searching HIBP by email address, namely [retrieving all breaches for an account](https://haveibeenpwned.com/API/v3#BreachesForAccount) and [retrieving all pastes for an account](https://haveibeenpwned.com/API/v3#PastesForAccount). An HIBP subscription key is required to make an authorised call and can be obtained on [the API key page](https://haveibeenpwned.com/API/Key).

### Setup

[](#setup)

```
