Search

Advanced Search

Run complex queries with filters: date range, file type, exact phrases, excluded terms and site restriction. Available as GET (query params) or POST (JSON body).

Endpoint#

  • GET/search/advanced
  • POST/search/advanced

Credits: 1 per request

Parameters#

Provide the query as either query or q (one is required).

ParameterTypeRequiredDescription
query / qstringYesSearch query (1–500 chars)
limitnumberNoResults (1–10, default: 10)
dateRangestringNoOne of day, week, month, year
timeRangestringNoAlias of dateRange (day/week/month/year)
dateRestrictstringNoA window as d7, w2, m1, y1 (see Date filter under Web Search). Takes precedence over dateRange
fileTypestringNoFile type filter, max 20 chars (e.g. pdf)
exactTermsstringNoExact phrase to include, max 200 chars
excludeTermsstringNoTerms to exclude, max 200 chars
sitestringNoRestrict to a domain/URL (e.g. example.com)
siteSearchstringNoAnother name for site
glstringNoCountry code, max 5 chars (e.g. us)
hlstringNoInterface language code, max 5 chars (e.g. en)

A date filter (dateRange, timeRange or dateRestrict) cannot be combined with site, fileType or search operators in q: that request returns 400 DATE_FILTER_UNAVAILABLE and is not charged. exactTerms and excludeTerms work with a date.

Response#

The same response as Web Search (results in organic[]).

Examples

# A date and excluded termscurl "https://api.searlo.tech/api/v1/search/advanced?q=climate+report&dateRange=year&excludeTerms=opinion" \  -H "x-api-key: sk_your_api_key" # A file type on one site (no date)curl "https://api.searlo.tech/api/v1/search/advanced?q=climate+report&fileType=pdf&site=nasa.gov" \  -H "x-api-key: sk_your_api_key"
curl -X POST "https://api.searlo.tech/api/v1/search/advanced" \  -H "x-api-key: sk_your_api_key" \  -H "Content-Type: application/json" \  -d '{    "query": "climate report",    "fileType": "pdf",    "exactTerms": "sea level rise",    "excludeTerms": "opinion",    "site": "nasa.gov",    "limit": 10  }'
import osimport requests res = requests.post(    "https://api.searlo.tech/api/v1/search/advanced",    json={        "query": "climate report",        "dateRestrict": "m6",        "excludeTerms": "opinion",        "gl": "us",        "limit": 10,    },    headers={"x-api-key": os.environ["SEARLO_API_KEY"]},)print(res.json()["organic"])

Stuck? Write to [email protected], or check live status.