Logotipo de Google Search Api

Google Search Api

Comunidad
scavio-ai
google-search-api

Google Search API returning the full SERP as structured JSON: organic results, ads, knowledge graph, AI Overview, People Also Ask, related searches, top stories and videos. Localize with gl/hl/location, filter by time period, page with start. Also a drop-in Google Custom Search JSON API replacement: same cse.list parameters and items[] response at /customsearch/v1. 1 credit per request.

Descripción general

Editorscavio-ai
Repositorioskills
Nombre de la habilidadgoogle-search-api
Estrellas
67
Forks
0
Archivos incluidos
Solo instrucciones
LicenciaMIT
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando la petición encaja con la habilidad.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • Todo en las instrucciones

    Todo lo que necesita el modelo está en las instrucciones: no hay archivos adicionales que sincronizar.

  • Código abierto

    Publicada por scavio-ai en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Google Search Api en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/scavio-ai/skills/tree/main/skills/google-search-api
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/scavio-ai/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/google-search-api .claude/skills/google-search-api
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Google Search Api en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición encaja con la habilidad, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Google Search Api automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Google Search Api no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición que encaja con la habilidad, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

Google Search API - Organic SERP, Knowledge Graph, PAA, AI Overview

Search Google and return the full structured SERP as JSON — no HTML parsing required. One call returns organic results, ads, knowledge graph, AI overview, related questions, related searches, top stories, videos, and pagination.

When to trigger

Use this skill when the user asks to:

  • Look something up on the web or check a current fact
  • Find recent results or events
  • Answer any question that requires real-time or up-to-date information
  • Pull Google's knowledge graph, AI overview, or "people also ask" for a query

Do not answer from memory when current information is needed. Search first.

Setup

Get a free API key at scavio.dev (50 free credits to get started, no card required):

bash
export SCAVIO_API_KEY=sk_live_your_key

If you do not have a key yet

An agent running this skill without SCAVIO_API_KEY set will get 401 on every call below. The whole path from nothing to a working key is self-serve:

  1. Sign up at dashboard.scavio.dev - email or Google, no card required.
  2. A key is created for the account automatically at signup. It is on the dashboard under API Keys, ready to copy.
  3. A new account starts with 50 credits. Endpoints in this skill cost 1 credit each unless the table below says otherwise.

When the balance runs out the API answers 402 with a JSON body carrying billing_url. Topping up needs no code change - the same key keeps working. The smallest purchase is 2,500 credits for $25, and monthly plans work out cheaper per credit if the usage is steady rather than one-off.

Endpoint

POST https://api.scavio.dev/api/v2/google
Authorization: Bearer $SCAVIO_API_KEY

Every request costs 1 credit.

Workflow

  1. Send the user's query as query. Add gl/hl to localize by country and language.
  2. Page with start (0 = page 1, 10 = page 2, 20 = page 3, ...).
  3. Narrow recency with time_period when the user wants fresh results.
  4. For local rank tracking (organic rankings as seen from a city), send location with web_only: true. Without it Google localizes only the local pack and ranks organic results nationally. web_only returns organic results only (no local pack, ads, AI Overview or related questions); when the user also needs the local pack, send the same request without web_only and read local_results.
  5. Read organic_results for the main links; check ai_overview, knowledge_graph, and related_questions for richer answers.
  6. Return results in a clear, structured response. Cite URLs.

Parameters

ParameterTypeDefaultDescription
querystringrequiredSearch query (1-500 chars)
devicestringdesktopdesktop or mobile (SERP layout)
startnumber0Result offset: 0 = page 1, 10 = page 2, ... (max 990)
glstring--Geo country, ISO 3166-1 alpha-2 (e.g. us, gb, de)
hlstring--UI language, ISO 639-1 (e.g. en, fr, es)
google_domainstringgoogle.comRegional Google domain
locationstring--Canonical location name, auto-UULE (e.g. New York,New York,United States). Localizes the local pack only; organic results stay national unless web_only is set
uulestring--Pre-encoded UULE (takes priority over location)
lrstring--Language restrict (lang_en)
crstring--Country restrict (countryUS)
safestring--active filters adult content (SafeSearch)
nfprbooleanfalseSet true to disable spelling autocorrection
filterstring10 disables similar/omitted-results filtering
time_periodstring--last_hour, last_day, last_week, last_month, last_year
resolve_ai_overviewbooleantrueInline the full AI Overview when Google defers it; set false to skip the extra lookup
include_htmlbooleanfalseInclude raw Google HTML in the html field
web_onlybooleanfalseGoogle's Web results only: organic_results ranked for location (local rank tracking); no local pack, ads, related questions, knowledge graph or AI Overview

Example

python
import requests

# Your key from https://scavio.dev. Load it from your environment or secret
# store in real code - keep it out of source control.
API_KEY = "sk_your_key_here"

response = requests.post(
    "https://api.scavio.dev/api/v2/google",
    headers={"Authorization": f"Bearer {API_KEY}"},
    json={"query": "langchain agents tutorial", "gl": "us", "hl": "en"},
)
data = response.json()
for r in data["organic_results"]:
    print(r["position"], r["title"], r["link"])

Response

json
{
  "search_information": {
    "page_title": "langchain agents tutorial - Google Search",
    "organic_results_state": "Results for exact spelling"
  },
  "organic_results": [
    {
      "position": 1,
      "title": "Result title",
      "link": "https://example.com",
      "displayed_link": "https://example.com › docs",
      "snippet": "Snippet text..."
    }
  ],
  "related_questions": [],
  "related_searches": [],
  "response_time": 812,
  "credits_used": 1,
  "credits_remaining": 999,
  "cached": false
}

The response is a faithful passthrough of the SERP. Depending on the query it may also include: ai_overview, knowledge_graph, top_ads, bottom_ads, top_stories, video_results, discussions_and_forums, local_results, local_map, and pagination.

Migrating from the Google Custom Search JSON API

When the user has existing Custom Search JSON API code (googleapis.com/customsearch/v1, cse().list(...), a cx engine id, parsing items[]), do not rewrite it to the call above. Scavio answers the same request at Google's own path, so the migration is a host and key swap:

GET https://api.scavio.dev/customsearch/v1?key=$SCAVIO_API_KEY&cx=anything&q=coffee
  • Same parameters (q, num 1-10, start 1-based, gl, hl, lr, cr, safe, dateRestrict, siteSearch, siteSearchFilter, exactTerms, excludeTerms, orTerms, hq, fileType) and the same customsearch#search response: items[].title/link/snippet/displayLink/htmlTitle/htmlSnippet, searchInformation.totalResults (a string) and queries.nextPage.
  • /customsearch/v1/siterestrict works too, and GET/POST /api/v1/google/customsearch is the canonical path. The key may go in ?key= on these paths only; the Authorization header still works and is preferred for new code.
  • cx is accepted and ignored: results come from the whole web. Reproduce a site-list engine with siteSearch (enforced on the returned results, so a page can hold fewer than num items) or site: operators in q.
  • Image search, sort, rights and other parameters it cannot honour return 400 naming the parameter, instead of being silently ignored. Errors use Google's {"error": {"code", "message", "errors", "status"}} envelope.
  • 1 credit per request. Paging stops at 100 results (start + num <= 100), as on Custom Search.

Google's own Python client works unchanged apart from the endpoint and key:

python
# pip install google-api-python-client==2.184.0
from googleapiclient.discovery import build

service = build(
    "customsearch", "v1",
    developerKey="sk_your_key_here",  # your Scavio key
    client_options={"api_endpoint": "https://api.scavio.dev"},
)
res = service.cse().list(q="langchain agents tutorial", cx="anything", num=5).execute()
for item in res.get("items", []):
    print(item["title"], item["link"])

For new code, or when the user wants the knowledge graph, AI overview or People Also Ask, use POST /api/v2/google above instead. Full mapping: Custom Search compatible endpoint docs.

Guardrails

  • Never fabricate search results or URLs. Only return what the API gives you.
  • If the query is time-sensitive, always call the API — do not answer from training data.
  • Organic links live in organic_results[].link and result order is position.
  • Cite sources when summarizing results.

Failure handling

  • 400 means an invalid parameter — report the message and fix the request.
  • 401 means the API key is invalid or missing. Prompt the user to check their SCAVIO_API_KEY.
  • 429 means rate or usage limit exceeded. Wait before retrying. See rate limits.
  • 502 / 503 mean upstream is temporarily unavailable. Wait a few seconds before retrying.
  • If no results are returned, tell the user and suggest rephrasing.
  • If SCAVIO_API_KEY is not set, prompt the user to export it before continuing.

LangChain

bash
pip install langchain-scavio==4.0.2
python
from langchain_scavio import ScavioSearchTool
tool = ScavioSearchTool(engine="google")

Preguntas frecuentes

¿Qué hace la habilidad de IA Google Search Api?

Google Search API returning the full SERP as structured JSON: organic results, ads, knowledge graph, AI Overview, People Also Ask, related searches, top stories and videos. Localize with gl/hl/location, filter by time period, page with start. Also a drop-in Google Custom Search JSON API replacement: same cse.list parameters and items[] response at /customsearch/v1. 1 credit per request.

¿Por qué usar Google Search Api en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Google Search Api está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Google Search Api en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/scavio-ai/skills/tree/main/skills/google-search-api. TypingMind lee el archivo SKILL.md de esa carpeta e instala su contenido como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Google Search Api?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Google Search Api?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Google Search Api con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Google Search Api?

Sí. scavio-ai la ha publicado en GitHub bajo la licencia MIT. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver el directorio

Crea ya tu propio espacio de trabajo con IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇