PHPackages                             philbone/twittersearch - 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. philbone/twittersearch

ActivePackage[API Development](/categories/api)

philbone/twittersearch
======================

A package for Twitter search API.

09PHP

Since May 21Pushed 8y ago1 watchersCompare

[ Source](https://github.com/philbone/twittersearch)[ Packagist](https://packagist.org/packages/philbone/twittersearch)[ RSS](/packages/philbone-twittersearch/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)DependenciesVersions (1)Used By (0)

About Switter
=============

[](#about-switter)

[![Build Status](https://camo.githubusercontent.com/14781e6fa9c58b3c5c2444b04be9311d6a2d33d795cf6a6b8364c473e063ce22/68747470733a2f2f7472617669732d63692e6f72672f7068696c626f6e652f747769747465727365617263682e737667)](https://travis-ci.org/philbone/twittersearch)

Switter is a package for Twitter search API.

Index
-----

[](#index)

1. [Requirements](#requirements)
2. [Installation](#installation)
3. [How to use](#how-to-use)
    1. [Example](#example-)
4. [Running a Test](#how-to-run-test-searchtest-php)

### Requirements

[](#requirements)

- PHP 7.1 or higer.
- [Guzzle](https://github.com/guzzle/guzzle) PHP HTTP client.
- Twitter API Keys from [Twitter Apps](https://apps.twitter.com/)

### Installation

[](#installation)

Clone repository from GitHub

```
$ git clone https://github.com/philbone/twittersearch.git switter

```

Inside the directory where Switter is installed, open the terminal and run "composer install" to get the dependencies.

```
$ composer install

```

### How to use

[](#how-to-use)

- Import definition.
- Make a new object from Search class.
- Set token with your API keys.
- Set some value to search.
- Search the value.

#### Example:

[](#example)

```
use Twitter\Search\Search;

$apiKey = "jLl8hRLXY3xEPHGnx7UndxrcV"; // replace with your own api key.
$apiSecret = "8erBjpOra7GCGkHOK3YbTcqoKTQBSyKgljgG4MCDZi5cKRb7op"; // replace with your own api secret.

$search = new Search();

$search->setToken($apiKey, $apiSecret);

$value = ["q" => "#PHP #Composer"];

$response = $search->search($value);

var_dump($response);

```

A detailed test example can be found in test/SearchTest.php. Pay special attention to the sample method "testSuccessSearch".

### How to run Test SearchTest.php

[](#how-to-run-test-searchtestphp)

Assuming that PHPUnit was installed as a dependency, simply open the terminal from the directory where Switter is installed and run it:

```
$ phpunit

```

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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://avatars.githubusercontent.com/u/15118498?v=4)[Phil](/maintainers/philbone)[@philbone](https://github.com/philbone)

---

Top Contributors

[![philbone](https://avatars.githubusercontent.com/u/15118498?v=4)](https://github.com/philbone "philbone (20 commits)")

### Embed Badge

![Health badge](/badges/philbone-twittersearch/health.svg)

```
[![Health](https://phpackages.com/badges/philbone-twittersearch/health.svg)](https://phpackages.com/packages/philbone-twittersearch)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

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