GET
/
search
curl --request GET \
  --url https:/api.ydc-index.io/search \
  --header 'X-API-Key: <api-key>'
{
  "hits": [
    {
      "url": "https://you.com",
      "title": "The World's Greatest Search Engine!",
      "description": "Search on YDC",
      "favicon_url": "https://someurl.com/favicon",
      "thumbnail_url": "https://www.somethumbnailsite.com/thumbnail.jpg",
      "snippets": [
        "I'm an AI assistant that helps you get more done. What can I help you with?"
      ]
    }
  ],
  "latency": 1
}

Before You Get Started

To register for usage of our Search API, please reach out via email at api@you.com.

Search Operators

OperatorDescriptionExample
siteSearches for webpages from a particular domain (including subdomains)site:uscourts.gov USA v. Enron
+Searches for webpages that contain the exact term after the +Enron +GAAP
-Searches for webpages that do not contain the exact term after the -guitar -prs
ANDLogical operator to combine expressionsguitar +prs AND +silversky
ORLogical operator to combine expressionsguitar -prs AND -silversky
NOTNegation of expressionsUSA v. Enron NOT site:uscourts.gov

Authorizations

X-API-Key
string
header
required

Query Parameters

query
string
required

Search query used to retrieve relevant results from index. You may also include search operators to refine your search.

num_web_results
integer

Specifies the maximum number of web results to return. Range 1 ≤ num_web_results ≤ 20.

offset
integer

Indicates the offset for pagination. The offset is calculated in multiples of num_web_results. For example, if num_web_results = 5 and offset = 1, results 5–10 will be returned. Range 0 ≤ offset ≤ 9.

country
string

Country Code, one of ['AR', 'AU', 'AT', 'BE', 'BR', 'CA', 'CL', 'DK', 'FI', 'FR', 'DE', 'HK', 'IN', 'ID', 'IT', 'JP', 'KR', 'MY', 'MX', 'NL', 'NZ', 'NO', 'CN', 'PL', 'PT', 'PH', 'RU', 'SA', 'ZA', 'ES', 'SE', 'CH', 'TW', 'TR', 'GB', 'US'].

safesearch
string

Configures the safesearch filter for content moderation. off - no filtering applied.moderate - moderate content filtering (default). strict - strict content filtering.

Response

200 - application/json
A JSON object containing array of search hits and request latency
hits
object[]
latency
number

Indicates the time (in seconds) taken by the API to generate the response.

Example:

1