Skip to main content
POST
/
search
Search API for AI Agents & LLMs
curl --request POST \
  --url https://api.geekflare.com/search \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "query": "best running shoes",
  "limit": 10,
  "time": "d",
  "location": "us",
  "source": "web",
  "category": "code",
  "includeDomains": [
    "reddit.com",
    "stackoverflow.com"
  ],
  "excludeDomains": [
    "pinterest.com"
  ],
  "format": "json",
  "scrape": false,
  "scrapeLimit": 3
}
'
{
  "timestamp": 1776233511285,
  "apiStatus": "success",
  "apiCode": 200,
  "meta": {
    "query": "best running shoes",
    "count": 10,
    "source": "web",
    "location": "us",
    "time": "d",
    "scrape": false,
    "scrapeLimit": 3,
    "test": {
      "id": "mxqx9v9y0742lap6altwdteqd28t23nq"
    }
  },
  "data": [
    {
      "title": "Best Running Shoes of 2025",
      "url": "https://example.com/running-shoes",
      "snippet": "We tested over 100 pairs to find the best running shoes...",
      "position": 1,
      "date": "Dec 18, 2025",
      "content": "Full article cleaned for LLM consumption..."
    }
  ]
}

Authorizations

x-api-key
string
header
required

API Key required for all endpoints

Body

application/json
query
string
required

Search query

Maximum string length: 2048
Example:

"best running shoes"

limit
number
default:10

Number of results

Required range: 1 <= x <= 100
Example:

10

time
string
default:any

Time filter (h, d, w, m, y or h2, d7, etc.)

Example:

"d"

location
string
default:us

Country code (ISO alpha-2)

Example:

"us"

source
enum<string>
default:web

Search source

Available options:
web,
news,
images
Example:

"web"

category
enum<string>
default:general

Category filter

Available options:
general,
code,
pdf,
research,
linkedin,
wiki
Example:

"code"

includeDomains
string[]

Include only these domains

Example:
["reddit.com", "stackoverflow.com"]
excludeDomains
string[]

Exclude these domains

Example:
["pinterest.com"]
format
enum<string>
default:json

Output format

Available options:
json,
markdown,
html
scrape
boolean
default:false

scrape and extract content from SERP result URLs

Example:

false

scrapeLimit
number
default:3

Number of URLs to scrape (requires scrape: true)

Required range: 1 <= x <= 10
Example:

3

Response

Search results (format depends on request)

timestamp
number
required

Timestamp of the request in milliseconds

Example:

1776233511285

apiStatus
enum<string>
required

API status message

Available options:
success,
failure
Example:

"success"

apiCode
number
required

API status code

Example:

200

meta
object
required
data
object[]
required