Endpoint Path

https://api.domainscraper.online/search/

Introduction

The /search/ endpoint allows customers to query their indexed domain data using Elasticsearch. Customers can apply filters, sort results, and paginate through large datasets. The endpoint also supports fetching only the count of matching results for optimized performance.

API Call Details

1. Perform a Search

Endpoint

POST <https://api.domainscraper.online/search/><indexname>

Description

Executes a search query on the specified index and retrieves matching results.

Path Parameter

Parameter Required Description
<indexname> Yes The name of the index to search within.

Headers

Request Body

Field Type Required Description
filters array Yes An array of filter objects to apply to the search. Each object specifies a field, value and a type.
size integer No The maximum number of results to return (default: 10, maximum: 10000).
sort array No Sorting rules for the search (e.g., [{ "domain.keyword": "asc" }]). Defaults to sorting by domain.
search_after array No For paginating results, include the search_after array from the previous response.
output_fields array No Fields to include in the output. Defaults to all fields. Maximum of 5 fields.
count_only boolean No If true, only the count of matching documents will be returned.

Filters

Filters must be an array of objects. Each filter contains the following fields:

Field Type Required Description
field string Yes The field in the index to filter by (e.g., domain.keyword, seo_score).
type string Yes The type of filter. Supported types are explained below.
value mixed Yes The value to match against the field.
gte mixed No For range filters: the "greater than or equal to" value.
lte mixed No For range filters: the "less than or equal to" value.
exclude boolean No If true, excludes results matching the filter. Default: false.