curl --request POST \
--url https://api.exa.ai/websets/v0/websets/preview \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"search": {
"query": "<string>",
"entity": {
"type": "company"
},
"count": 10
}
}
'{
"search": {
"entity": {
"type": "company"
},
"criteria": [
{
"description": "<string>"
}
]
},
"enrichments": [
{
"description": "<string>",
"format": "text",
"options": [
{
"label": "<string>"
}
]
}
],
"items": [
{
"id": "<string>",
"properties": {
"type": "person",
"url": "<string>",
"description": "<string>",
"person": {
"name": "<string>",
"location": "<string>",
"position": "<string>",
"company": {
"name": "<string>",
"location": "<string>"
},
"pictureUrl": "<string>"
}
},
"createdAt": "2023-11-07T05:31:56Z"
}
]
}Preview how a search query will be decomposed before creating a webset. This endpoint performs the same query analysis that happens during webset creation, allowing you to see the detected entity type, generated search criteria, and available enrichment columns in advance.
Use this to help users understand how their search will be interpreted before committing to a full webset creation.
curl --request POST \
--url https://api.exa.ai/websets/v0/websets/preview \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"search": {
"query": "<string>",
"entity": {
"type": "company"
},
"count": 10
}
}
'{
"search": {
"entity": {
"type": "company"
},
"criteria": [
{
"description": "<string>"
}
]
},
"enrichments": [
{
"description": "<string>",
"format": "text",
"options": [
{
"label": "<string>"
}
]
}
],
"items": [
{
"id": "<string>",
"properties": {
"type": "person",
"url": "<string>",
"description": "<string>",
"person": {
"name": "<string>",
"location": "<string>",
"position": "<string>",
"company": {
"name": "<string>",
"location": "<string>"
},
"pictureUrl": "<string>"
}
},
"createdAt": "2023-11-07T05:31:56Z"
}
]
}Your Exa API key
Weather you want to search for a preview list of items or not
Search parameters
Show child attributes
Natural language search query describing what you are looking for.
Be specific and descriptive about your requirements, characteristics, and any constraints that help narrow down the results.
1 - 5000Entity used to inform the decomposition.
It is not required to provide it, we automatically detect the entity from all the information provided in the query. Only use this when you need more fine control.
Show child attributes
"company"When query parameter search=true, the number of preview items to return.
1 <= x <= 10Preview of the webset
Show child attributes
Detected enrichments from the query.
Show child attributes
Description of the enrichment.
Format of the enrichment.
text, date, number, options, email, phone, url Preview items matching the search criteria.
Show child attributes
The unique identifier for the preview item
The properties of the preview item
Show child attributes
"person"The URL of the person profile
Short description of the relevance of the person
Show child attributes
The name of the person
The location of the person
The current work position of the person
The image URL of the person
The date and time the preview was created