# 🚀 PyBoostyAPI
**PyBoostyAPI** is a powerful asynchronous Python library for seamless interaction with [Boosty.to](https://boosty.to) through its internal API. It supports posts, subscribers, dialogs, sales, donations, and detailed statistics.



PyPi page
https://pypi.org/project/PyBoostyApi/
---
## ✨ Features
- 🔐 Authentication with token auto-refresh
- 📬 User dialog handling
- 📊 Fetching statistics and sales data
- 💬 Get free and paid subscribers
- 📝 Create and delete posts
- 💰 Get donation and subscription tier info
---
## ⚙️ Installation
```bash
pip install PyBoostyApi
````
Or manually:
```bash
git clone https://github.com/HOCKI1/py_boosty_api.git
cd py_boosty_api
pip install .
```
---
## 🔧 Basic Usage Example
```python
import asyncio
from boosty_api import BoostyAPI
async def main():
api = await BoostyAPI.create("auth.json")
try:
href = await api.get_blog_href()
print("🔗 Blog href:", href)
stats = await api.get_blog_stats() # Get stats of your Blog
print("📊 Stats:", stats)
finally:
await api.close()
if __name__ == "__main__":
asyncio.run(main())
```
---
## 🗂 `auth.json` Structure
```json
{
"access_token": "your_token",
"refresh_token": "your_refresh_token",
"expiresAt": 1722193100,
"isEmptyUser": "0",
"redirectAppId": "web",
"_clientId": "your_uuid"
}
```
To get this data:
- Copy script below to Tampermonkey
```
// ==UserScript==
// @name Boosty Auth Extractor
// @namespace https://boosty.to/
// @version 2.1
// @description Экспорт полного auth.json
// @author HOCKI1
// @match https://boosty.to/*
// @grant none
// ==/UserScript==
(function () {
'use strict';
function createExportButton() {
if (document.getElementById("export-auth-btn")) return;
const btn = document.createElement("button");
btn.id = "export-auth-btn";
btn.textContent = "📦 Сохранить auth.json";
btn.style.position = "fixed";
btn.style.bottom = "20px";
btn.style.right = "20px";
btn.style.zIndex = "9999";
btn.style.padding = "10px 14px";
btn.style.backgroundColor = "#ff7f00";
btn.style.color = "#fff";
btn.style.border = "none";
btn.style.borderRadius = "8px";
btn.style.cursor = "pointer";
btn.style.fontSize = "14px";
btn.style.boxShadow = "0 4px 8px rgba(0, 0, 0, 0.2)";
btn.onclick = () => {
try {
const authRaw = localStorage.getItem("auth");
const clientId = localStorage.getItem("_clientId");
if (!authRaw) {
alert("❌ Не найден ключ 'auth' в localStorage");
return;
}
if (!clientId) {
alert("❌ Не найден ключ '_clientId' в localStorage");
return;
}
const auth = JSON.parse(authRaw);
// Гарантируем наличие нужных полей
auth["_clientId"] = clientId;
if (!auth.hasOwnProperty("isEmptyUser")) {
auth["isEmptyUser"] = "0";
}
if (!auth.hasOwnProperty("redirectAppId")) {
auth["redirectAppId"] = "web";
}
const blob = new Blob([JSON.stringify(auth, null, 2)], { type: "application/json" });
const link = document.createElement("a");
link.href = URL.createObjectURL(blob);
link.download = "auth.json";
link.click();
} catch (e) {
alert("❌ Ошибка при экспорте auth.json: " + e.message);
console.error(e);
}
};
document.body.appendChild(btn);
}
const interval = setInterval(() => {
if (document.body) {
clearInterval(interval);
createExportButton();
}
}, 500);
})();
```
- Login to Boosty
- Press button "Сохранить auth.json" in bottom right corner
- Profit!
---
## 📌 TODO
* [x] Posts
* [x] Subscribers
* [ ] Dialogs
* [x] Donations
* [x] Sales
* [x] Auto token refresh
* [x] Media content (albums, images)
* [ ] More common usable functions
---
## 📄 License
This project is licensed under the **MIT License**. See `LICENSE` for details.
---
## 🤝 Contact
Author: [HOCKI1](https://github.com/HOCKI1)
Email: [hocki1.official@yandex.ru](mailto:hocki1.official@yandex.ru)
Made with ❤️ for the Boosty creator community.
Raw data
{
"_id": null,
"home_page": "https://github.com/HOCKI1/py_boosty_api",
"name": "PyBoostyApi",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "boosty api async aiohttp donations subscribers",
"author": "HOCKI1",
"author_email": "hocki1.official@yandex.ru",
"download_url": "https://files.pythonhosted.org/packages/75/a5/81ec8f57c135b2bcd67039a388848b11b166d5c5e384a30a7c715e432b49/pyboostyapi-1.0.6.tar.gz",
"platform": null,
"description": "\n# \ud83d\ude80 PyBoostyAPI\n\n**PyBoostyAPI** is a powerful asynchronous Python library for seamless interaction with [Boosty.to](https://boosty.to) through its internal API. It supports posts, subscribers, dialogs, sales, donations, and detailed statistics.\n\n\n\n\n\nPyPi page\nhttps://pypi.org/project/PyBoostyApi/\n\n---\n\n## \u2728 Features\n\n- \ud83d\udd10 Authentication with token auto-refresh\n- \ud83d\udcec User dialog handling\n- \ud83d\udcca Fetching statistics and sales data\n- \ud83d\udcac Get free and paid subscribers\n- \ud83d\udcdd Create and delete posts\n- \ud83d\udcb0 Get donation and subscription tier info\n\n---\n\n## \u2699\ufe0f Installation\n\n```bash\npip install PyBoostyApi\n````\n\nOr manually:\n\n```bash\ngit clone https://github.com/HOCKI1/py_boosty_api.git\ncd py_boosty_api\npip install .\n```\n\n---\n\n## \ud83d\udd27 Basic Usage Example\n\n```python\nimport asyncio\nfrom boosty_api import BoostyAPI\n\nasync def main():\n api = await BoostyAPI.create(\"auth.json\")\n try:\n href = await api.get_blog_href()\n print(\"\ud83d\udd17 Blog href:\", href)\n\n stats = await api.get_blog_stats() # Get stats of your Blog\n print(\"\ud83d\udcca Stats:\", stats)\n\n finally:\n await api.close()\n\nif __name__ == \"__main__\":\n asyncio.run(main())\n\n```\n\n---\n\n## \ud83d\uddc2 `auth.json` Structure\n\n```json\n{\n \"access_token\": \"your_token\",\n \"refresh_token\": \"your_refresh_token\",\n \"expiresAt\": 1722193100,\n \"isEmptyUser\": \"0\",\n \"redirectAppId\": \"web\",\n \"_clientId\": \"your_uuid\"\n}\n```\nTo get this data:\n- Copy script below to Tampermonkey\n\n```\n// ==UserScript==\n// @name Boosty Auth Extractor\n// @namespace https://boosty.to/\n// @version 2.1\n// @description \u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u043f\u043e\u043b\u043d\u043e\u0433\u043e auth.json\n// @author HOCKI1\n// @match https://boosty.to/*\n// @grant none\n// ==/UserScript==\n\n(function () {\n 'use strict';\n\n function createExportButton() {\n if (document.getElementById(\"export-auth-btn\")) return;\n\n const btn = document.createElement(\"button\");\n btn.id = \"export-auth-btn\";\n btn.textContent = \"\ud83d\udce6 \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c auth.json\";\n btn.style.position = \"fixed\";\n btn.style.bottom = \"20px\";\n btn.style.right = \"20px\";\n btn.style.zIndex = \"9999\";\n btn.style.padding = \"10px 14px\";\n btn.style.backgroundColor = \"#ff7f00\";\n btn.style.color = \"#fff\";\n btn.style.border = \"none\";\n btn.style.borderRadius = \"8px\";\n btn.style.cursor = \"pointer\";\n btn.style.fontSize = \"14px\";\n btn.style.boxShadow = \"0 4px 8px rgba(0, 0, 0, 0.2)\";\n\n btn.onclick = () => {\n try {\n const authRaw = localStorage.getItem(\"auth\");\n const clientId = localStorage.getItem(\"_clientId\");\n\n if (!authRaw) {\n alert(\"\u274c \u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d \u043a\u043b\u044e\u0447 'auth' \u0432 localStorage\");\n return;\n }\n if (!clientId) {\n alert(\"\u274c \u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d \u043a\u043b\u044e\u0447 '_clientId' \u0432 localStorage\");\n return;\n }\n\n const auth = JSON.parse(authRaw);\n\n // \u0413\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043d\u0443\u0436\u043d\u044b\u0445 \u043f\u043e\u043b\u0435\u0439\n auth[\"_clientId\"] = clientId;\n if (!auth.hasOwnProperty(\"isEmptyUser\")) {\n auth[\"isEmptyUser\"] = \"0\";\n }\n if (!auth.hasOwnProperty(\"redirectAppId\")) {\n auth[\"redirectAppId\"] = \"web\";\n }\n\n const blob = new Blob([JSON.stringify(auth, null, 2)], { type: \"application/json\" });\n const link = document.createElement(\"a\");\n link.href = URL.createObjectURL(blob);\n link.download = \"auth.json\";\n link.click();\n } catch (e) {\n alert(\"\u274c \u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435 auth.json: \" + e.message);\n console.error(e);\n }\n };\n\n document.body.appendChild(btn);\n }\n\n const interval = setInterval(() => {\n if (document.body) {\n clearInterval(interval);\n createExportButton();\n }\n }, 500);\n})();\n```\n- Login to Boosty\n- Press button \"\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c auth.json\" in bottom right corner\n- Profit!\n\n---\n\n## \ud83d\udccc TODO\n\n* [x] Posts\n* [x] Subscribers\n* [ ] Dialogs\n* [x] Donations\n* [x] Sales\n* [x] Auto token refresh\n* [x] Media content (albums, images)\n* [ ] More common usable functions\n\n---\n\n## \ud83d\udcc4 License\n\nThis project is licensed under the **MIT License**. See `LICENSE` for details.\n\n---\n\n## \ud83e\udd1d Contact\n\nAuthor: [HOCKI1](https://github.com/HOCKI1)\nEmail: [hocki1.official@yandex.ru](mailto:hocki1.official@yandex.ru)\nMade with \u2764\ufe0f for the Boosty creator community.\n\n",
"bugtrack_url": null,
"license": null,
"summary": "PyBoostyAPI is a powerful asynchronous Python library for seamless interaction with the Boosty.to API",
"version": "1.0.6",
"project_urls": {
"Homepage": "https://github.com/HOCKI1/py_boosty_api",
"Source": "https://github.com/HOCKI1/py_boosty_api",
"Tracker": "https://github.com/HOCKI1/py_boosty_api/issues"
},
"split_keywords": [
"boosty",
"api",
"async",
"aiohttp",
"donations",
"subscribers"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "a8432ed85931f0c18d9ee2252c10e63b4d4fb50d49f57be70409b53cc7014a1b",
"md5": "3c5af6974d82721981c74157f2eb65f3",
"sha256": "3fe407def0fb657ed3906c380353e4263195b5d598e68d855d5b141c20c0b0cf"
},
"downloads": -1,
"filename": "pyboostyapi-1.0.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3c5af6974d82721981c74157f2eb65f3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 8722,
"upload_time": "2025-08-07T10:12:41",
"upload_time_iso_8601": "2025-08-07T10:12:41.375981Z",
"url": "https://files.pythonhosted.org/packages/a8/43/2ed85931f0c18d9ee2252c10e63b4d4fb50d49f57be70409b53cc7014a1b/pyboostyapi-1.0.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "75a581ec8f57c135b2bcd67039a388848b11b166d5c5e384a30a7c715e432b49",
"md5": "92e768241f9bad8714ab72422612fbd9",
"sha256": "d4f34c3c71bc30fa0b33417c84c6204201bd90f1f9c9f3189a212867ceff9952"
},
"downloads": -1,
"filename": "pyboostyapi-1.0.6.tar.gz",
"has_sig": false,
"md5_digest": "92e768241f9bad8714ab72422612fbd9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 8506,
"upload_time": "2025-08-07T10:12:42",
"upload_time_iso_8601": "2025-08-07T10:12:42.502728Z",
"url": "https://files.pythonhosted.org/packages/75/a5/81ec8f57c135b2bcd67039a388848b11b166d5c5e384a30a7c715e432b49/pyboostyapi-1.0.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-07 10:12:42",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "HOCKI1",
"github_project": "py_boosty_api",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pyboostyapi"
}