Skip to main content
The Search endpoint queries the web and returns clean, ad-free results. It supports web, news, and image search — with optional AI-grounded answers that synthesize results into a single cited response. Endpoint: POST https://api.geekflare.com/search
Search the web and get structured JSON results.
import requests

response = requests.post(
"https://api.geekflare.com/search",
headers={"x-api-key": "YOUR_API_KEY"},
json={"query": "best running shoes 2025"}
)
print(response.json())

{
  "timestamp": 1778737930991,
  "apiStatus": "success",
  "apiCode": 200,
  "meta": {
    "query": "best running shoes 2025",
    "count": 10,
    "source": ["web"],
    "location": "us",
    "time": "any",
    "scrape": false,
    "scrapeLimit": 3,
    "test": { "id": "abc123" }
  },
  "data": [
    {
      "title": "Best Running Shoes of 2025 — Tested & Reviewed",
      "url": "https://example.com/best-running-shoes",
      "snippet": "We tested over 100 pairs to find the best running shoes for every type of runner...",
      "date": "Jan 15, 2025",
      "position": 1
    },
    {
      "title": "Top 10 Running Shoes for 2025",
      "url": "https://example2.com/running-shoes",
      "snippet": "From track to trail, here are the top running shoes this year...",
      "position": 2
    }
  ]
}

Search recent news articles on any topic.
response = requests.post(
    "https://api.geekflare.com/search",
    headers={"x-api-key": "YOUR_API_KEY"},
    json={
        "query": "AI news",
        "source": "news",
        "limit": 5
    }
)
{
  "timestamp": 1778737930991,
  "apiStatus": "success",
  "apiCode": 200,
  "meta": {
    "query": "AI news",
    "count": 5,
    "source": ["news"],
    "time": "any",
    "test": { "id": "abc123" }
  },
  "data": [
    {
      "title": "OpenAI releases new model with improved reasoning",
      "url": "https://techcrunch.com/2025/01/openai-new-model",
      "snippet": "OpenAI today announced a new model that significantly improves on reasoning tasks...",
      "date": "2 hours ago",
      "position": 1
    }
  ]
}

Search for images on any topic.
response = requests.post(
    "https://api.geekflare.com/search",
    headers={"x-api-key": "YOUR_API_KEY"},
    json={
        "query": "golden gate bridge",
        "source": "images",
        "limit": 5
    }
)
{
  "timestamp": 1778737930991,
  "apiStatus": "success",
  "apiCode": 200,
  "meta": {
    "query": "golden gate bridge",
    "count": 5,
    "source": ["images"],
    "test": { "id": "abc123" }
  },
  "data": [
    {
      "title": "Golden Gate Bridge at Sunset",
      "imageUrl": "https://example.com/images/golden-gate.jpg",
      "sourceUrl": "https://example.com/golden-gate-bridge",
      "width": 1920,
      "height": 1080
    }
  ]
}

Grounded Answer

Get an AI-synthesized answer with inline citations from search results. Ideal for RAG pipelines and AI agents.
response = requests.post(
    "https://api.geekflare.com/search",
    headers={"x-api-key": "YOUR_API_KEY"},
    json={
        "query": "what is the Model Context Protocol",
        "groundedAnswer": True
    }
)
{
  "timestamp": 1778737930991,
  "apiStatus": "success",
  "apiCode": 200,
  "meta": {
    "query": "what is the Model Context Protocol",
    "count": 10,
    "source": ["web"],
    "test": { "id": "abc123" }
  },
  "data": {
    "answer": "The Model Context Protocol (MCP) is an open standard developed by Anthropic that allows AI assistants to connect with external data sources and tools [1]. It provides a universal interface for LLMs to interact with APIs, databases, and local services [2].",
    "sources": [
      { "title": "MCP Documentation", "url": "https://modelcontextprotocol.io", "position": 1 },
      { "title": "Anthropic Blog", "url": "https://www.anthropic.com/news/model-context-protocol", "position": 2 }
    ]
  }
}

Search with Content Scraping

Scrape the top result pages and return their full content alongside search results.
response = requests.post(
    "https://api.geekflare.com/search",
    headers={"x-api-key": "YOUR_API_KEY"},
    json={
        "query": "NestJS authentication guide",
        "scrape": True,
        "scrapeLimit": 3
    }
)
{
  "timestamp": 1778737930991,
  "apiStatus": "success",
  "apiCode": 200,
  "meta": {
    "query": "NestJS authentication guide",
    "count": 10,
    "scrape": true,
    "scrapeLimit": 3,
    "test": { "id": "abc123" }
  },
  "data": [
    {
      "title": "NestJS Authentication with JWT",
      "url": "https://docs.nestjs.com/security/authentication",
      "snippet": "Authentication is an essential part of most applications...",
      "position": 1,
      "content": "# Authentication\n\nAuthentication is an essential part of most applications..."
    }
  ]
}

Markdown Output

Return results as clean Markdown instead of JSON. Ideal for feeding directly into LLMs.
response = requests.post(
    "https://api.geekflare.com/search",
    headers={"x-api-key": "YOUR_API_KEY"},
    json={
        "query": "TypeScript tips 2025",
        "format": "markdown"
    }
)
{
  "timestamp": 1778737930991,
  "apiStatus": "success",
  "apiCode": 200,
  "meta": {
    "query": "TypeScript tips 2025",
    "count": 10,
    "test": { "id": "abc123" }
  },
  "data": "1. [TypeScript 5.4 New Features](https://example.com)\n   - Use `satisfies` for safer type assertions...\n\n2. [TypeScript Tips for Large Codebases](https://example2.com)\n   - Prefer interface over type for objects..."
}

Time Filtering

Limit results to a specific time range.
ValueDescription
anyNo time filter (default)
hPast hour
dPast day
wPast week
mPast month
yPast year
h2, d7Past 2 hours, past 7 days, etc.
response = requests.post(
    "https://api.geekflare.com/search",
    headers={"x-api-key": "YOUR_API_KEY"},
    json={
        "query": "AI news",
        "source": "news",
        "time": "d"
    }
)

Domain Filtering

Include or exclude specific domains from results.
response = requests.post(
    "https://api.geekflare.com/search",
    headers={"x-api-key": "YOUR_API_KEY"},
    json={
        "query": "React hooks tutorial",
        "includeDomains": ["reddit.com", "stackoverflow.com"],
        "excludeDomains": ["pinterest.com"]
    }
)

Search within a specific category for more relevant results.
CategoryDescription
generalGeneral web search (default)
codeCode snippets and technical content
pdfPDF documents
researchAcademic and research papers
linkedinLinkedIn profiles and posts
wikiWikipedia content
response = requests.post(
    "https://api.geekflare.com/search",
    headers={"x-api-key": "YOUR_API_KEY"},
    json={
        "query": "binary search tree implementation",
        "category": "code"
    }
)

All Parameters

ParameterTypeDefaultDescription
querystringrequiredSearch query (max 2048 chars)
limitnumber10Number of results (1–100)
sourceweb | news | imageswebSearch source
formatjson | markdown | htmljsonOutput format
timestringanyTime filter (h, d, w, m, y, h2, d7, etc.)
locationstringusCountry code (ISO alpha-2)
categorystringgeneralCategory (general, code, pdf, research, linkedin, wiki)
includeDomainsarrayOnly return results from these domains
excludeDomainsarrayExclude results from these domains
groundedAnswerbooleanfalseReturn AI-synthesized answer with citations
scrapebooleanfalseScrape content from top result URLs
scrapeLimitnumber3Number of URLs to scrape (1–10, requires scrape: true)