Content
Query a collection
Parameters
Name | Required | Type | Description |
---|---|---|---|
collection | required | string | The ID of the colleciton to query |
query | required | string | The text query to query your collection against |
curl --request POST \
--url https://api.embedding.io/v0/query \
--header 'Authorization: Bearer YOUR_API_KEY' \
--json '{
"collection": "col_lPMjKLBRLZ4qVe",
"query": "What makes a good essay?"
}'
Returns
[
{
"page": {
"id": "pag_8dVBOXzj5XJxG9",
"url": "https://paulgraham.com/useful.html",
"title": "How to Write Usefully",
"description": null,
"og_type": null,
"og_image": null,
"h1": null
},
"metadata": [],
"content": "February 2020 \nWhat should an essay be? Many people would say persuasive...",
"index": 1,
"score": 0.872881591
},
{
"page": {
"id": "pag_qxQKYLED16l0Np",
"url": "https://paulgraham.com/best.html",
"title": "The Best Essay",
"description": null,
"og_type": null,
"og_image": null,
"h1": null
},
"metadata": [],
"content": "I already aim for it. Breadth and novelty are the two things I'm always chasing...",
"index": 10,
"score": 0.868309259
}
// ...
]