Enter names separated by commas. For each person, this demo calls Exa's /search endpoint with type: "deep" and an outputSchema defining the fields to extract. Deep search finds the best sources, synthesizes across them, and returns structured data with field-level citations — all in one request.
import Exa from "exa-js";
const exa = new Exa(process.env.EXA_API_KEY);
const response = await exa.search("Sam Altman", {
type: "deep",
numResults: 10,
outputSchema: {
type: "object",
properties: {
company: { type: "string", description: "Current company" },
title: { type: "string", description: "Current job title" },
location: { type: "string", description: "City and state/country" },
university: { type: "string", description: "University attended" },
previousCompanies: { type: "string", description: "Notable past employers" },
interests: { type: "string", description: "Hobbies, sports, causes" }
},
required: ["company", "title", "location", "university", "previousCompanies", "interests"]
}
});
// response.output.content → { company, title, location, university, previousCompanies, interests }
// response.results → source pages used for grounding