{"id":49815508,"url":"https://github.com/LarryDpk/Google-Bard","last_synced_at":"2026-05-29T21:00:55.272Z","repository":{"id":147921682,"uuid":"618314957","full_name":"LarryDpk/Google-Bard","owner":"LarryDpk","description":"A Java Lib for Google-Bard API (Reverse engineering of Google's Bard API)","archived":true,"fork":false,"pushed_at":"2024-05-17T00:55:56.000Z","size":579,"stargazers_count":87,"open_issues_count":7,"forks_count":26,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-05-17T01:54:02.218Z","etag":null,"topics":["ai","api","bard","chatbot","chatgpt","google-bard","java","reverse-engineering"],"latest_commit_sha":null,"homepage":"","language":"Java","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/LarryDpk.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-24T07:53:21.000Z","updated_at":"2024-05-17T00:56:20.000Z","dependencies_parsed_at":"2024-06-04T06:01:34.436Z","dependency_job_id":null,"html_url":"https://github.com/LarryDpk/Google-Bard","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/LarryDpk/Google-Bard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LarryDpk%2FGoogle-Bard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LarryDpk%2FGoogle-Bard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LarryDpk%2FGoogle-Bard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LarryDpk%2FGoogle-Bard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LarryDpk","download_url":"https://codeload.github.com/LarryDpk/Google-Bard/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LarryDpk%2FGoogle-Bard/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33670211,"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-29T02:00:06.066Z","response_time":107,"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":["ai","api","bard","chatbot","chatgpt","google-bard","java","reverse-engineering"],"created_at":"2026-05-13T06:00:43.983Z","updated_at":"2026-05-29T21:00:55.267Z","avatar_url":"https://github.com/LarryDpk.png","language":"Java","funding_links":[],"categories":["人工智能"],"sub_categories":["LLM客户端"],"readme":"\n# Note: Archived as Google changes Bard to Gemini\n\n\n\n# Java Library for Google Bard to Ask Questions and Receive Answers\n\n`Google Bard` is Google's experimental, conversational, AI chat service. It is meant to function similarly to ChatGPT, with the biggest difference being that Google's service will pull its information from the web.\n\nI want to use `Google Bard` automatically in an easier way, so I built a [Java library](https://github.com/LarryDpk/Google-Bard) for it. The library supports continuous conversation with the same client.\n\n\n## How to use the library\n### Import the library into your project\n\nFor maven project:\n```xml\n\u003cdependencies\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003ecom.pkslow\u003c/groupId\u003e\n        \u003cartifactId\u003egoogle-bard\u003c/artifactId\u003e\n        \u003cversion\u003e0.3.6\u003c/version\u003e\n    \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\n- 0.2.0+: Support images and it's not compatible with previous versions;\n- 0.3.4+: Support Chinese;\n- 0.3.5+: need two token: `__Secure-1PSID` and `__Secure-1PSIDTS`\n- 0.3.6: Support multiple lines by [Tolunay](https://github.com/TolunayM)\n\n### Java Code\nIt's easy to make the call:\n```java\nAIClient client = new GoogleBardClient(token);\nAnswer answer = client.ask(\"can you show me a picture of clock?\");\n```\n\n\n### Get the token from browser\nWe need to get the token from browser for authentication. It's cookie named `__Secure-1PSID` and `__Secure-1PSIDTS`, and we need to copy the value.\nCombine the two token as `$__Secure-1PSID;$__Secure-1PSIDTS`\n\nExample:\n```\nZAiXYL4nedulA03ly0Ea2IdDTk2Emg4YJfuqs3YCcdxxxxxxxxx3XyDzlRqexw.;sidts-CjIBSAxbGXMW7bfOuuE0LOf-DDy20302Dh-npVoG**********86bhkxFwCw4QuaDyz1BAA\n```\n\n![](https://pkslow.oss-cn-shenzhen.aliyuncs.com/images/2023/03/google-bard-python-chatbot.sessionid.png)\n\n## SNlM0e is null\nIf you hit SNlM0e is null issues, you may need to clear the cookie and login again:\n\n- Clear cookies of bard.google.com and again\n- login into the account\n- F12 \u003e Applications \u003e Cookies \u003e bard \u003e `__Secure-1PSID` and `__Secure-1PSIDTS`\n- Copy cookie and paste into your code.\n- Re run and you are good to go.\n\n## The Example\n[example code to use](https://github.com/LarryDpk/Google-Bard/blob/main/src/main/java/com/pkslow/ai/GoogleBardExample.java)\n\n\n`Google Bard` is now under development so it may not be available for your country, so you may set the proxy before you run the application:\n```java\nNetworkUtils.setUpProxy(\"localhost\", \"7890\");\n```\n\n\nIt's `Markdown` format for the answer.\n---\n```markdown\nSure thing. I found you a few photos of different types of clocks:\n\n* **Analog Clock:** This is the most common type of clock, and it has a face with hands that point to the hour, minute, and second.\n\n[![Image of Analog clock](https://cdn.shopify.com/s/files/1/0556/8066/3742/products/4550344275733_org_1200x1200.jpg?v=1678206891)](https://www.muji.us/products/analog-clock-l-laca0a)\n* **Digital Clock:** This type of clock displays the time in numbers, and it can be either battery-powered or plugged into an outlet.\n\n[![Image of Digital clock](https://m.media-amazon.com/images/I/61MuSYQ7yhL._AC_UF894,1000_QL80_.jpg)](https://www.amazon.in/YORTOT-Oversize-Control-Brightness-Temperature/dp/B08R8FW63J)\n* **Alarm Clock:** This type of clock is designed to wake you up at a certain time, and it can have a variety of features, such as snooze, a light, and a radio.\n\n[![Image of Alarm clock](https://m.media-amazon.com/images/I/71ggBUmny9L.jpg)](https://www.amazon.com/Sharp-Twin-Bell-Alarm-Clock/dp/B08TB22P29)\n* **Sundial:** This type of clock uses the sun to tell time, and it is a popular choice for people who want to live a more sustainable lifestyle.\n\n[![Image of Sundial](https://www.thehoarde.com/resources/images/blog-pictures/Sundial-1-(Deposit-Photos)-21-7-22-crop-v2.jpg)](https://www.thehoarde.com/blog/a-beginners-guide-to-the-garden-sundial)\n* **Cuckoo Clock:** This type of clock is a traditional European clock that has a cuckoo bird that pops out to announce the time.\n\n[![Image of Cuckoo clock](https://m.media-amazon.com/images/I/81OBtQVTkuL._AC_UF894,1000_QL80_.jpg)](https://www.amazon.com/Trenkle-Quartz-Cuckoo-Forest-Chopper/dp/B00VZQ5ZTY)\n\nI hope this helps!\n```\n\n## Resources\n- [Amazing Bard Prompts](https://github.com/dsdanielpark/amazing-bard-prompts)\n- [Spring Boot Integration with Google Bard](https://www.pkslow.com/archives/spring-boot-google-bard)\n- [Python Lib: acheong08/Bard](https://github.com/acheong08/Bard)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLarryDpk%2FGoogle-Bard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLarryDpk%2FGoogle-Bard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLarryDpk%2FGoogle-Bard/lists"}