{"components":{"securitySchemes":{"sessionCookie":{"description":"better-auth session cookie, set by signing in at /auth/login.","in":"cookie","name":"__Secure-better-auth.session_token","type":"apiKey"}}},"externalDocs":{"description":"API guide","url":"https://www.dataembed.com/docs/api"},"info":{"contact":{"email":"kai@kyh.io","url":"https://www.dataembed.com/contact"},"description":"Dataembed turns a plain-English query into a verified, structured dataset (a \"webset\").\n\nCreate a webset, start a run, then poll getSession until runAlive is false.\n\nEvery operation is a POST with a JSON body; errors are JSON with `code` and `message`.\n\nAnonymous websets need no credentials: the webset id is the capability to read and edit it, and anonymous creation is rate limited per IP.\n\nOperations marked with sessionCookie need a better-auth session cookie; there are no API keys.","title":"Dataembed API","version":"1.0.0"},"servers":[{"url":"https://www.dataembed.com/api/v1"}],"openapi":"3.1.2","paths":{"/search/addCriterion":{"post":{"operationId":"search.addCriterion","summary":"Add a criterion","description":"Adds a yes/no criterion every result is verified against, with cited evidence. Start a run afterwards to evaluate it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sessionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":{"type":"string","maxLength":500},"label":{"type":"string","minLength":1,"maxLength":80}},"required":["sessionId","label"]}}}},"responses":{"200":{"description":"OK","content":{}}}}},"/search/addEnrichment":{"post":{"operationId":"search.addEnrichment","summary":"Add an enrichment column","description":"Adds a column the agent extracts from each result's page, typed as text, url, number or date. Start a run afterwards to fill it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sessionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":{"type":"string","maxLength":500},"format":{"default":"text","type":"string","enum":["text","url","number","date"]},"label":{"type":"string","minLength":1,"maxLength":80}},"required":["sessionId","label"]}}}},"responses":{"200":{"description":"OK","content":{}}}}},"/search/cancelRun":{"post":{"operationId":"search.cancelRun","summary":"Cancel a run","description":"Stops the webset's in-progress run. Rows found so far are kept.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sessionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["sessionId"]}}}},"responses":{"200":{"description":"OK","content":{}}}}},"/search/claimSessions":{"post":{"operationId":"search.claimSessions","summary":"Claim anonymous websets","description":"Assigns anonymous websets (by id) to the signed-in user. Requires a session cookie.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sessionIds":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["sessionIds"]}}}},"responses":{"200":{"description":"OK","content":{}}},"security":[{"sessionCookie":[]}]}},"/search/createSession":{"post":{"operationId":"search.createSession","summary":"Create a webset","description":"Creates a webset from a plain-English query. Anonymous callers are rate limited per IP; the returned id is the capability to read it. Call startRun next.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"category":{"type":"string","enum":["people","companies","research","articles","posts"]},"notes":{"type":"string"},"originalQuery":{"type":"string","minLength":1}},"required":["originalQuery"]}}}},"responses":{"200":{"description":"OK","content":{}}}}},"/search/deleteSession":{"post":{"operationId":"search.deleteSession","summary":"Delete a webset","description":"Permanently deletes a webset and its results.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sessionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["sessionId"]}}}},"responses":{"200":{"description":"OK","content":{}}}}},"/search/getSession":{"post":{"operationId":"search.getSession","summary":"Get a webset","description":"Returns a webset with its criteria, enrichment columns, result rows, verdicts and cited evidence. Poll this while runAlive is true.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sessionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["sessionId"]}}}},"responses":{"200":{"description":"OK","content":{}}}}},"/search/listSessions":{"post":{"operationId":"search.listSessions","summary":"List your websets","description":"Lists the signed-in user's websets, newest first. Requires a session cookie.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"default":20,"type":"integer","minimum":1,"maximum":100}}}}}},"responses":{"200":{"description":"OK","content":{}}},"security":[{"sessionCookie":[]}]}},"/search/renameSession":{"post":{"operationId":"search.renameSession","summary":"Rename a webset","description":"Sets a webset's display title.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sessionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string","minLength":1,"maxLength":120}},"required":["sessionId","title"]}}}},"responses":{"200":{"description":"OK","content":{}}}}},"/search/startRun":{"post":{"operationId":"search.startRun","summary":"Start a run","description":"Starts the agent that searches the web, verifies each result against the criteria and fills enrichment columns. Returns 409 CONFLICT when a run is already in progress.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sessionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["sessionId"]}}}},"responses":{"200":{"description":"OK","content":{}}}}}}}