Test a search input
Runs the first search once, its first page only, with the managed Dataflow key, and returns its results so columns can be mapped: one row per result, each with search_query. Nothing is stored: use {"type": "search", …} as a project's input, and every run searches again, reading up to pages pages of every search. The call is billed like any call of the search endpoint. At most 10 previews a minute per workspace, URL and search previews together. Then map the project endpoint's parameters to these columns, e.g. a product endpoint's query to {"column": "asin"}.
ApiKeyAuthX-Api-Key<token>application/json- body
endpoint_id*stringA search endpoint: its path ends in /search and it takes a query
1 <= lengthqueries*array<>Up to 100 searches, each run on its own: keywords, or search URLs when the endpoint takes them in its query (e.g. https://allegro.pl/listing?string=iphone). Repeats are dropped. Each row's search_query column says which search found it.
1 <= items <= 100params?The search's other parameters, the same at every run (e.g. Amazon's domain). Not query nor page.
pages?integerPages of results read for each search at every run, when the endpoint has pages (default 5); the reading stops at the last page. Each page is one billed call of the search endpoint, and a run makes at most 1000 (searches × pages).
1 <= value <= 50The first page of results (id is empty: nothing is stored)
application/json- response
id*stringfilename*string|nullcolumns*array<string>row_count*integersample*array<>sheets*array<string>stats*curl -X POST 'https://dataflow.piloterr.com/v1/inputs/search/preview' \
-H 'Content-Type: application/json' \
-d '{
"endpoint_id": "cm0p7x8vf000b08l4c9u1h6rt",
"queries": [
"playstation 5"
],
"params": {
"domain": "com"
},
"pages": 2
}'{
"id": "",
"filename": "playstation 5",
"columns": [
"search_query",
"url",
"asin",
"price",
"title",
"rating",
"reviews_count"
],
"row_count": 1,
"sample": [
{
"search_query": "playstation 5",
"url": "https://www.amazon.com/dp/B0FRGMYJMG",
"asin": "B0FRGMYJMG",
"price": "",
"title": "PlayStation®5 Digital Edition – 825GB",
"rating": "4.8",
"reviews_count": "196"
}
],
"sheets": [],
"stats": {
"empty_rows": 0,
"duplicate_rows": 0,
"deduplicated": false,
"row_error_count": 0,
"row_errors": []
}
}