Skip to content
looot docs
Esc
↑↓navigate↵open⌘Jpreview
On this page

AnyAPI / Google News

AnyAPI tool anyapi-run-google-news on looot: input fields, $0.00099 per call, output shape, and code to run it with curl, JavaScript or Python.

Search Google News by keyword and get fresh articles (headlines, sources, links, and publish times) as clean JSON. Price: $0.99 per 1,000 requests (flat per request - same cost regardless of results returned). Routing: one lane serves this API today, so a failed attempt has nowhere to fail over to. Payment outcome follows the selected rail’s settlement policy. Catalog: Google News pricing and uptime - live USD price, lane routing, and measured 30-day uptime. Every Google endpoint.

  • Tool id: anyapi-run-google-news
  • Provider: AnyAPI
  • Job: Search the news for a topic (news.search)
  • Price: $0.00099 per call. A call that fails at the provider costs $0.

Inputs

Name Type Required Description
gl string no Two-letter country code for result localization (e.g. us, gb, de).
hl string no Two-letter interface and results language code (e.g. en, es, de).
limit integer no Requested article count (1-20, default 20). Google News returns its latest matching articles and may return more or fewer than requested. Price is flat per request.
location string no Fine-grained location for result localization, given as a canonical Google location string (e.g. ‘New York, United States’, ‘London, United Kingdom’). More specific than the country-level gl.
query string yes News search query; supports operators like ‘-’, ‘OR’, and ‘site:’ (e.g. bitcoin site.com).
timeframe string no How far back to search, written as a count plus a unit: h hours, d days, w weeks, m months, y years. So 2h is the last two hours, 30d the last thirty days, 6m the last six months. Omit this field, or send ‘all’, to search without a time limit.

Output

The run’s result holds the provider’s answer. Signed in, looot inspect anyapi-run-google-news prints its fields.

Run it

Every call needs your API token in LOOOT_TOKEN; Sign in shows how to get one. Each run also needs a new idempotency key, so a retry never pays twice. With wait: 30 the answer comes back inline when the run ends within 30 seconds. Otherwise you get the running run back: poll GET /v1/runs/<runId>.

Example input with placeholder values:

curl -X POST "https://api.looot.ai/v1/runs" \
  -H "Authorization: Bearer $LOOOT_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"endpointId":"anyapi-run-google-news","input":{"query":"<query>"},"wait":30}'
const response = await fetch("https://api.looot.ai/v1/runs", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.LOOOT_TOKEN}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({
    endpointId: "anyapi-run-google-news",
    input: {
      query: "<query>",
    },
    wait: 30,
  }),
});
const run = await response.json();
console.log(run.status, run.result);
import os
import uuid

import requests

response = requests.post(
    "https://api.looot.ai/v1/runs",
    headers={
        "Authorization": f"Bearer {os.environ['LOOOT_TOKEN']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "endpointId": "anyapi-run-google-news",
        "input": {
            "query": "<query>",
        },
        "wait": 30,
    },
    timeout=90,
)
run = response.json()
print(run["status"], run.get("result"))

To let looot pick among every provider of this job instead, send job:news.search as endpointId; see the job page.

Was this page helpful?