cURL
curl --request POST \ --url https://piloterr.com/api/v2/datasets/{source}/{endpoint} \ --header 'Content-Type: application/json' \ --header 'x-api-key: <x-api-key>' \ --data '{ "query": {}, "sort": [ {} ], "size": 123, "from_": 123 }'
{ "hits": [ { "_id": "689823", "_type": "_doc", "_index": "xxxxx_company", "_score": 14.764872, "_source": { "name": "OpenAI", "domain": "openai.com", "founded": "2015-12-11", "website": "https://www.openai.com", "created_at": "2024-05-08T01:35:51.668+00:00", "updated_at": "2024-05-26T05:40:32.249+00:00", "description": "OpenAI is an AI research and deployment company that conducts research and implements machine learning. The research organization is dedicated to advancing artificial intelligence safely and beneficially.", "staff_range": "501-1000", "company_type": "for profit", "last_crawled_at": "2024-05-26T05:40:29.188+00:00" } } ], "total": { "value": 2, "relation": "eq" }, "max_score": 14.764872, "search_metadata": { "credits": { "product_2_company_count": 2541156, "product_1_company_count": 0 }, "account_id": "*", "account_name": "*" } }
Search API endpoint allows you to search for data in the datasets.
{ "query": { "bool": { "must": [ { "match_phrase": { "name": "Spotify" } } ], "filter": [], "should": [], "must_not": [] } }, "sort": [], "size": 10 }
{ "query": { "bool": { "must_not": [ { "terms": { "name.keyword": ["Facebook", "Google", "Amazon"] } } ] } } }
{ "query": { "bool": { "must": [ { "match": { "company_type": "for profit" } } ], "must_not": [ { "range": { "founded": { "lt": "2000-01-01" } } }, { "term": { "staff_range.keyword": "1-10" } }, { "match": { "description": "blockchain" } } ] } } }
[ { "founded": "desc" }, { "name.keyword": "asc" } ]
20
100
Hide Properties
Was this page helpful?