google

package module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2026 License: MIT Imports: 12 Imported by: 0

README

Google clients for Crawlora

Official Crawlora client packages for the hosted Google API. Access 40 API endpoints covering Maps search, places, reviews and photos; News; Trends; Finance quotes and markets; suggestions; videos; and jobs from JavaScript/TypeScript, Python, Go, Ruby, Java, and PHP. These clients call Crawlora's hosted API; they do not scrape Google locally. Requests use your Crawlora account and CRAWLORA_API_KEY; service usage follows your account billing plan. Crawlora is independent from and not affiliated with or endorsed by Google or its owners.

Language packages

For installation and runnable examples, use the README for your language. See the API endpoint and parameter reference for shared operation details.

Create an account at crawlora.net, open the Crawlora console to get an API key, or read the API documentation. Keep CRAWLORA_API_KEY out of source control.

API coverage and supported endpoints

The six language clients provide access to all 40 selected public Google API operations. Search or browse by endpoint path and operation ID below; the complete API reference adds parameters, enums, and response 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

License

MIT. See LICENSE.

Documentation

Overview

Package google is Crawlora's Google API client for 40 endpoints, covering Maps search, places, reviews and photos; News; Trends; Finance quotes and markets; suggestions; videos; and jobs. API documentation: https://crawlora.net/docs?utm_source=pkg.go.dev&utm_medium=referral&utm_campaign=platform-clients&utm_content=google-go-api-docs

Index

Examples

Constants

View Source
const (
	DefaultBaseURL = "https://api.crawlora.net/api/v1"
	Version        = "0.2.0"
)
View Source
const OperationCount = 40

OperationCount reports how many selected-platform operations this module exposes.

Variables

This section is empty.

Functions

func OperationIDs

func OperationIDs() []string

OperationIDs returns the selected operation IDs in stable sorted order.

Types

type Client

type Client struct {
	APIKey     string
	BaseURL    string
	Timeout    time.Duration
	HTTPClient *http.Client
}

Client calls only the operation IDs included in this platform module.

func NewClient

func NewClient(apiKey string) *Client

NewClient creates a client using the supplied API key, or CRAWLORA_API_KEY when empty.

func (*Client) Call

func (c *Client) Call(ctx context.Context, operationID string, params Params) (any, error)

Call executes a selected platform operation by operation ID.

Example
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
	w.Header().Set("Content-Type", "application/json")
	_, _ = w.Write([]byte(`{"ok":true}`))
}))
defer server.Close()

client := NewClient("your-crawlora-api-key")
client.BaseURL = server.URL + "/api/v1"
client.HTTPClient = server.Client()
result, err := client.Call(context.Background(), "google-finance-analyst-articles", Params{"quote": "sample-id"})
if err != nil {
	panic(err)
}
fmt.Println(result.(map[string]any)["ok"])
Output:
true

func (*Client) Close

func (c *Client) Close() error

Close releases idle connections held by the configured HTTP transport.

func (*Client) FinanceAnalystArticles

func (c *Client) FinanceAnalystArticles(ctx context.Context, params Params) (any, error)

FinanceAnalystArticles calls the google-finance-analyst-articles operation.

func (*Client) FinanceChart

func (c *Client) FinanceChart(ctx context.Context, params Params) (any, error)

FinanceChart calls the google-finance-chart operation.

func (*Client) FinanceClassification

func (c *Client) FinanceClassification(ctx context.Context, params Params) (any, error)

FinanceClassification calls the google-finance-classification operation.

func (*Client) FinanceCompany

func (c *Client) FinanceCompany(ctx context.Context, params Params) (any, error)

FinanceCompany calls the google-finance-company operation.

func (*Client) FinanceContext

func (c *Client) FinanceContext(ctx context.Context, params Params) (any, error)

FinanceContext calls the google-finance-context operation.

func (*Client) FinanceFinancials

func (c *Client) FinanceFinancials(ctx context.Context, params Params) (any, error)

FinanceFinancials calls the google-finance-financials operation.

func (*Client) FinanceMarketsCategoryNews

func (c *Client) FinanceMarketsCategoryNews(ctx context.Context, params Params) (any, error)

FinanceMarketsCategoryNews calls the google-finance-markets-category-news operation.

func (*Client) FinanceMarketsCategoryStocks

func (c *Client) FinanceMarketsCategoryStocks(ctx context.Context, params Params) (any, error)

FinanceMarketsCategoryStocks calls the google-finance-markets-category-stocks operation.

func (*Client) FinanceMarketsEarnings

func (c *Client) FinanceMarketsEarnings(ctx context.Context, params Params) (any, error)

FinanceMarketsEarnings calls the google-finance-markets-earnings operation.

func (*Client) FinanceMarketsFeatured

func (c *Client) FinanceMarketsFeatured(ctx context.Context, params Params) (any, error)

FinanceMarketsFeatured calls the google-finance-markets-featured operation.

func (*Client) FinanceMarketsHeadline

func (c *Client) FinanceMarketsHeadline(ctx context.Context, params Params) (any, error)

FinanceMarketsHeadline calls the google-finance-markets-headline operation.

func (*Client) FinanceMarketsIndices

func (c *Client) FinanceMarketsIndices(ctx context.Context, params Params) (any, error)

FinanceMarketsIndices calls the google-finance-markets-indices operation.

func (*Client) FinanceMarketsMovers

func (c *Client) FinanceMarketsMovers(ctx context.Context, params Params) (any, error)

FinanceMarketsMovers calls the google-finance-markets-movers operation.

func (*Client) FinanceMarketsTop

func (c *Client) FinanceMarketsTop(ctx context.Context, params Params) (any, error)

FinanceMarketsTop calls the google-finance-markets-top operation.

func (*Client) FinanceMarketsTrending

func (c *Client) FinanceMarketsTrending(ctx context.Context, params Params) (any, error)

FinanceMarketsTrending calls the google-finance-markets-trending operation.

func (*Client) FinanceNews

func (c *Client) FinanceNews(ctx context.Context, params Params) (any, error)

FinanceNews calls the google-finance-news operation.

func (*Client) FinanceQuote

func (c *Client) FinanceQuote(ctx context.Context, params Params) (any, error)

FinanceQuote calls the google-finance-quote operation.

func (*Client) FinanceRelated

func (c *Client) FinanceRelated(ctx context.Context, params Params) (any, error)

FinanceRelated calls the google-finance-related operation.

func (*Client) FinanceSearch

func (c *Client) FinanceSearch(ctx context.Context, params Params) (any, error)

FinanceSearch calls the google-finance-search operation.

func (*Client) FinanceTicker

func (c *Client) FinanceTicker(ctx context.Context, params Params) (any, error)

FinanceTicker calls the google-finance-ticker operation.

func (*Client) Jobs

func (c *Client) Jobs(ctx context.Context, params Params) (any, error)

Jobs calls the google-jobs operation.

func (*Client) MapPlace

func (c *Client) MapPlace(ctx context.Context, params Params) (any, error)

MapPlace calls the google-map-place operation.

func (*Client) MapPlacePhotos

func (c *Client) MapPlacePhotos(ctx context.Context, params Params) (any, error)

MapPlacePhotos calls the google-map-place-photos operation.

func (*Client) MapPlaceReviews

func (c *Client) MapPlaceReviews(ctx context.Context, params Params) (any, error)

MapPlaceReviews calls the google-map-place-reviews operation.

func (*Client) MapSearch

func (c *Client) MapSearch(ctx context.Context, params Params) (any, error)

MapSearch calls the google-map-search operation.

func (*Client) News

func (c *Client) News(ctx context.Context, params Params) (any, error)

News calls the google-news operation.

func (*Client) NewsSearch

func (c *Client) NewsSearch(ctx context.Context, params Params) (any, error)

NewsSearch calls the google-news-search operation.

func (*Client) Suggest

func (c *Client) Suggest(ctx context.Context, params Params) (any, error)

Suggest calls the google-suggest operation.

func (*Client) TrendsCategories

func (c *Client) TrendsCategories(ctx context.Context, params Params) (any, error)

TrendsCategories calls the google-trends-categories operation.

func (*Client) TrendsEnums

func (c *Client) TrendsEnums(ctx context.Context, params Params) (any, error)

TrendsEnums calls the google-trends-enums operation.

func (*Client) TrendsExplore

func (c *Client) TrendsExplore(ctx context.Context, params Params) (any, error)

TrendsExplore calls the google-trends-explore operation.

func (*Client) TrendsExploreInterestByRegion

func (c *Client) TrendsExploreInterestByRegion(ctx context.Context, params Params) (any, error)

TrendsExploreInterestByRegion calls the google-trends-explore-interest-by-region operation.

func (*Client) TrendsExploreInterestOverTime

func (c *Client) TrendsExploreInterestOverTime(ctx context.Context, params Params) (any, error)

TrendsExploreInterestOverTime calls the google-trends-explore-interest-over-time operation.

func (*Client) TrendsExploreRelatedTopics

func (c *Client) TrendsExploreRelatedTopics(ctx context.Context, params Params) (any, error)

TrendsExploreRelatedTopics calls the google-trends-explore-related-topics operation.

func (*Client) TrendsExploreRisingQueries

func (c *Client) TrendsExploreRisingQueries(ctx context.Context, params Params) (any, error)

TrendsExploreRisingQueries calls the google-trends-explore-rising-queries operation.

func (*Client) TrendsExploreTopQueries

func (c *Client) TrendsExploreTopQueries(ctx context.Context, params Params) (any, error)

TrendsExploreTopQueries calls the google-trends-explore-top-queries operation.

func (*Client) TrendsLocations

func (c *Client) TrendsLocations(ctx context.Context, params Params) (any, error)

TrendsLocations calls the google-trends-locations operation.

func (*Client) TrendsTrending

func (c *Client) TrendsTrending(ctx context.Context, params Params) (any, error)

TrendsTrending calls the google-trends-trending operation.

func (*Client) TrendsTrendingDetail

func (c *Client) TrendsTrendingDetail(ctx context.Context, params Params) (any, error)

TrendsTrendingDetail calls the google-trends-trending-detail operation.

func (*Client) Videos

func (c *Client) Videos(ctx context.Context, params Params) (any, error)

Videos calls the google-videos operation.

type Params

type Params map[string]any

Params maps the exact OpenAPI parameter names expected by this platform client.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL