notebooklm-api-client 0.1.291 → 0.1.293

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/readme.md +116 -125
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "notebooklm-api-client",
3
- "version": "0.1.291",
3
+ "version": "0.1.293",
4
4
  "description": "NotebookLM API via Cloudflare Containers — on-demand Python sandbox that sleeps when idle",
5
5
  "author": "vtempest <grokthiscontact@gmail.com>",
6
6
  "license": "rights.institute/PROSPER",
package/readme.md CHANGED
@@ -1,129 +1,120 @@
1
+ <!-- template-git-repo:badges:start -->
1
2
  <p align="center">
2
- <br />
3
- <a href="https://www.npmjs.com/package/notebooklm-api-client"><img src="https://img.shields.io/npm/dm/notebooklm-api-client.svg" alt="NPM Monthly Downloads"></a>
4
- <a href="https://www.npmjs.com/package/notebooklm-api-client"><img src="https://img.shields.io/npm/v/notebooklm-api-client.svg" alt="npm version"></a>
5
- <a href="https://discord.gg/SJdBqBz3tV">
6
- <img src="https://img.shields.io/discord/1110227955554209923.svg?label=Chat&logo=Discord&colorB=7289da&style=flat"
7
- alt="Join Discord" />
8
- </a>
9
- <a href="https://github.com/vtempest/qwksearch-research-agent/discussions">
10
- <img alt="GitHub Stars" src="https://img.shields.io/github/stars/vtempest/qwksearch-research-agent" /></a>
11
- <br />
12
- <a href="https://github.com/vtempest/qwksearch-research-agent/discussions">
13
- <img alt="GitHub Discussions"
14
- src="https://img.shields.io/github/discussions/vtempest/qwksearch-research-agent" />
15
- </a>
16
- <a href="https://github.com/vtempest/qwksearch-research-agent/pulse" alt="Activity">
17
- <img src="https://img.shields.io/github/commit-activity/m/vtempest/qwksearch-research-agent" />
18
- </a>
19
- <img src="https://img.shields.io/github/last-commit/vtempest/qwksearch-research-agent.svg" alt="GitHub last commit" />
20
- <br />
21
- <a href="https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request">
22
- <img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg"
23
- alt="PRs Welcome" />
24
- </a>
25
- <a href="https://codespaces.new/vtempest/qwksearch-research-agent">
26
- <img src="https://github.com/codespaces/badge.svg" width="150" height="20" />
27
- </a>
28
- <a href="https://codecov.io/gh/OpenSourceAGI/qwksearch-research-agent"><img src="https://codecov.io/gh/OpenSourceAGI/qwksearch-research-agent/graph/badge.svg?component=package-notebooklm-api-client" alt="Coverage" /></a>
3
+ <a href="https://qwksearch.com/api/docs"><img src="https://img.shields.io/badge/Docs-blue?logo=ReadTheDocs&logoColor=white" alt="Documentation" /></a>
4
+ <a href="https://stackblitz.com/github/OpenSourceAGI/qwksearch-research-agent/tree/master/packages/notebooklm-api-client"><img height="20px" src="https://developer.stackblitz.com/img/open_in_stackblitz.svg" alt="Open in StackBlitz" /></a>
5
+ <br />
6
+ <a href="https://www.npmjs.com/package/notebooklm-api-client"><img src="https://img.shields.io/npm/dm/notebooklm-api-client.svg" alt="NPM Monthly Downloads" /></a>
7
+ <a href="https://www.npmjs.com/package/notebooklm-api-client"><img src="https://img.shields.io/npm/v/notebooklm-api-client.svg" alt="npm version" /></a>
8
+ <a href="https://www.npmjs.com/package/notebooklm-api-client"><img src="https://img.shields.io/npm/dt/notebooklm-api-client.svg" alt="NPM Total Downloads" /></a>
9
+ <a href="https://www.npmjs.com/package/notebooklm-api-client"><img src="https://img.shields.io/npm/types/notebooklm-api-client" alt="TypeScript types" /></a>
10
+ <a href="https://packagephobia.com/result?p=notebooklm-api-client"><img src="https://packagephobia.com/badge?p=notebooklm-api-client" alt="Install size" /></a>
11
+ <br />
12
+ <a href="https://github.com/OpenSourceAGI/qwksearch-research-agent/stargazers"><img src="https://img.shields.io/github/stars/OpenSourceAGI/qwksearch-research-agent" alt="GitHub Stars" /></a>
13
+ <a href="https://github.com/OpenSourceAGI/qwksearch-research-agent/issues"><img src="https://img.shields.io/github/issues/OpenSourceAGI/qwksearch-research-agent?logo=github" alt="GitHub Issues" /></a>
14
+ <a href="https://github.com/OpenSourceAGI/qwksearch-research-agent/pulls"><img src="https://img.shields.io/github/issues-pr/OpenSourceAGI/qwksearch-research-agent?logo=github&label=PRs" alt="Open Pull Requests" /></a>
15
+ <a href="https://github.com/OpenSourceAGI/qwksearch-research-agent/pulls?q=is%3Apr+is%3Aclosed"><img src="https://img.shields.io/github/issues-pr-closed/OpenSourceAGI/qwksearch-research-agent?logo=github&label=PRs%20merged&color=8957e5" alt="Merged Pull Requests" /></a>
16
+ <a href="https://github.com/OpenSourceAGI/qwksearch-research-agent/discussions"><img src="https://img.shields.io/github/discussions/OpenSourceAGI/qwksearch-research-agent" alt="GitHub Discussions" /></a>
17
+ <a href="https://github.com/OpenSourceAGI/qwksearch-research-agent/commits/master/"><img src="https://img.shields.io/github/last-commit/OpenSourceAGI/qwksearch-research-agent.svg" alt="GitHub last commit" /></a>
18
+ <br />
19
+ <img src="https://img.shields.io/badge/Bun-14151A?logo=bun&logoColor=white" alt="Bun" /> <img src="https://img.shields.io/badge/TypeScript-3178C6?logo=typescript&logoColor=white" alt="TypeScript" /> <img src="https://img.shields.io/badge/Cloudflare%20Workers-F38020?logo=cloudflareworkers&logoColor=white" alt="Cloudflare Workers" /> <img src="https://img.shields.io/badge/Vitest-6E9F18?logo=vitest&logoColor=white" alt="Vitest" />
29
20
  </p>
21
+ <!-- template-git-repo:badges:end -->
30
22
 
31
- # notebooklm-api
32
- <a href="https://stackblitz.com/github/OpenSourceAGI/qwksearch-research-agent/tree/master/packages/notebooklm-api-client"><img height="20px" src="https://developer.stackblitz.com/img/open_in_stackblitz.svg" alt="Open in StackBlitz" /></a>
33
-
34
- NotebookLM API powered by Cloudflare Containers. The Python sandbox runs on demand and sleeps after 5 minutes of inactivity to conserve costs.
35
-
36
- ## Architecture
37
-
38
- ```
39
- Request → Worker (auth + routing) → Container (notebooklm-py) → Response
40
- ↕
41
- sleeps when idle
42
- ```
43
-
44
- - **Worker** validates auth and routes requests to the container
45
- - **Container** runs `notebooklm-py` CLI in a Python 3.12 sandbox
46
- - Container auto-sleeps after `sleepAfter` (5m) — billing stops until next request
47
- - Container wakes transparently on next incoming request
48
-
49
- ## API
50
-
51
- All endpoints require `Authorization: Bearer <API_TOKEN>` header.
52
-
53
- ### POST /
54
-
55
- ```json
56
- { "action": "list" }
57
- ```
58
-
59
- ```json
60
- { "action": "create", "title": "My Notebook", "sourceUrls": ["https://..."] }
61
- ```
62
-
63
- ```json
64
- { "action": "ask", "notebookId": "abc123", "prompt": "Summarize the key points" }
65
- ```
66
-
67
- ```json
68
- { "action": "summarize", "sourceUrls": ["https://..."], "prompt": "What are the main findings?" }
69
- ```
70
-
71
- ```json
72
- { "action": "delete", "notebookId": "abc123" }
73
- ```
74
-
75
- ## Login via Browser Automation
76
-
77
- The Worker uses Cloudflare Browser Rendering (Puppeteer) to automate Google login — no manual cookie export needed.
78
-
79
- ```bash
80
- # First call — enters email + password, triggers 2FA
81
- curl -X POST https://notebooklm-api.<you>.workers.dev \
82
- -H "Authorization: Bearer $API_TOKEN" \
83
- -H "Content-Type: application/json" \
84
- -d '{"action": "login"}'
85
-
86
- # If 2FA is required — pass the security code
87
- curl -X POST https://notebooklm-api.<you>.workers.dev \
88
- -H "Authorization: Bearer $API_TOKEN" \
89
- -H "Content-Type: application/json" \
90
- -d '{"action": "login", "securityCode": "123456"}'
91
- ```
92
-
93
- Auth cookies are stored in the container's Durable Object storage and injected on container start.
94
-
95
- ## Setup
96
-
97
- 1. Set secrets:
98
- ```bash
99
- wrangler secret put API_TOKEN
100
- wrangler secret put GOOGLE_EMAIL
101
- wrangler secret put GOOGLE_PASSWORD
102
- ```
103
-
104
- 2. Deploy:
105
- ```bash
106
- cd packages/notebooklm-api
107
- wrangler deploy
108
- ```
109
-
110
- 3. Trigger login:
111
- ```bash
112
- curl -X POST https://notebooklm-api.<you>.workers.dev \
113
- -H "Authorization: Bearer $TOKEN" \
114
- -d '{"action": "login"}'
115
- ```
116
-
117
- ## Development
118
-
119
- ```bash
120
- bun install
121
- wrangler dev
122
- ```
123
-
124
- ## Cost
125
-
126
- - Container only bills while awake (per 10ms granularity)
127
- - `basic` instance: 1/4 vCPU, 1 GiB RAM — ~$0.000005/sec when active
128
- - Idle = $0
23
+ # notebooklm-api
24
+
25
+ NotebookLM API powered by Cloudflare Containers. The Python sandbox runs on demand and sleeps after 5 minutes of inactivity to conserve costs.
26
+
27
+ ## Architecture
28
+
29
+ ```
30
+ Request → Worker (auth + routing) → Container (notebooklm-py) → Response
31
+ ↕
32
+ sleeps when idle
33
+ ```
34
+
35
+ - **Worker** validates auth and routes requests to the container
36
+ - **Container** runs `notebooklm-py` CLI in a Python 3.12 sandbox
37
+ - Container auto-sleeps after `sleepAfter` (5m) — billing stops until next request
38
+ - Container wakes transparently on next incoming request
39
+
40
+ ## API
41
+
42
+ All endpoints require `Authorization: Bearer <API_TOKEN>` header.
43
+
44
+ ### POST /
45
+
46
+ ```json
47
+ { "action": "list" }
48
+ ```
49
+
50
+ ```json
51
+ { "action": "create", "title": "My Notebook", "sourceUrls": ["https://..."] }
52
+ ```
53
+
54
+ ```json
55
+ { "action": "ask", "notebookId": "abc123", "prompt": "Summarize the key points" }
56
+ ```
57
+
58
+ ```json
59
+ { "action": "summarize", "sourceUrls": ["https://..."], "prompt": "What are the main findings?" }
60
+ ```
61
+
62
+ ```json
63
+ { "action": "delete", "notebookId": "abc123" }
64
+ ```
65
+
66
+ ## Login via Browser Automation
67
+
68
+ The Worker uses Cloudflare Browser Rendering (Puppeteer) to automate Google login — no manual cookie export needed.
69
+
70
+ ```bash
71
+ # First call — enters email + password, triggers 2FA
72
+ curl -X POST https://notebooklm-api.<you>.workers.dev \
73
+ -H "Authorization: Bearer $API_TOKEN" \
74
+ -H "Content-Type: application/json" \
75
+ -d '{"action": "login"}'
76
+
77
+ # If 2FA is required — pass the security code
78
+ curl -X POST https://notebooklm-api.<you>.workers.dev \
79
+ -H "Authorization: Bearer $API_TOKEN" \
80
+ -H "Content-Type: application/json" \
81
+ -d '{"action": "login", "securityCode": "123456"}'
82
+ ```
83
+
84
+ Auth cookies are stored in the container's Durable Object storage and injected on container start.
85
+
86
+ ## Setup
87
+
88
+ 1. Set secrets:
89
+ ```bash
90
+ wrangler secret put API_TOKEN
91
+ wrangler secret put GOOGLE_EMAIL
92
+ wrangler secret put GOOGLE_PASSWORD
93
+ ```
94
+
95
+ 2. Deploy:
96
+ ```bash
97
+ cd packages/notebooklm-api
98
+ wrangler deploy
99
+ ```
100
+
101
+ 3. Trigger login:
102
+ ```bash
103
+ curl -X POST https://notebooklm-api.<you>.workers.dev \
104
+ -H "Authorization: Bearer $TOKEN" \
105
+ -d '{"action": "login"}'
106
+ ```
107
+
108
+ ## Development
109
+
110
+ ```bash
111
+ bun install
112
+ wrangler dev
113
+ ```
114
+
115
+ ## Cost
116
+
117
+ - Container only bills while awake (per 10ms granularity)
118
+ - `basic` instance: 1/4 vCPU, 1 GiB RAM — ~$0.000005/sec when active
119
+ - Idle = $0
129
120
  - `max_instances = 3` caps concurrent cost