Preview a webset
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": "Marketing agencies based in the US, that focus on consumer products. Get brands worked with and city",
"entity": {
"type": "company"
},
"count": 10
}
}
'import requests
url = "https://api.exa.ai/websets/v0/websets/preview"
payload = { "search": {
"query": "Marketing agencies based in the US, that focus on consumer products. Get brands worked with and city",
"entity": { "type": "company" },
"count": 10
} }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
search: {
query: 'Marketing agencies based in the US, that focus on consumer products. Get brands worked with and city',
entity: {type: 'company'},
count: 10
}
})
};
fetch('https://api.exa.ai/websets/v0/websets/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"search": {
"entity": {
"type": "company"
},
"criteria": [
{
"description": "<string>"
}
]
},
"enrichments": [
{
"description": "<string>",
"format": "text",
"options": [
{
"label": "<string>"
}
]
}
],
"items": [
{
"id": "<string>",
"properties": {
"url": "<string>",
"description": "<string>",
"person": {
"name": "<string>",
"location": "<string>",
"position": "<string>",
"company": {
"name": "<string>",
"location": "<string>"
},
"pictureUrl": "<string>",
"workHistory": [
{
"title": "<string>",
"location": "<string>",
"dates": {
"from": "<string>",
"to": "<string>"
},
"company": {
"id": "<string>",
"name": "<string>",
"linkedinUrl": "<string>"
}
}
],
"educationHistory": [
{
"degree": "<string>",
"dates": {
"from": "<string>",
"to": "<string>"
},
"institution": {
"id": "<string>",
"name": "<string>",
"linkedinUrl": "<string>"
}
}
]
},
"type": "person"
},
"createdAt": "2023-11-07T05:31:56Z"
}
]
}Websets
Preview a webset
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.
Preview a webset
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": "Marketing agencies based in the US, that focus on consumer products. Get brands worked with and city",
"entity": {
"type": "company"
},
"count": 10
}
}
'import requests
url = "https://api.exa.ai/websets/v0/websets/preview"
payload = { "search": {
"query": "Marketing agencies based in the US, that focus on consumer products. Get brands worked with and city",
"entity": { "type": "company" },
"count": 10
} }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
search: {
query: 'Marketing agencies based in the US, that focus on consumer products. Get brands worked with and city',
entity: {type: 'company'},
count: 10
}
})
};
fetch('https://api.exa.ai/websets/v0/websets/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"search": {
"entity": {
"type": "company"
},
"criteria": [
{
"description": "<string>"
}
]
},
"enrichments": [
{
"description": "<string>",
"format": "text",
"options": [
{
"label": "<string>"
}
]
}
],
"items": [
{
"id": "<string>",
"properties": {
"url": "<string>",
"description": "<string>",
"person": {
"name": "<string>",
"location": "<string>",
"position": "<string>",
"company": {
"name": "<string>",
"location": "<string>"
},
"pictureUrl": "<string>",
"workHistory": [
{
"title": "<string>",
"location": "<string>",
"dates": {
"from": "<string>",
"to": "<string>"
},
"company": {
"id": "<string>",
"name": "<string>",
"linkedinUrl": "<string>"
}
}
],
"educationHistory": [
{
"degree": "<string>",
"dates": {
"from": "<string>",
"to": "<string>"
},
"institution": {
"id": "<string>",
"name": "<string>",
"linkedinUrl": "<string>"
}
}
]
},
"type": "person"
},
"createdAt": "2023-11-07T05:31:56Z"
}
]
}Authorizations
apiKeybearer
Pass your Exa API key in the x-api-key header. You can also authenticate with Authorization: Bearer .
Query Parameters
Whether you want to search for a preview list of items or not
Body
application/json
Search parameters
Show child attributes
Show child attributes