PHPackages                             backendtea/fourchanapi - 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. backendtea/fourchanapi

AbandonedArchivedLibrary[API Development](/categories/api)

backendtea/fourchanapi
======================

A php wrapper for the 4chan api

v1.0.0(8y ago)034MITPHPPHP &gt;=5.6

Since Oct 20Pushed 8y ago1 watchersCompare

[ Source](https://github.com/BackEndTea/FourChanApi)[ Packagist](https://packagist.org/packages/backendtea/fourchanapi)[ RSS](/packages/backendtea-fourchanapi/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (4)Versions (3)Used By (0)

FourChanApi
===========

[](#fourchanapi)

[![Build Status](https://camo.githubusercontent.com/21ac651ef3030b6988d552f39290952c9c6264c72887eb6883fc0da7e6eac926/68747470733a2f2f7472617669732d63692e6f72672f4261636b456e645465612f466f75724368616e4170692e706e67)](https://travis-ci.org/BackEndTea/FourChanApi)[![Code Climate](https://camo.githubusercontent.com/52af9841c178de8be2ea0e3f72c9eeca4622bd1206cd05ba0fa5b21a744ec523/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f4261636b456e645465612f466f75724368616e4170692e706e67)](https://codeclimate.com/github/BackEndTea/FourChanApi)[![Code Climate](https://camo.githubusercontent.com/c438b0042428ba7ebd10af5f99a37f9653276c5fdff2feb19c18975edd8bd2ee/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f4261636b456e645465612f466f75724368616e4170692f6261646765732f69737375655f636f756e742e737667)](https://codeclimate.com/github/BackEndTea/FourChanApi)[![Code Climate](https://camo.githubusercontent.com/19fec1a83c75c15640693e96adf83f7dc135ce92d1640cd9bae52fc18b90f541/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f4261636b456e645465612f466f75724368616e4170692f636f7665726167652e737667)](https://codeclimate.com/github/BackEndTea/FourChanApi/coverage)

A PHP api wrapper for the 4chan api.

Please see  for usage rules.

Instalation
-----------

[](#instalation)

Run `composer require backendtea/fourchanapi ^1.0` For information about Composer check out their [website](https://getcomposer.org/)

Usage
-----

[](#usage)

Get a list off all the Thread #'s of /v/

```
use FourChan\FourChan;

FourChan::board('v')->getThreads();
```

Grab all the images of the first thread we find on /v/

```
use FourChan\FourChan;

$posts = FourChan::board('v')->getThreads()[0]->getPosts();

foreach($posts as $post) {
    if ($post->hasimage() {
        echo $post->getImageUrl();
    }
}
```

Any function related to getting image information throws a ` FourChan\Util\NoImageException` when there is no image. So another way would be:

```
$posts = FourChan::board('a')->getThreads()[0]->getPosts();

foreach($posts as $post) {
    try{
        echo $post->getImageUrl();
    } catch(NoImageException $e) {
        //do nothing
    }
}
```

Get the information of a thread

```
$thread = FourChan::board('a')->getThreads()[0];

// true or false
$thread->isStick();
//true or false
$thread->isClosed();
//true or false
$thread->isArchived();
//Subject or '' if no subject is set.
$thread->getSubject();
//# of OP
$thread->getID();
```

Get the information of a post

```
$post = FourChan::board('a')->getThreads()[0]->getPosts()[0];
//Comment of the post, including escaped html.
$post->getFullComment();
//# of the post
$post->getID();
```

If you need more functionality, either make it yourself and shoot me a PR, or create an issue on [Github](https://github.com/BackEndTea/FourChanApi) and hope me or someone else does it for you.

Contributing
------------

[](#contributing)

Features, bug fixes etc are welcome, please check the [Contributing.md](CONTRIBUTING.md) for more info

Note
----

[](#note)

All of fake responses have been grabbed from live threads on 4chan, they do not necessarily represent my views, or of anyone who has worked on this project.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.8% 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3128d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/14289961?v=4)[Gert de Pagter](/maintainers/BackEndTea)[@BackEndTea](https://github.com/BackEndTea)

---

Top Contributors

[![BackEndTea](https://avatars.githubusercontent.com/u/14289961?v=4)](https://github.com/BackEndTea "BackEndTea (23 commits)")[![FrontEndCoffee](https://avatars.githubusercontent.com/u/16303480?v=4)](https://github.com/FrontEndCoffee "FrontEndCoffee (1 commits)")

---

Tags

api4chan

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/backendtea-fourchanapi/health.svg)

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

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[mailchimp/transactional

458.9M16](/packages/mailchimp-transactional)[get-stream/stream-chat

A PHP client for Stream Chat (https://getstream.io/chat/)

301.8M2](/packages/get-stream-stream-chat)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)

PHPackages © 2026

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