SERP CLI
A command-line tool for Google Search (SERP) via the AceDataCloud platform.
Get your Ace Data Cloud API key
- Open Ace Data Cloud → Applications. Sign in, or register an account first.
- Find General application. If it has not been created, choose Initialize General Application. A general key can use the services available to your account; a dedicated application's key is limited to its service. Check the required service/model access and current pricing.
- Copy the API Key from the application card, or open Keys / Manage Keys → Create to create a separate key for this integration. Give it a recognizable name so you can revoke or rotate it independently.
- When creating a key, review Expiration Time, Set Usage Limitation, and Allowed APIs. Enable only the restrictions you need, allow the operations you will call, then click Create and copy the token from the key list. Task lookup does not grant permission to submit a generation. Confirm the application's balance can cover your first request; any trial allowance is whatever your account currently displays.
- Copy only the token value, without quotation marks, spaces, or
Bearer. An API Key / API Token field expects this raw value; only a manually configured HTTPAuthorizationheader needs theBearerprefix. Aplatform-...account-management token cannot replace a generation API key.
Save the key in the client's credential store or the environment variable shown below. Never put it in a prompt, shared workflow, screenshot, or Git commit. If authentication fails, check the full copied value, application/service access, expiration, usage limit, and balance before creating another key.
Features
- Web Search — Search Google and get structured results (organic, knowledge graph, answer box)
- Image Search — Find images with
serp images - News Search — Get news articles with time filtering
- Video Search — Find video content from YouTube and more
- Places Search — Find local businesses and places
- Maps Search — Search Google Maps for locations
- Rich Output — Beautiful terminal formatting with
--jsonfor scripting - Localization — Country and language support for localized results
Installation
pip install serp-cli
Quick Start
# Set your API token
export ACEDATACLOUD_API_TOKEN=your_token_here
# Web search
serp search "artificial intelligence"
# Image search
serp images "sunset photography"
# Image search with image-size filter
serp images "sunset photography" --image-size 12mp
# News with time filter
serp news "tech news" --time-range qdr:d
# Places search
serp places "coffee shops near Times Square" -c us
# Search with pagination
serp search "python tutorials" -n 20 -p 2
# Get JSON output
serp search "hello world" --json | jq '.organic[0].title'
Commands
| Command | Description |
|---|---|
search |
Google web search (all types via -t) |
images |
Google Image search |
news |
Google News search |
videos |
Google Video search |
places |
Google Places search |
maps |
Google Maps search |
search-types |
List available search types |
time-ranges |
List time range filters |
config |
Show current configuration |
Search Options
| Option | Description |
|---|---|
-t, --type |
Search type: search, images, news, maps, places, videos |
-c, --country |
Country code (e.g. us, cn, uk) |
-l, --language |
Language code (e.g. en, zh-cn, fr) |
--time-range |
Time filter: h, d, w, m, y (or qdr:h, qdr:d, qdr:w, qdr:m, qdr:y) |
--image-size |
Image size filter: large, medium, icon, 2mp, 4mp, 6mp, 8mp, 10mp, 12mp, 15mp, 20mp, 40mp, 70mp |
-n, --number |
Number of results per page (default: 10) |
-p, --page |
Page number for pagination |
--json |
Output raw JSON |
Configuration
| Environment Variable | Description | Default |
|---|---|---|
ACEDATACLOUD_API_TOKEN |
API authentication token | (required) |
ACEDATACLOUD_API_BASE_URL |
API base URL | https://api.acedata.cloud |
SERP_REQUEST_TIMEOUT |
Request timeout in seconds | 30 |
You can also use a .env file or pass --token directly.
Docker
docker compose run serp-cli search "hello world"
Development
# Install with dev dependencies
pip install -e ".[all]"
# Run tests
pytest
# Run linter
ruff check .
ruff format --check .
License
MIT License - see LICENSE for details.
Links
Metadata
Release files for serp-cli 2026.10.12.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| serp_cli-2026.10.12.0.tar.gz | 14.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| serp_cli-2026.10.12.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.9 kB
Release files / serp_cli-2026.10.12.0.tar.gz
| Download URL | serp_cli-2026.10.12.0.tar.gz |
|---|---|
| Size | 14.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4b068e4f44270f7dddc42ac1ecfbd973577b2f37962da64c05493d69c09694d2
|
|
BLAKE2b-256 checksum How to use checksums |
0f9bd2d06147cfa250fb013adc20ae72cf1ddfaa8c92290b08665e85f3f93867
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / serp_cli-2026.10.12.0-py3-none-any.whl
| Download URL | serp_cli-2026.10.12.0-py3-none-any.whl |
|---|---|
| Size | 13.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c06113a76829006764eb4890d92d2bf9a117cde5a152b6966bc232a5f546152
|
|
BLAKE2b-256 checksum How to use checksums |
32e2eff1d5b3dcfe266d6eac20fb6dcfbc4ce9fa42ce8c0faa26331d096f5a29
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|