PHPackages                             vvoleman/zotero-php-wrapper - 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. vvoleman/zotero-php-wrapper

ActiveLibrary[API Development](/categories/api)

vvoleman/zotero-php-wrapper
===========================

Zotero API wrapper for PHP

v0.01.2(4y ago)038MITPHPPHP ^8.0

Since Mar 27Pushed 3y ago1 watchersCompare

[ Source](https://github.com/vvoleman/zotero-php-wrapper)[ Packagist](https://packagist.org/packages/vvoleman/zotero-php-wrapper)[ RSS](/packages/vvoleman-zotero-php-wrapper/feed)WikiDiscussions main Synced 1w ago

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

Zotero PHP Wrapper
==================

[](#zotero-php-wrapper)

PHP wrapper for citation software Zotero

Features
--------

[](#features)

Object-oriented approach. Since I don't know the full scale of API, I can painlessly add new endpoints and stuffs

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

[](#installation)

`composer require vvoleman/zotero-php-wrapper`

Usage
-----

[](#usage)

- [Connect to Zotero](#connect-to-zotero)
    - [Get API key](#get-api-key)
    - [Create instance](#create-instance)

Connect to Zotero
-----------------

[](#connect-to-zotero)

To use Zotero's API, you need to generate API key.

### Get API key

[](#get-api-key)

Log into your Zotero account and access [Feeds/API](https://www.zotero.org/settings/keys) part of profile settings and click **Create new private key**.

Next, you can specify what permissions will this API key have. Save your API key, since you won't be able to retrieve it after you leave this page.

### Create instance

[](#create-instance)

Hop into your code and create some whooshing wrapper instance.

```
$api = new ZoteroApi("YOUR_API_KEY",new KeysSource("YOUR_API_KEY"));
$api->run();
$data = $api->getBody();
```

Let's explain it a bit. `ZoteroApi` instance requires API key for authentication and source.

Source is main branch from which we want to retrieve our data. So far, there are:

- `UsersSource`/`GroupSource`

    - All your precious collections and items are linked to a user or to group. Working with both them is a same.
    - After you create your `UsersSource`/`GroupSource` instance, you set endpoints to them with `ZoteroApi::setEndpoint()`, which takes as a parameter instance of AbstractEndpoint

    ```
      $api = new ZoteroApi($_ENV["API_KEY"], new UsersSource("YOUR_USER_ID"));
      $api->setEndpoint(
          (new Collections("COLLECTION_ID"))
                ->setEndpoint(new Items(AbstractEndpoint::ALL))
      );
    ```

    - AbstractEndpoint can chain another AbstractEndpoint - think of it like you can add `/items` to `/collections/ID`. However, there are limits to chaining. You can't add `/items` to `/collections` - you have to specify specific collection.
    - So, here are possible chainings (not all, but you get the idea):
        - `Collections("ID")` -&gt; `Items()`
            - `Collections("ID")` -&gt; `Items("ID")` -&gt; `Tags("ID")`
            - `Collections("ID")` -&gt; `Items("ID")` -&gt; `Tags(AbstractEndpoint::ALL)`
    - AbstractEndpoint takes as a constructor parameter a string value that specifies what you want to search
        - `AbstractEndpoint::ALL` - All results
        - `AbstractEndpoint::TOP` - Top-level results only
        - `AbstractEndpoint::TRASH` - Results in trash
        - `"ID"` - Specific ID of Endpoint

###  Health Score

23

—

LowBetter than 25% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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.

###  Release Activity

Cadence

Every ~0 days

Total

5

Last Release

1602d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/79625501?v=4)[Vojtěch Voleman](/maintainers/vvoleman)[@vvoleman](https://github.com/vvoleman)

---

Top Contributors

[![vvoleman](https://avatars.githubusercontent.com/u/79625501?v=4)](https://github.com/vvoleman "vvoleman (14 commits)")

---

Tags

phpwrapperzoterozotero-api

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/vvoleman-zotero-php-wrapper/health.svg)

```
[![Health](https://phpackages.com/badges/vvoleman-zotero-php-wrapper/health.svg)](https://phpackages.com/packages/vvoleman-zotero-php-wrapper)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.9k556.2M21.4k](/packages/laravel-framework)[tempest/framework

The PHP framework that gets out of your way.

2.3k37.6k21](/packages/tempest-framework)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.3M49](/packages/tencentcloud-tencentcloud-sdk-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

353.6k](/packages/eslazarev-wildberries-sdk)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1349.3k1](/packages/jasara-php-amzn-selling-partner-api)[lion/bundle

Lion-framework configuration and initialization package

132.4k5](/packages/lion-bundle)

PHPackages © 2026

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