PHPackages                             impact-seo/killduplicate-api-php - 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. impact-seo/killduplicate-api-php

ActiveLibrary[API Development](/categories/api)

impact-seo/killduplicate-api-php
================================

PHP Example Library to use KillDuplicate API

2722↓100%PHP

Since Aug 26Pushed 4y ago1 watchersCompare

[ Source](https://github.com/ImpactSeo/killduplicate-api-php)[ Packagist](https://packagist.org/packages/impact-seo/killduplicate-api-php)[ RSS](/packages/impact-seo-killduplicate-api-php/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

killduplicate-api-php
=====================

[](#killduplicate-api-php)

PHP Example Library to use [KillDuplicate](https://www.killduplicate.com) API

Install this library
--------------------

[](#install-this-library)

```
composer require impact-seo/killduplicate-api-php=dev-master

```

or download and uncompress archive

Set config.php
--------------

[](#set-configphp)

- Copy your API Key (connect to your account and go to API -&gt; settings)
- Set Your API Callback. (If you installed package via composer, it should look something like [http://www.your-website.com/vendor/impact-seo/killduplicate-api-php/api\_callback.php](http://www.your-website.com/vendor/impact-seo/killduplicate-api-php/api_callback.php))
- Give results folder write permissions (webserver user's ownership. www-data for Ubuntu, apache ...)
- Go to [www.yourwebsite.com/vendor/impact-seo/killduplicate-api-php/index.php](http://www.yourwebsite.com/vendor/impact-seo/killduplicate-api-php/index.php) if you installed through composer or adapt path to where you extracted lib.

API Specifications
------------------

[](#api-specifications)

### Get your remaining credits

[](#get-your-remaining-credits)

```
GET /api/public/credits/api_key

```

Params

```
api_key = Your Private API Key # required

```

Returns

```
credits

```

### Get scan cost (before running it for instance)

[](#get-scan-cost-before-running-it-for-instance)

```
POST /api/public/price

```

Params

```
api_key = Your Private API Key # required
text = Your Text (UTF-8 encoded) # required

```

### Scan Text

[](#scan-text)

```
POST /api/public/scan

```

Params

```
api_key = Your Private API Key # required
text = Your Text (UTF-8 encoded) # required
exclude_domains = Array of excluded domain names from duplicate search # optional
callback = Your callback url # required
format = desired return format # optional - possible values : json|xml - default : json

```

Returns Immediate response

```
text_id : store this id for retrieving result in callback
credits : how much credits this scan has cost

```

Callback Response

```
{
    "id": "82",
    "resume": "Demain, d\u00e8s l'aube, \u00e0 l'heure o\u00f9 blanchit la ca",
    "filename": null,
    "credits": "1",
    "date": "2016-04-01 16:41:43",
    "callback": "http:\/\/www.your-website.com\/vendor\/impact-seo\/killduplicate-api-php\/api_callback.php",
    "format": "json",
    "result": "long",
    "duplicate": "0",
    "dup_percentage": "0",
    "text": null,
    "exclude_domains": {},
    "search_dupes": {
        "1692": {
            "id": "1692",
            "text_id": "82",
            "phrase": "Demain, d\u00e8s l'aube, \u00e0 l'heure o\u00f9 blanchit la",
            "search_dupe_results": []
        },
        ...
    },
    "search_dupe_results": [],
    "phrases_to_check": "11",
    "phrases_checked": 11,
    "results": []
}

```

### Get Scan

[](#get-scan)

If for some reason, previous callback function is not send from our servers or not received by yours, you can force a call to retrieve specific scan status. To know if a scan has finished, you have to compare phrases\_to\_check against phrases\_checked parameters. We stongly advise you to set up a callback function and use this call only to retrieve lost results.

```
GET /api/public/scan/API_KEY/SCAN_ID

```

Params

```
API_KEY = Your Private API Key # required
SCAN_ID = Your scan id # required

```

Returns Immediate response similar to callback response

### Errors

[](#errors)

Possible error messages

```
UNKWONW_API_KEY : check your API key is corectly set in config.php ([Get your API Key](https://www.killduplicate.com/en/user/api))
UNAUTHORIZED_IP : check IP where script is run from is added to whitelist ([Chech Authorized IPs](https://www.killduplicate.com/en/user/api))
TOO_MANY_REQUESTS : only one request per second is allowed
NO_MORE_CREDITS : you dont' have enough credits to run this scan
EMPTY_TEXT_AND_URL : neither text nor url were provided
INTERNAL_ERROR : internal server error (please contact admin)
UNKNOWN_FORMAT : can only be json|xml
INVALID_CALLBACK_URL : invalid callback URL

```

UTF-8 encoding
--------------

[](#utf-8-encoding)

All texts MUST be encoded in VALID UTF-8. If you load some old Microsoft Words Documents you might have invalid UTF-8 characters like strange quotes. To be sure you have valid UTF-8 encoded texts you can check it :

```
$validUTF8 = ! (false === mb_detect_encoding($text, 'UTF-8', true));

```

If your text has invalid UTF-8 characters, you can use some home made functions to convert invalid encoding (problem is that some characters in some encodings can be converted into multiple UTF-8 characters you have to unilateraly decide to which character it will be converted to ... and that's why it's your responsability to make UTF-8 conversion when you use API) : [Gist Clean UTF-8](https://gist.github.com/ImpactSeo/78561612047efa7591264b8276357a4b), or you can make you own.

HTML entities
-------------

[](#html-entities)

Your texts MUST be send WITHOUT HTML entities (You can use [PHP function html\_entity\_decode](http://php.net/manual/en/function.html-entity-decode.php))

Troubleshouting
---------------

[](#troubleshouting)

Be sure your callback is reachable over the network.

For file permission issues (replace www-data by your webserver username)

```
chown -R www-data:www-data vendor/impact-seo/killduplicate-api-php/results
chmod -R 775 vendor/impact-seo/killduplicate-api-php/results

```

###  Health Score

20

—

LowBetter than 16% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

 Bus Factor1

Top contributor holds 85.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/6bc7fd8ead90aa97e39822bbf66df08413960599a1cb5de58d151f49246e4cab?d=identicon)[SeoHackers](/maintainers/SeoHackers)

---

Top Contributors

[![Seoblackout](https://avatars.githubusercontent.com/u/259706421?v=4)](https://github.com/Seoblackout "Seoblackout (24 commits)")[![hugsbrugs](https://avatars.githubusercontent.com/u/4385090?v=4)](https://github.com/hugsbrugs "hugsbrugs (4 commits)")

### Embed Badge

![Health badge](/badges/impact-seo-killduplicate-api-php/health.svg)

```
[![Health](https://phpackages.com/badges/impact-seo-killduplicate-api-php/health.svg)](https://phpackages.com/packages/impact-seo-killduplicate-api-php)
```

###  Alternatives

[google/apiclient

Client library for Google APIs

9.8k186.9M907](/packages/google-apiclient)[stripe/stripe-php

Stripe PHP Library

4.0k139.3M422](/packages/stripe-stripe-php)[webonyx/graphql-php

A PHP port of GraphQL reference implementation

4.7k75.4M281](/packages/webonyx-graphql-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k90.6M253](/packages/twilio-sdk)[friendsofsymfony/jsrouting-bundle

A pretty nice way to expose your Symfony routing to client applications.

1.5k52.7M210](/packages/friendsofsymfony-jsrouting-bundle)[knplabs/github-api

GitHub API v3 client

2.2k15.3M173](/packages/knplabs-github-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
