PHPackages                             2indexninja-hub/2index-ninja-sdk - 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. 2indexninja-hub/2index-ninja-sdk

ActiveLibrary[API Development](/categories/api)

2indexninja-hub/2index-ninja-sdk
================================

A modern PHP SDK for the 2index.ninja API

v1.0.0(9mo ago)00MITPHPPHP &gt;=8.1

Since Aug 9Pushed 9mo agoCompare

[ Source](https://github.com/2indexninja-hub/2index-ninja-sdk)[ Packagist](https://packagist.org/packages/2indexninja-hub/2index-ninja-sdk)[ RSS](/packages/2indexninja-hub-2index-ninja-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

2Index.Ninja PHP SDK
====================

[](#2indexninja-php-sdk)

[![Latest Version on Packagist](https://camo.githubusercontent.com/035bca38de13672ae516f13a2917b34f1dbd59cad4a4e80ac6430f33290cd2e6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f32696e6465786e696e6a612d6875622f32696e6465782d6e696e6a612d73646b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/2indexninja-hub/2index-ninja-sdk)[![Total Downloads](https://camo.githubusercontent.com/30176037d0614a5c119e8d6f533319eba61ca4aec8050076744c25b576bfca7a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f32696e6465786e696e6a612d6875622f32696e6465782d6e696e6a612d73646b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/2indexninja-hub/2index-ninja-sdk)

The official PHP SDK for the [2index.ninja](https://2index.ninja/) API. A modern, fluent, and fully-typed client for seamless integration into your PHP projects.

Why 2Index.Ninja?
-----------------

[](#why-2indexninja)

Our service provides powerful tools to manage the indexing of your websites in search engines.

### 🚀 Google Indexing API

[](#-google-indexing-api)

Our service supports the **Google Indexing API**, allowing you to quickly and safely manage the indexing of your site's pages in the Google search engine. With our help, you can efficiently increase the number of indexed pages on your site, regardless of their quantity.

### ⚡️ IndexNow

[](#️-indexnow)

The **IndexNow** protocol works similarly to the Google Indexing API but extends its reach. While the Indexing API is specific to Google, IndexNow works equally well with search engines like **Yandex** and **Bing**. This method is also fast, safe, and efficient.

### 🔗 Backlinks Indexing

[](#-backlinks-indexing)

External links are one of the most effective ways to boost your site's visibility in search engines. However, not all backlinks are indexed quickly, and sometimes it can take a very long time. Our service can help **speed up the indexing of backlinks**, ensuring your SEO efforts pay off sooner. Remember, the success of indexing also depends on the quality of the donor site where the link is placed.

SDK Features
------------

[](#sdk-features)

- **A simple, object-oriented interface.**
- **Strictly-typed models (DTOs)** for all API responses, enabling autocompletion in your IDE and type safety.
- **Robust error handling** with custom exceptions: `ApiException` and `NetworkException`.
- **"Batteries-included" with a built-in Guzzle HTTP client** for zero-config, out-of-the-box usage.
- **Fully documented code** with PHPDoc.

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

[](#installation)

You can install the package via Composer:

```
composer require 2indexninja-hub/2index-ninja-sdk
```

Quick Start
-----------

[](#quick-start)

To get started, you'll need your `API_TOKEN` from your [2index.ninja account](https://2index.ninja/user/profile#api-token).

```
