# Gemini

## Gemini

The LLM Scraper enables retrieval of Gemini responses and returns a structured JSON output.

***

#### **API Setup**

**Endpoint**

```
https://llm-scraper.netnut.io/search
```

***

#### **Authentication**

Use HTTP Basic Authentication:

```
Authorization: Basic <base64(username:password)>
```

Where `<base64(username:password)>` is the Base64-encoded string of your NetNut credentials.

***

#### **Request Body Schema**

```json
{
  "prompt": "Explain SEO ranking factors in 2026",   // Required
  "engine": "gemini",                                // Required
  "country": "us",                                   // Optional
  "throttling": true                                 // Optional, default true
}
```

**Field Descriptions**

| Field          | Description                                                                                                                                                                 | Parameter Type              |
| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- |
| **prompt**     | Main prompt sent to Gemini. Max length: 4096 chars.                                                                                                                         | Required                    |
| **country**    | Target geographic region for contextual responses.                                                                                                                          | Optional                    |
| **engine**     | The chatbot engine to use. Currently "chatgpt", "google\_ai\_mode", "perplexity" and "gemini" are supported.                                                                | Required (default: chatgpt) |
| **throttling** | Controls automated throttling behavior. Enabled by default to help maintain a high success rate during heavy traffic or platform-side limitations. Set to false to opt out. | Optional (default: true)    |

***

#### **Example Usage**

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X POST https://llm-scraper.netnut.io/search \
  -H "Content-Type: application/json" \
  -U "username:password" \
  -d '{
    "prompt": "Give me SEO trends for 2026",
    "engine": "gemini",
    "throttling": true
  }'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
from base64 import b64encode

headers = {
    "Authorization": "Basic " + b64encode(b"username:password").decode(),
    "Content-Type": "application/json"
}

body = {
    "prompt": "Give me SEO trends for 2026",
    "engine": "gemini"
}

response = requests.post("https://llm-scraper.netnut.io/search", headers=headers, json=body)
print(response.json())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const username = 'your_username';
const password = 'your_password';
const auth = Buffer.from(`${username}:${password}`).toString('base64');

const headers = {
  'Authorization': `Basic ${auth}`,
  'Content-Type': 'application/json'
};

const body = {
  prompt: 'Give me SEO trends for 2026',
  engine: "gemini"
};

fetch('https://llm-scraper.netnut.io/search', {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(body)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error.message));
```

{% endtab %}
{% endtabs %}

***

#### **Response Format**

The Gemini Scraper always returns **structured JSON**.

**Example JSON Response**

```json
{
    "timestamp": "2026-04-13T14:16:13.543Z",
    "traceID": "121da7f7-c8c8-42bc-980e-a1f0a07961e8",
    "request_duration": 18.96,
    "process_duration": 18.96,
    "scraper": "Gemini",
    "response": {
        "prompt": "what are the leading SEO tips in 2026",
        "text": "In 2026, SEO has shifted from \"ranking for keywords\" to \"optimizing for visibility across the AI ecosystem.\" With Google's AI Overviews (formerly SGE) and search assistants like ChatGPT and Claude siphoning up to 60% of clicks for informational queries, the strategy is no longer just about being #1-it's about being the cited source. Here are the leading SEO tips for 2026: Generative Engine Optimization (GEO) Traditional SEO focused on links; GEO focuses on being \"extractable\" for AI. Answer-First Formatting: Lead your articles with a concise, 2-3 sentence direct answer. AI models are more likely to \"lift\" this text for their summaries. Modular Content: Use clear headings ($H1$, $H2$, $H3$), bulleted lists, and tables. AI \"scrapers\" prefer structured data they can easily parse. Schema Markup Everything: Beyond basic organization schema, use FAQ, HowTo, and Product schema to help AI understand the context and relationships of your data. Double Down on E-E-A-T (Experience is King) AI can generate information, but it can't generate experience. Google's 2026 algorithms prioritize the \"First E\": Experience. Proof of Human Effort: Include original photos, case studies, and personal anecdotes. Avoid generic \"stock\" advice that AI can replicate. Verified Authorship: Ensure every piece of content has a robust author bio linked to social profiles (LinkedIn, X) and professional credentials. Citations and Data: Use precise, small-batch data (e.g.\"Our 2026 survey of 150 CEOs found...\") rather than vague generalizations. Build \"Entity\" Authority, Not Just Keywords Google now ranks Entities (Real-world brands, people, and places). Brand Mentions Matter More Than Links: A mention of your brand on a high-authority site (like Reddit, Wikipedia, or a niche news outlet) can be more powerful than a \"no-follow\" link. Topical Clusters: Don't write random blog posts. Build \"Content Hubs\" that cover every possible sub-question of a topic to prove you are the definitive authority on that entity. Optimize for \"Zero-Click\" & Multi-Surface Search Users are searching via Voice, TikTok, and AI Chatbots. Conversational Long-Tails: Optimize for how people talk (e.g.\"What is the best way to...\") rather than how they type (\"best way to...\"). Visual Search: With Google Lens and visual AI, optimize your image ALT text and use high-resolution, original imagery. Local \"Openness\" Signals: For local SEO, Google now prioritizes \"Openness\" (business hours) and specific keywords found within user reviews. Technical SEO: Interaction over Speed While speed is still a baseline, Interaction to Next Paint (INP) is the critical metric in 2026. UX Stability: Eliminate layout shifts and intrusive pop-ups. Engagement Depth: Google tracks if users stay to solve their problem or immediately bounce back to the search results. High \"dwell time\" on a page is a massive ranking signal.",
        "text_markdown": "In 2026, SEO has shifted from \"ranking for keywords\" to \"optimizing for visibility across the AI ecosystem.\" With Google's AI Overviews (formerly SGE) and search assistants like ChatGPT and Claude siphoning up to **60% of clicks** for informational queries, the strategy is no longer just about being #1—it's about being the **cited source**.\n\nHere are the leading SEO tips for 2026:\n\n### 1. Generative Engine Optimization (GEO)\nTraditional SEO focused on links; GEO focuses on being \"extractable\" for AI.\n* **Answer-First Formatting:** Lead your articles with a concise, 2-3 sentence direct answer. AI models are more likely to \"lift\" this text for their summaries.\n* **Modular Content:** Use clear headings ($H1$, $H2$, $H3$), bulleted lists, and tables. AI \"scrapers\" prefer structured data they can easily parse.\n* **Schema Markup Everything:** Beyond basic organization schema, use **FAQ**, **HowTo**, and **Product** schema to help AI understand the context and relationships of your data.\n\n### 2. Double Down on E-E-A-T (Experience is King)\nAI can generate information, but it can't generate *experience*. Google's 2026 algorithms prioritize the \"First E\": **Experience**.\n* **Proof of Human Effort:** Include original photos, case studies, and personal anecdotes. Avoid generic \"stock\" advice that AI can replicate.\n* **Verified Authorship:** Ensure every piece of content has a robust author bio linked to social profiles (LinkedIn, X) and professional credentials.\n* **Citations and Data:** Use precise, small-batch data (e.g., \"Our 2026 survey of 150 CEOs found...\") rather than vague generalizations.\n\n### 3. Build \"Entity\" Authority, Not Just Keywords\nGoogle now ranks **Entities** (Real-world brands, people, and places).\n* **Brand Mentions Matter More Than Links:** A mention of your brand on a high-authority site (like Reddit, Wikipedia, or a niche news outlet) can be more powerful than a \"no-follow\" link.\n* **Topical Clusters:** Don't write random blog posts. Build \"Content Hubs\" that cover every possible sub-question of a topic to prove you are the definitive authority on that entity.\n\n### 4. Optimize for \"Zero-Click\" & Multi-Surface Search\nUsers are searching via Voice, TikTok, and AI Chatbots.\n* **Conversational Long-Tails:** Optimize for how people *talk* (e.g., \"What is the best way to...\") rather than how they *type* (\"best way to...\").\n* **Visual Search:** With Google Lens and visual AI, optimize your image ALT text and use high-resolution, original imagery.\n* **Local \"Openness\" Signals:** For local SEO, Google now prioritizes \"Openness\" (business hours) and specific keywords found within user reviews.\n\n### 5. Technical SEO: Interaction over Speed\nWhile speed is still a baseline, **Interaction to Next Paint (INP)** is the critical metric in 2026.\n* **UX Stability:** Eliminate layout shifts and intrusive pop-ups.\n* **Engagement Depth:** Google tracks if users stay to solve their problem or immediately bounce back to the search results. High \"dwell time\" on a page is a massive ranking signal.\n\n---\n\n### Comparison: 2024 vs. 2026 SEO\n| Feature | 2024 Strategy | 2026 Strategy |\n| :--- | :--- | :--- |\n| **Primary Goal** | Clicks to Website | Being the \"Cited Source\" in AI |\n| **Content Type** | SEO-optimized Blog Posts | Expert-led, Multimedia Insights |\n| **Authority** | Backlink Volume | Brand Mentions & Personal Experience |\n| **Success Metric** | Search Volume / Rank | Conversion & AI Visibility Score |",
        "citations_found": true,
        "citations": [
            {
                "id": 1,
                "url": "https://www.mandr-group.com/the-future-of-seo-how-ai-is-changing-content-strategy-in-2026/",
                "title": "The Future of SEO: How AI Is Changing Content Strategy in 2026 - M&R Marketing",
                "description": "In 2026, don't just optimize your digital presence to reach the top of Google's results page.",
                "section": "citations"
            },
            {
                "id": 2,
                "url": "https://thistle.media/how-will-googles-ai-search-sge-reshape-seo-strategies-by-2026/",
                "title": "How Will Google's AI Search (SGE) Reshape SEO Strategies by 2026? - Thistle Media",
                "description": "This represents a major shift for SEO: visibility is no longer just about ranking first; it's about being referenced, cited, and trusted by AI systems.",
                "section": "citations"
            },
            {
                "id": 3,
                "url": "https://www.yotpo.com/blog/google-trends-seo-strategy/",
                "title": "Google Trends For SEO In 2026: The Velocity Playbook - Yotpo",
                "description": "In 2026, optimization involves considering both the human user and the \"Synthesizer\"—the AI model constructing the answer.",
                "section": "citations"
            }
        ]
    }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.netnut.io/netnut-documentation/netnut-scraper-apis/llm-scraper/gemini.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
