Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ All notable changes to this project are documented here. The format follows
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project adheres
to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.4.0]

### Added

- `client.monitor.bing_aimode()` for Bing AI Mode,
`POST /v1/monitor/bing/aimode`. It accepts `prompt`, `country`, `state` (US
only) and `include` (`markdown`, `html`).
- The `BING_AIMODE` task type for `client.async_tasks`.
- The Bing AI Mode path, its request and response schemas, the `BING_AIMODE`
task type and the `bing_aimode` countries model in the vendored
`openapi.json`.

## [0.3.0]

### Removed
Expand Down
34 changes: 31 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The official Python SDK for [**cloro**](https://cloro.dev), the API for Google Search
and AI answers. It gives you a Google SERP API, a Google News API, and answers from
ChatGPT, Gemini, Google AI Mode and Google AI Overview. cloro
ChatGPT, Gemini, Google AI Mode, Bing AI Mode and Google AI Overview. cloro
also runs an [MCP server](https://cloro.dev/docs/integrations/mcp) that exposes
its monitor endpoints as tools for Claude, Codex, Cursor or your own agent.

Expand Down Expand Up @@ -52,6 +52,7 @@ Google Search and Google News take a `query`.
client.monitor.chatgpt(prompt="...", country="US")
client.monitor.gemini(prompt="...", country="US")
client.monitor.aimode(prompt="...", country="US") # Google AI Mode
client.monitor.bing_aimode(prompt="...", country="US") # Bing AI Mode

client.monitor.google(query="best crm", country="US", pages=1)
client.monitor.google_news(query="acme corp", country="US")
Expand All @@ -60,6 +61,32 @@ client.monitor.google_news(query="acme corp", country="US")
Pass `include={...}` to request extra formats: `markdown`, `html`,
`searchQueries`, `shopping`, and more, depending on the engine.

### Bing AI Mode

`bing_aimode()` gets the answer from Bing AI Mode. The
result has `text`, `sources` and `citationPills`. Set `include` to get
`markdown`, or `html` (a URL to the HTML of the page that Bing shows). Use
`state` to target a US state. `state` is valid only with `country="US"`.

```python
res = client.monitor.bing_aimode(
prompt="best running shoes for flat feet",
country="US",
state="CA",
include={"markdown": True, "html": True},
)

print(res["result"]["text"])
for pill in res["result"]["citationPills"]:
print(pill["citationPillId"], pill["domain"], pill["url"])
```

The prompt can have a maximum of 3,500 characters after URL encoding. Non-Latin
scripts take more characters when encoded, so the limit for them is lower. A
request costs 4 credits, plus 2 credits for a sync request and 2 credits when
you set `state`. An async task (`BING_AIMODE`) does not have the 2-credit sync
charge. `client.countries(model="bing_aimode")` gives the supported countries.

## Async task queue

For high-volume or long-running work, enqueue tasks and poll them to completion.
Expand Down Expand Up @@ -106,8 +133,8 @@ Queue-wide status:
client.async_tasks.status() # queued / processing counts, concurrency usage
```

Valid `task_type` values: `CHATGPT`, `GEMINI`, `AIMODE`, `GOOGLE`,
`GOOGLE_NEWS`.
Valid `task_type` values: `CHATGPT`, `GEMINI`, `AIMODE`, `BING_AIMODE`,
`GOOGLE`, `GOOGLE_NEWS`.

## Configuration

Expand Down Expand Up @@ -154,6 +181,7 @@ with `TaskFailedError` / `TaskTimeoutError` from the poller and
```python
client.countries() # supported countries
client.countries(model="chatgpt")
client.countries(model="bing_aimode")
client.states() # US states for location-targeted Google
```

Expand Down
Loading
Loading