Skip to main content

Google Search CLI

Search Google from the command line and get ranked titles, links, snippets and positions as JSON.

Uses the FlashData Google Search API.

Installation

Requires Python 3.10 or newer:

python -m pip install flashdata-google-search==0.1.1

Or run it without a persistent install using uvx, as in the examples below. The installed command is flashdata-google-search.

Quick start

Create a FlashData API key with google_search access, then set FLASHDATA_API_KEY in your environment or secret manager. API calls use your FlashData Credits.

export FLASHDATA_API_KEY='YOUR_API_KEY'
uvx flashdata-google-search@0.1.1 --query 'retrieval augmented generation evaluation' --options-json '{"num": 5}' --output result.json

Omit --output to write JSON to stdout. An output file must not already exist; the CLI checks this before making a request. API keys are read from the environment, not command flags.

Inputs

Use --query for the primary input. Pass additional fields through --options-json. Options are validated against this package's source schema. Google count and locale options remain omitted unless supplied.

Option Meaning
num Requested result count. Default: null.
page Search result page. Default: null.
autocorrect Enable spelling autocorrection. Default: null.
gl Two-letter country code, for example us. Default: null.
hl Interface language code, for example en. Default: null.
location Optional geographic search location. Default: null.
tbs Optional Google time filter, for example qdr:w. Default: null.

Inspect all fields, nested filters and defaults locally:

uvx flashdata-google-search@0.1.1 --schema

--schema, --help and --version do not require an API key or make an API call.

Output and limits

The JSON response preserves the API envelope and available fields: results[].organic: title, link, snippet, position; usage.credits.

Search snippets are not fetched page content. Omitted count and locale are not filled in by the CLI.

Pricing and errors

This MIT-licensed CLI is free to install. API calls use your own FlashData Credits.

Requests are not automatically retried. A timeout can occur after a request is accepted; check your FlashData query history before resubmitting. Each HTTP request has a 120-second network timeout, a 15-second connect timeout and a 20-MiB response limit.

Errors go to stderr. Exit codes: 0 for exported output, 2 for local input/configuration errors, and 1 for request/output errors. A partial output file is retained on failure; check the request before retrying because of an output error. HTTP 401 indicates an API key issue, 402 insufficient Credits, and 429 a rate or quota limit.

API reference · Privacy policy · Source code

Metadata

Release files for flashdata-google-search 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flashdata-google-search 0.1.1
File Size Uploaded Provenance Actions
flashdata_google_search-0.1.1.tar.gz 12.1 kB With provenance Details for flashdata_google_search-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for flashdata-google-search 0.1.1
File Interpreter ABI Platform Actions
flashdata_google_search-0.1.1-py3-none-any.whl Python 3 none any Details for flashdata_google_search-0.1.1-py3-none-any.whl

Total release size: 27.1 kB

Release files / flashdata_google_search-0.1.1.tar.gz

Download URL flashdata_google_search-0.1.1.tar.gz
Size 12.1 kB
Tags Source
SHA-256 checksum
How to use checksums
943f4173dc57eaf54fe839afd185a9c240d2b1fc71634a917e9561d2e1486cdc
BLAKE2b-256 checksum
How to use checksums
a2c3861dfa1b7b3942dd87ed544fa1fc24222b913c71ef68ea3345096b3d0fde
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Release files / flashdata_google_search-0.1.1-py3-none-any.whl

Download URL flashdata_google_search-0.1.1-py3-none-any.whl
Size 15.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4e5ba2efd19f17829ef956d64aeeda97dc8050d14244e30227f7989d4c020de9
BLAKE2b-256 checksum
How to use checksums
b2d848934000e71150b6ef9b1fa6828348cea8ba07dd8c17c8298223582ab640
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Security for flashdata-google-search 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for flashdata_google_search-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page