PHPackages                             benatespina/stack-exchange-api-client - 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. benatespina/stack-exchange-api-client

ActiveLibrary[API Development](/categories/api)

benatespina/stack-exchange-api-client
=====================================

StackExchange v2.2 API client

v0.7.1(10y ago)101724MITPHPPHP &gt;=5.4

Since Sep 22Pushed 8y ago2 watchersCompare

[ Source](https://github.com/benatespina/StackExchangeApiClient)[ Packagist](https://packagist.org/packages/benatespina/stack-exchange-api-client)[ Docs](https://github.com/benatespina/StackExchangeApiClient)[ RSS](/packages/benatespina-stack-exchange-api-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (4)Versions (6)Used By (0)

[![stackExchange-logo](https://camo.githubusercontent.com/b3d7fba164a8099829dde0cf10aec4249d41707b12e3717fe0b3ddf7c6829447/687474703a2f2f66696c65732e717569636b6d65646961736f6c7574696f6e732e636f6d2f736f2d696d616765732f737461636b65786368616e67652e737667)](https://camo.githubusercontent.com/b3d7fba164a8099829dde0cf10aec4249d41707b12e3717fe0b3ddf7c6829447/687474703a2f2f66696c65732e717569636b6d65646961736f6c7574696f6e732e636f6d2f736f2d696d616765732f737461636b65786368616e67652e737667) Stack Exchange v2.2 API Client
==================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#-stack-exchange-v22-api-client)

> PHP library for interacting with the [Stack Exchange](http://stackexchange.com/)'s version 2.2 REST API.

[![SensioLabsInsight](https://camo.githubusercontent.com/44789fb81b8343c085350e92cadbbcb7471c0e77f41177358b070805756aee50/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f31656261636531632d626531622d346135332d626566382d3738643931306161323230302f6d696e692e706e67)](https://insight.sensiolabs.com/projects/1ebace1c-be1b-4a53-bef8-78d910aa2200)[![Build Status](https://camo.githubusercontent.com/acf01d3202301cfae128a805a9506c551ac87778088dc122e9af885bf9700a32/68747470733a2f2f7472617669732d63692e6f72672f62656e6174657370696e612f537461636b45786368616e6765417069436c69656e742e737667)](https://travis-ci.org/benatespina/StackExchangeApiClient)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/63c55c371a283f57b35bb35e1385de3faf9389f6fd158317a4352268d933ebb9/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f62656e6174657370696e612f537461636b45786368616e6765417069436c69656e742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/benatespina/StackExchangeApiClient/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/345158f64e7e78a6386cbc19b0db3d6bac8113f851d4bd642f527f7a13927b80/68747470733a2f2f706f7365722e707567782e6f72672f62656e6174657370696e612f737461636b2d65786368616e67652d6170692d636c69656e742f646f776e6c6f6164732e737667)](https://packagist.org/packages/benatespina/stack-exchange-api-client)[![Latest Stable Version](https://camo.githubusercontent.com/8f4f949f5245f3bcef327d10b3e4a9893a8163c6b3b44de6d8bca192b1b9aad5/68747470733a2f2f706f7365722e707567782e6f72672f62656e6174657370696e612f737461636b2d65786368616e67652d6170692d636c69656e742f762f737461626c652e737667)](https://packagist.org/packages/benatespina/stack-exchange-api-client)[![Latest Unstable Version](https://camo.githubusercontent.com/89f19eb4439b5a164a08c62e2ad49f0569e5f7aafed272a080dc3017582d31df/68747470733a2f2f706f7365722e707567782e6f72672f62656e6174657370696e612f737461636b2d65786368616e67652d6170692d636c69656e742f762f756e737461626c652e737667)](https://packagist.org/packages/benatespina/stack-exchange-api-client)

Requirements
------------

[](#requirements)

PHP &gt;= 7.1

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

[](#installation)

The easiest way to install this bundle is using [Composer](http://getcomposer.org)

```
$ composer require benatespina/stack-exchange-api-client
```

Usage
-----

[](#usage)

If you check out the [API documentation](http://api.stackexchange.com/docs), you will see that there are some calls that do not need authentication, but nevertheless there are other calls that need it so, this library allows to instantiate StackExchange client with or without Authentication. Furthermore there two ways to use this library.

### Default usage

[](#default-usage)

```
