A collection is a group of different data sources that you can search using a single endpoint.
collection = graffo.collections.create(name="My First Collection")print(f"Created collection: {collection.readable_id}")
constcollection=awaitgraffo.collections.create({name:"My First Collection"});console.log(`Created collection: ${collection.readable_id}`);
curl-XPOST'https://api.graffo.io/collections'\-H'x-api-key: YOUR_API_KEY'\-H'Content-Type: application/json'\-d'{ "name": "My First Collection" }'
A source connection links a specific app or database to your collection. It handles authentication and automatically syncs data.
You can now search your collection and get the most relevant results from all connected sources.
You've now successfully set up Graffo, connected your first data source, and searched your first collection. To continue, you can explore more integrations and dive into the API reference. For support, check out the link below.
results = graffo.collections.search(
readable_id=collection.readable_id,
query="Find returned payments from user John Doe?",
)
for result in results.results:
print(result)
const results = await graffo.collections.search(
collection.readable_id,
{ query: "Find returned payments from user John Doe?" }
);
results.results.forEach(result => {
console.log(result);
});
curl -X GET 'https://api.graffo.io/collections/my-first-collection-abc123/search?query=Find%20returned%20payments%20from%20user%20John%20Doe%3F' \
-H 'x-api-key: YOUR_API_KEY'