Skip to main content

crawlora-google — Google API client for Python

Python client for Crawlora's hosted Google API. It exposes 40 API endpoints covering Maps search, places, reviews and photos; News; Trends; Finance quotes and markets; suggestions; videos; and jobs. Requests go to Crawlora; the package does not run a browser or scrape Google locally. A Crawlora account and CRAWLORA_API_KEY are required, and API use is billed under your Crawlora account. Crawlora is independent from and not endorsed by Google or its owners.

Install

python -m pip install crawlora-google

Get an API key

Create an account at crawlora.net, then open the Crawlora console for API-key setup. Set your key in the shell before running the client:

export CRAWLORA_API_KEY="your-crawlora-api-key"

Use

Save this example as example.py, then run python example.py after installing the package and setting your API key.

import os

from crawlora_google import GoogleClient

api_key = os.environ.get("CRAWLORA_API_KEY")
if not api_key:
    raise RuntimeError("Set CRAWLORA_API_KEY before running this example.")

with GoogleClient(api_key=api_key) as client:
    result_1 = client.news(q='artificial intelligence')
    print(result_1)
    result_2 = client.map_search(mapSearchOption={'keyword': 'coffee shops in Seattle', 'country': 'us', 'language': 'en'})
    print(result_2)
    result_3 = client.trends_trending(geo='US')
    print(result_3)

The package also exports Client as an alias for GoogleClient. Operation methods are available directly in snake_case and through the google group. The async package client is AsyncGoogleClient; see the online endpoint and parameter reference and runnable example.

Async usage

The package also exports AsyncClient for asynchronous requests:

import asyncio
import os

from crawlora_google import AsyncClient

async def main():
    api_key = os.environ.get("CRAWLORA_API_KEY")
    if not api_key:
        raise RuntimeError("Set CRAWLORA_API_KEY before running this example.")
    async with AsyncClient(api_key=api_key) as client:
        result_1 = await client.news(q='artificial intelligence')
        print(result_1)

asyncio.run(main())

See the runnable example for a complete usage example.

Supported Google API endpoints

This package exposes every route below through direct snake_case methods and the google group. See the endpoint and parameter reference for complete input details.

Method Endpoint API operation Description
GET /google/finance/analyst-articles/{quote} google-finance-analyst-articles Google Finance analyst articles
GET /google/finance/chart/{quote} google-finance-chart Google Finance chart data
GET /google/finance/classification/{quote} google-finance-classification Google Finance classification data
GET /google/finance/company/{quote} google-finance-company Google Finance company data
GET /google/finance/context google-finance-context Find Google Finance instruments by query
GET /google/finance/financials/{quote} google-finance-financials Google Finance financial statements
GET /google/finance/markets/categories/{category}/news google-finance-markets-category-news Google Finance category news
GET /google/finance/markets/categories/{category}/stocks google-finance-markets-category-stocks Google Finance category stocks
GET /google/finance/markets/earnings google-finance-markets-earnings Google Finance earnings calendar
GET /google/finance/markets/featured google-finance-markets-featured Google Finance featured stocks
GET /google/finance/markets/headline google-finance-markets-headline Google Finance top headline
GET /google/finance/markets/indices google-finance-markets-indices Google Finance market indices
GET /google/finance/markets/movers google-finance-markets-movers Google Finance market movers
GET /google/finance/markets/top google-finance-markets-top Google Finance top stocks by metric
GET /google/finance/markets/trending google-finance-markets-trending Google Finance trending stocks
GET /google/finance/news/{quote} google-finance-news Google Finance quote news
GET /google/finance/quote/{quote} google-finance-quote Google Finance Quote API
GET /google/finance/related/{quote} google-finance-related Google Finance related instruments
GET /google/finance/search google-finance-search Google Finance Search API
GET /google/finance/ticker/{ticker} google-finance-ticker Google Finance Ticker API
POST /google/jobs google-jobs Search Google Jobs
GET /google/map/place/{place_id} google-map-place Google Maps place details API
GET /google/map/place/{place_id}/photos google-map-place-photos Google Maps place photos API
GET /google/map/place/{place_id}/reviews google-map-place-reviews Google Maps place reviews API
POST /google/map/search google-map-search Google Maps search API
GET /google/news google-news Search Google News
POST /google/news google-news-search Search Google News with JSON
GET /google/suggest google-suggest Suggest Google search queries
GET /google/trends/categories google-trends-categories Google Trends categories
GET /google/trends/enums google-trends-enums Google Trends enum metadata
POST /google/trends/explore google-trends-explore Google Trends explore data
POST /google/trends/explore/interest-by-region google-trends-explore-interest-by-region Google Trends interest by region
POST /google/trends/explore/interest-over-time google-trends-explore-interest-over-time Google Trends interest over time
POST /google/trends/explore/related-topics google-trends-explore-related-topics Google Trends related topics
POST /google/trends/explore/rising-queries google-trends-explore-rising-queries Google Trends explore rising queries
POST /google/trends/explore/top-queries google-trends-explore-top-queries Google Trends explore top queries
GET /google/trends/locations google-trends-locations Google Trends locations
GET /google/trends/trending google-trends-trending Google Trends trending now data
POST /google/trends/trending/detail google-trends-trending-detail Google Trends trending term detail
GET /google/videos google-videos Search Google video results

Configuration

Pass your key through api_key or read CRAWLORA_API_KEY from the environment. Keep credentials out of source control and logs. Requests go to Crawlora's hosted API.

Metadata

Release files for crawlora-google 0.2.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 crawlora-google 0.2.1
File Size Uploaded Provenance Actions
crawlora_google-0.2.1.tar.gz 39.9 kB Without provenance Details for crawlora_google-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for crawlora-google 0.2.1
File Interpreter ABI Platform Actions
crawlora_google-0.2.1-py3-none-any.whl Python 3 none any Details for crawlora_google-0.2.1-py3-none-any.whl

Total release size: 79.3 kB

Release files / crawlora_google-0.2.1.tar.gz

Download URL crawlora_google-0.2.1.tar.gz
Size 39.9 kB
Tags Source
SHA-256 checksum
How to use checksums
66c9596a6e00ad1e331edc189a514f4584f988593fbad91ffd366ea0c9a3533a
BLAKE2b-256 checksum
How to use checksums
fd729bfc0a11e4ecfe5c4353038c053afdb49a1963b010da59da85147454f560
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / crawlora_google-0.2.1-py3-none-any.whl

Download URL crawlora_google-0.2.1-py3-none-any.whl
Size 39.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ce47f6072202a3ce3a43e7e53f4ef59a3fd103c0095f889b72b62d00869954e7
BLAKE2b-256 checksum
How to use checksums
2743f69b9d40acdc080a553e9718c0c784711e411e2ab413db4a74295b0d8d8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Security for crawlora-google 0.2.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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