Google API

Get Google data as clean JSON with one key: 15 endpoints, 1 to 35 credits per call, the same response shape as every other platform.

What you get#

Onekey exposes Google as 15 endpoints behind one API key: 3 endpoints return one record (data is an object) and 12 endpoints return a list (data is an array). Every answer uses the same envelope (success, data, metadata, error), the cost is reported in metadata.credits_charged, and fields are mapped onto the unified schema so the code you write for Google also works for the rest of the ai & search category.

Endpoints#

EndpointWhat it doesParametersCreditsStatus
adOne Google Ads Transparency creative: advertiser, format, impression and spend ranges, targeting, copy.url*2beta needs a pack
adlibrary_advertisers_searchSearch advertisers in the Google Ads Transparency Center by name.query*2beta needs a pack
business_extended_reviewsReviews of a Google Business Profile place (up to 5 most relevant per call).place_id, keyword1beta
business_infoGoogle Business Profile of a place: name, address, rating, review count, website.place_id, keyword1beta
business_questionsQuestions and answers on a Google Business Profile: question text, author, date, answers.keyword*, location_name, language_code23beta needs a pack
business_updatesRecent posts (updates) published by a Google Business Profile: text, link, images, date.keyword*, location_name, language_code13beta needs a pack
company_adsAds a company runs on Google, from the Ads Transparency Center (by domain).domain, advertiser_id, cursor2beta needs a pack
hotels_infoGoogle Hotels detail for one hotel: name, stars, address, phone, rating, location.hotel_identifier*, location_name, language_code12beta needs a pack
hotels_searchSearch Google Hotels: matching hotels with id, name, stars, rating and location.keyword*, location_name, language_code12beta needs a pack
keyword_volumeGoogle search volume for a keyword in a country and language: average monthly searches, last 12 months, CPC, competition and keyword difficulty.keyword*, location_name, language_code35beta needs a pack
newsGoogle News search results (keyless RSS): title, link, source, publication time.q*, lang, country1stable
searchGoogle web search results: organic title, URL and snippet for a query.q*, hl, gl2beta needs a pack
shoppingGoogle Shopping product results via Serper.dev.q*, gl5beta
suggestGoogle search autocomplete suggestions for a query prefix (keyless).q*, lang1stable
trendsGoogle Trends daily trending searches for a country (keyless RSS): query, approximate traffic, top news.geo5stable

A * marks a required parameter. Each endpoint name links to its reference page with the full parameter table, caching window and a recorded response.

Make a request#

This calls google.news (1 credit, stable). Replace YOUR_API_KEY with your key; sign up, no card. 1,000 free credits cover the open-platform endpoints. Hard-to-reach platforms (X, TikTok, Instagram, Reddit, and others marked on their page) need a verified email and a purchased pack.

curl "https://api.onekey.dev/v1/google/news?q=openai" \
  -H "x-api-key: YOUR_API_KEY"

Fields you get back#

These unified fields come back from Google, with the same names as on every other platform. The count is how many of its 15 mapped endpoints return the field; a field the source lacks is null, never missing. 26 platform-specific fields (ext.<name>) come on top, documented on each endpoint page.

FieldTypeEndpoints
content.textstring7
content.createdAtISO 8601 date6
content.urlURL6
author.displayNamestring5
content.idstring5
content.titlestring5
entity.idstring5
entity.namestring5
entity.stats.ratingnumber4
author.urlURL3
entity.stats.ratingCountinteger3
entity.urlURL3
media.urlURL3
author.idstring2
content.typestring2
content.updatedAtISO 8601 date2
place.addressstring2
place.latnumber2
place.lonnumber2
author.websiteURL1
engagement.commentsinteger1
engagement.viewsinteger1
entity.categorystring1
entity.countrystring1
entity.descriptionstring1
listing.pricenumber1
listing.sellerstring1
media.thumbnailUrlURL1

The full schema is in Unified schema.

Pricing#

Google calls cost 1 to 35 credits, flat per endpoint. Free when served from cache (0.2 credit for a cached response over 100 KB). Invalid, failed or not-found calls are not charged. See pricing for credit packs.