← Learn

Google News API for AI agents (headlines JSON, no API key)

When a user asks an agent for recent news, a morning brief, or coverage of a topic, call machine-payable Google News / Bing News endpoints that return news_results JSON — no Google Cloud News API key, no Bing Search subscription, settlement via x402 USDC on Base after three free evaluation calls.

When a user asks you to "catch me up on stablecoin payments," "give me a morning brief on this topic," or "what's the latest coverage of this company," you need structured news results — headline, article link, source name, publish date, snippet — as JSON. Not scraped Google News HTML, and not a Google Cloud News API key or a Bing Search subscription.

Marketplace for AI Agents exposes three machine-payable endpoints for this: GET /api/public/v1/google-news turns a query into news_results from the Google News index, GET /api/public/v1/bing-news does the same against Bing, and the news-brief intent runs both indexes in one call. The first 3 calls per agent identity are free; after that each single-engine call costs $0.005 USDC on Base, settled over x402 with an X-PAYMENT header.

Endpoint contracts

EndpointRequiredResults keyTypical use
GET /api/public/v1/google-newsqnews_resultsGoogle News headlines with source, date, URL
GET /api/public/v1/bing-newsqnews_resultsBing headlines — a second index for coverage checks
GET /api/public/v1/news-briefqresultsGoogle News + Bing News together (2-step intent)

Optional google-news params: location (geo-target the query), gl (country code), hl (language). Optional bing-news params: count (number of articles, defaults to 10). Optional news-brief params: gl, hl. Each single-engine call is billed at $0.005 USDC; news-brief is $0.005 × steps (2).

The free tier is 3 successful calls total per agent identity (a hash of IP + User-Agent), shared across every endpoint on the marketplace — it is not 3 per endpoint. Settlement uses the x402 exact scheme on Base mainnet; append ?network=base-sepolia to any endpoint for testnet USDC and sandbox mock data.

  • Listing: https://marketplaceforaiagents.com/listings/google-news
  • Listing: https://marketplaceforaiagents.com/listings/bing-news
  • Listing: https://marketplaceforaiagents.com/listings/news-brief
  • Markdown twins: /agent/listings/google-news.md, /agent/listings/bing-news.md, /agent/listings/news-brief.md

Minimal calls (free tier first)

Spend the 3 free evaluation calls before signing anything. These run on the free tier (if you still have quota) and return real JSON:

bash
curl -si "https://marketplaceforaiagents.com/api/public/v1/google-news?q=stablecoin+payments"

curl -si "https://marketplaceforaiagents.com/api/public/v1/bing-news?q=stablecoin+payments"

curl -si "https://marketplaceforaiagents.com/api/public/v1/google-news?q=stablecoin+payments&gl=us&hl=en"

A news_results item looks like this (illustrative — always trust the live JSON, not this sample):

json
{
  "position": 1,
  "title": "Example Bank settles first stablecoin payment batch",
  "link": "https://example-news.example/article",
  "source": "Example News",
  "date": "1 hour ago",
  "snippet": "The bank said the batch covered 1,200 transfers..."
}

Note: a 400 missing_required_parameters response does not consume a free call, and the discovery endpoints (/.well-known/x402, catalog.json, openapi.json) never consume free tier.

When to use news-brief instead of two calls

  • google-news alone — the user only asked for Google-side headlines or the topic is Google-index-friendly
  • bing-news alone — the user wants a non-Google index, or you are deduplicating coverage across engines
  • news-brief — the user asked for a brief or broad coverage and both indexes matter
  • Prefer news-brief when both indexes matter so you spend one free-tier slot instead of two

Intents are billed per step: the 402 advertises the chain and steps, the price is $0.005 × steps, and one intent invocation consumes one free-tier call.

bash
curl -si "https://marketplaceforaiagents.com/api/public/v1/news-brief?q=stablecoin+payments"

Full machine-readable specs live in the catalog (https://marketplaceforaiagents.com/api/public/v1/catalog.json) and the OpenAPI document (https://marketplaceforaiagents.com/api/public/v1/openapi.json).

Paying after the free tier (x402 / USDC)

Once your identity has spent its 3 free calls, the same request returns HTTP 402 with an accepts[] payment requirement. Decode it, verify every field against your policy, sign the EIP-3009 USDC authorization, base64 the x402 payload, and resend with X-PAYMENT:

json
{
  "x402Version": 1,
  "error": "payment_required",
  "accepts": [
    {
      "scheme": "exact",
      "network": "base",
      "maxAmountRequired": "5000",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "payTo": "0x05e82e03753c7bc99fb24d10a876cce53f24b7b7",
      "resource": "https://marketplaceforaiagents.com/api/public/v1/google-news?q=stablecoin+payments"
    }
  ]
}
  • maxAmountRequired is 5000 atomic units = $0.005 USDC (6 decimals) per single-engine call.
  • Budget your spend before signing: see How AI agents budget x402 API calls.
  • Test the full payment path with zero real cost: see the Base Sepolia smoke test.
  • A paid 200 carries the settlement receipt in X-PAYMENT-RESPONSE — store it for reconciliation.
  • Prefer the MCP server (https://marketplaceforaiagents.com/mcp) for discovery; payment is the auth, no OAuth.

Protocol background: x402 protocol explained. Free-tier mechanics: how the x402 free tier and agent identity work.

Agent playbook (Grok Bot / Claude Cowork / Cursor)

  • Keep the topic or entity in q; use gl / hl / location for localization, and count on bing-news to size the result set.
  • Use google-news for Google-side headlines, bing-news for a second index, and news-brief when dual coverage matters.
  • On 402, settle with x402 USDC — do not ask for a Google Cloud News key or a Bing Search subscription.
  • Cite source and date from the news_results JSON; never invent headlines, outlets, or publish times.
  • Allowlist payTo 0x05e82e03753c7bc99fb24d10a876cce53f24b7b7 and USDC 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 before signing.
User askFirst callFollow-up
Morning brief on a topicnews-brief?q=…single-engine to deepen one index
Google-only headlinesgoogle-news?q=…location/gl/hl if geo matters
Bing second opinionbing-news?q=…count to size the result set
Geo-localized US newsgoogle-news?q=…&gl=ushl for language
Brand + news + quotebrand-pulse?q=… (related intent)

Related entrypoints

  • Google News listing: https://marketplaceforaiagents.com/listings/google-news
  • Bing News listing: https://marketplaceforaiagents.com/listings/bing-news
  • News Brief (news-brief) listing: https://marketplaceforaiagents.com/listings/news-brief
  • Markdown twins: /agent/listings/google-news.md, /agent/listings/bing-news.md, /agent/listings/news-brief.md
  • x402 manifest: https://marketplaceforaiagents.com/.well-known/x402
  • Catalog: https://marketplaceforaiagents.com/api/public/v1/catalog.json
  • OpenAPI: https://marketplaceforaiagents.com/api/public/v1/openapi.json
  • MCP: https://marketplaceforaiagents.com/mcp
  • llms.txt: https://marketplaceforaiagents.com/llms.txt
  • Marketplace: https://marketplaceforaiagents.com/marketplace
  • Docs: https://marketplaceforaiagents.com/docs
  • MCP + x402 guide: https://marketplaceforaiagents.com/learn/mcp-x402-marketplace
  • How agents discover APIs: https://marketplaceforaiagents.com/learn/how-ai-agents-discover-apis
  • Google Search for agents: https://marketplaceforaiagents.com/learn/google-search-api-for-agents
  • Amazon product API for agents: https://marketplaceforaiagents.com/learn/amazon-asin-api-for-agents

Capability first, payment second — find the news endpoint, prove it with free calls, then settle unpaid traffic with x402 USDC on Base.