{"id":34013735,"url":"https://github.com/vvoleman/zotero-php-wrapper","last_synced_at":"2026-06-01T00:31:39.793Z","repository":{"id":42708881,"uuid":"473732047","full_name":"vvoleman/zotero-php-wrapper","owner":"vvoleman","description":"PHP wrapper for Zotero API","archived":false,"fork":false,"pushed_at":"2022-10-25T08:40:46.000Z","size":65,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-15T01:51:52.690Z","etag":null,"topics":["php","wrapper","zotero","zotero-api"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vvoleman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-24T18:42:39.000Z","updated_at":"2023-12-12T19:39:53.000Z","dependencies_parsed_at":"2022-09-23T19:01:53.819Z","dependency_job_id":null,"html_url":"https://github.com/vvoleman/zotero-php-wrapper","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/vvoleman/zotero-php-wrapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvoleman%2Fzotero-php-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvoleman%2Fzotero-php-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvoleman%2Fzotero-php-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvoleman%2Fzotero-php-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vvoleman","download_url":"https://codeload.github.com/vvoleman/zotero-php-wrapper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvoleman%2Fzotero-php-wrapper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33755369,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["php","wrapper","zotero","zotero-api"],"created_at":"2025-12-13T13:40:31.615Z","updated_at":"2026-06-01T00:31:39.777Z","avatar_url":"https://github.com/vvoleman.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Zotero PHP Wrapper\r\n=============\r\n\r\nPHP wrapper for citation software Zotero\r\n\r\nFeatures\r\n------------\r\n\r\nObject-oriented approach. Since I don't know the full scale of API, I can painlessly add new endpoints and stuffs\r\n\r\nInstallation\r\n------------\r\n\r\n`composer require vvoleman/zotero-php-wrapper`\r\n\r\n\r\nUsage\r\n-----\r\n\r\n- [Connect to Zotero](#connect-to-zotero)\r\n\t- [Get API key](#get-api-key)\r\n\t- [Create instance](#create-instance)\r\n\r\n## Connect to Zotero\r\n\r\nTo use Zotero's API, you need to generate API key.\r\n\r\n### Get API key\r\n\r\nLog into your Zotero account and access [Feeds/API](https://www.zotero.org/settings/keys) part of profile settings and\r\nclick **Create new private key**.\r\n\r\nNext, you can specify what permissions will this API key have. Save your API key, since you won't be able to retrieve it\r\nafter you leave this page.\r\n\r\n### Create instance\r\n\r\nHop into your code and create some whooshing wrapper instance.\r\n\r\n```php\r\n$api = new ZoteroApi(\"YOUR_API_KEY\",new KeysSource(\"YOUR_API_KEY\"));\r\n$api-\u003erun();\r\n$data = $api-\u003egetBody();\r\n```\r\n\r\nLet's explain it a bit.\r\n`ZoteroApi` instance requires API key for authentication and source.\r\n\r\nSource is main branch from which we want to retrieve our data. So far, there are:\r\n\r\n- `UsersSource`/`GroupSource`\r\n\t- All your precious collections and items are linked to a user or to group. Working with both them is a same.\r\n\t- After you create your `UsersSource`/`GroupSource` instance, you set endpoints to them\r\n\t  with `ZoteroApi::setEndpoint()`, which takes as a parameter instance of AbstractEndpoint\r\n\r\n    ```php\r\n      $api = new ZoteroApi($_ENV[\"API_KEY\"], new UsersSource(\"YOUR_USER_ID\"));\r\n      $api-\u003esetEndpoint(\r\n          (new Collections(\"COLLECTION_ID\"))\r\n                -\u003esetEndpoint(new Items(AbstractEndpoint::ALL))\r\n      );\r\n    ```\r\n\r\n\t- AbstractEndpoint can chain another AbstractEndpoint - think of it like you can add `/items` to `/collections/ID`.\r\n\t  However, there are limits to chaining. You can't add `/items` to `/collections` - you have to specify specific\r\n\t  collection.\r\n\t- So, here are possible chainings (not all, but you get the idea):\r\n\t\t- `Collections(\"ID\")` -\u003e `Items(\u003cAll options\u003e)`\r\n\t\t\t- `Collections(\"ID\")` -\u003e `Items(\"ID\")` -\u003e `Tags(\"ID\")`\r\n\t\t\t- `Collections(\"ID\")` -\u003e `Items(\"ID\")` -\u003e `Tags(AbstractEndpoint::ALL)`\r\n\t- AbstractEndpoint takes as a constructor parameter a string value that specifies what you want to search\r\n\t\t- `AbstractEndpoint::ALL` - All results\r\n\t\t- `AbstractEndpoint::TOP` - Top-level results only\r\n\t\t- `AbstractEndpoint::TRASH` - Results in trash\r\n\t\t- `\"ID\"` - Specific ID of Endpoint\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvvoleman%2Fzotero-php-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvvoleman%2Fzotero-php-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvvoleman%2Fzotero-php-wrapper/lists"}