PHPackages                             tschucki/laravel-pr0gramm-api - 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. tschucki/laravel-pr0gramm-api

ActiveLibrary[API Development](/categories/api)

tschucki/laravel-pr0gramm-api
=============================

Use Pr0gramm API

1.0.7(8mo ago)01.0k[2 PRs](https://github.com/Tschucki/laravel-pr0gramm-api/pulls)1MITPHPPHP ^8.1CI failing

Since Jul 16Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/Tschucki/laravel-pr0gramm-api)[ Packagist](https://packagist.org/packages/tschucki/laravel-pr0gramm-api)[ Docs](https://github.com/tschucki/laravel-pr0gramm-api)[ RSS](/packages/tschucki-laravel-pr0gramm-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (12)Versions (12)Used By (1)

Laravel Pr0gramm API
====================

[](#laravel-pr0gramm-api)

[![Latest Version on Packagist](https://camo.githubusercontent.com/cf1f663076485247e050d0f9ce86a80334095055315a6a4eaac359d43b06c4c4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7473636875636b692f6c61726176656c2d7072306772616d6d2d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tschucki/laravel-pr0gramm-api)[![GitHub Tests Action Status](https://camo.githubusercontent.com/e9fda6c5618635f06e9c2e80b90545ed37e07983e50e48d017bc8fed06f4e15d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7473636875636b692f6c61726176656c2d7072306772616d6d2d6170692f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/tschucki/laravel-pr0gramm-api/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/c0dbeee3d2678f517faa994e8928d69f886f2b5d2cb066cf37532de24f6627fc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7473636875636b692f6c61726176656c2d7072306772616d6d2d6170692f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/tschucki/laravel-pr0gramm-api/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/d8b6a59fa44eb5ef73db1bd9d6921791514e0b146873c718b8b85efdca5ec3d0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7473636875636b692f6c61726176656c2d7072306772616d6d2d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tschucki/laravel-pr0gramm-api)

This package provides a Laravel wrapper for the [Pr0gramm API](https://github.com/pr0gramm-com/api-docs) by [Pr0gramm](https://pr0gramm.com). This package is not affiliated with Pr0gramm. I created it for my own use on other projects.

I will try to keep this package up to date with the API and imporve it over time. If you find any bugs or have any suggestions, feel free to open an issue or a PR.

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

[](#installation)

You can install the package via composer:

```
composer require tschucki/laravel-pr0gramm-api
```

You don't need to publish any config files. The package will work out of the box. You just have to log in to Pr0gramm, to get some user related request. (For example conversations or votings)

But if you want to provide your pr0gramm cookie, you can add this to your `services.php`.

```
    'pr0gramm' => [
        'cookie' => env('PR0GRAMM_COOKIE'),
    ]
```

Usage
-----

[](#usage)

It is recommended to use the facade `Pr0grammApi` to access the API.

```
Pr0grammApi::User()->me();
```

You can access all endpoints of the API:

- User
- Post
- Tag
- Comment
- Contact
- Inbox
- Profile

Login to your account
---------------------

[](#login-to-your-account)

To log in to your account, you can use the `login` method. It will create a new Session and stores the cookie for you. Afterwards you don't need to provide the cookie on every request. When using a non-bot account, you have to provide a captcha and token parameter (You can get the captcha and token via `Pr0grammApi::Captcha`).

You can ignore this, when you already provided the cookie in your `services.php`. You can copy your Cookie from the Dev-Tools, while logged in for example.

```
Pr0grammApi::login('Gamb', 'Quatschtütenwürger25')
```

Logout of your account
----------------------

[](#logout-of-your-account)

Logging out will delete the session and the cookie. You have to log in again, to access user related endpoints. Otherwise, you will get an Exception.

```
Pr0grammApi::logout()
```

### Examples

[](#examples)

#### Retrieving the current user

[](#retrieving-the-current-user)

```
$currentUser = Pr0grammApi::User()->me();
```

#### Retrieving info about a user

[](#retrieving-info-about-a-user)

```
$userInfo = Pr0grammApi::User()->info('Gamb');
```

#### Voting a post

[](#voting-a-post)

```
use Tschucki\Pr0grammApi\Enums\Vote;

Pr0grammApi::Post()->vote(1, Vote::UP);
```

#### Add a comment

[](#add-a-comment)

```
// Add comment to post with id 1
Pr0grammApi::Comment()->add(1, 'Das Ablecken von Türknöpfen ist auf anderen Planeten illegal.');

// Add comment to another comment
Pr0grammApi::Comment()->add(1, 'Ich bin ne gute Nudel', 22);
```

#### Get Comments from Inbox

[](#get-comments-from-inbox)

```
Pr0grammApi::Inbox()->comments();
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

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

[](#contributing)

Feel free to open a PR or an issue. I will try to respond as soon as possible.

Credits
-------

[](#credits)

- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance60

Regular maintenance activity

Popularity16

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

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

Every ~110 days

Recently: every ~193 days

Total

8

Last Release

256d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dc149b9eb108a5903ebab8c27a89cc08ff38752585888224a58f2f00377fa8d0?d=identicon)[Tschucki](/maintainers/Tschucki)

---

Top Contributors

[![Tschucki](https://avatars.githubusercontent.com/u/43211841?v=4)](https://github.com/Tschucki "Tschucki (34 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")

---

Tags

apilaravelpackagepr0grammlaravelTschuckilaravel-pr0gramm-api

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/tschucki-laravel-pr0gramm-api/health.svg)

```
[![Health](https://phpackages.com/badges/tschucki-laravel-pr0gramm-api/health.svg)](https://phpackages.com/packages/tschucki-laravel-pr0gramm-api)
```

###  Alternatives

[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.0k7.8M57](/packages/dedoc-scramble)[scalar/laravel

Render your OpenAPI-based API reference

6183.9k2](/packages/scalar-laravel)[ryangjchandler/bearer

Minimalistic token-based authentication for Laravel API endpoints.

8129.8k](/packages/ryangjchandler-bearer)[combindma/laravel-facebook-pixel

Meta pixel integration for Laravel

4956.9k](/packages/combindma-laravel-facebook-pixel)[stechstudio/laravel-hubspot

A Laravel SDK for the HubSpot CRM Api

2971.0k](/packages/stechstudio-laravel-hubspot)[njoguamos/laravel-plausible

A laravel package for interacting with plausible analytics api.

208.8k](/packages/njoguamos-laravel-plausible)

PHPackages © 2026

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