Start building with Worlds API in under 5 minutes
npm install @fartlabs/worlds
import { World } from "@fartlabs/worlds"; const world = new World({ baseUrl: "https://api.wazoo.tech/v1", // Adjust if using a different endpoint apiKey: "YOUR_API_KEY", worldId: "YOUR_WORLD_ID", });
await world.sparqlUpdate(` INSERT DATA { <http://example.org/ethan> <http://schema.org/name> "Ethan" . <http://example.org/ethan> <http://schema.org/jobTitle> "Software Engineer" . } `);
const result = await world.sparqlQuery(` SELECT ?name ?title WHERE { ?person <http://schema.org/name> ?name ; <http://schema.org/jobTitle> ?title . } `); console.log(result);
const searchResults = await world.search("Who is the software engineer?"); console.log(searchResults);