Embeddings Search

Utilize our Embeddings Search API to perform nuanced searches across integrated third-party data sources and internal documents. Leverage the "context_id" to scope searches to specific business contexts for enhanced relevance.

POST /v1/search

Begin your data discovery by issuing a POST request to the /v1/search endpoint. The following cURL example includes using a "context_id" to limit the search scope:

curl -X POST https://api.gethyper.ai/v1/search \
  -H "Authorization: Bearer {your_api_key}" \
  -H "Content-Type: application/json" \
  -d '{"query": "quarterly sales report", "context_id": "123e4567-e89b-12d3-a456-426614174000"}'

In this example, replace {your_api_key} with your actual API key and ensure its security. Reset your API key immediately if you suspect any compromise.

Response

The API's response is an array of objects, detailing the search results, as shown in this structured example:

Example response

[
  {
    "metadata": {
      "name": "Quarterly Sales Report Q1 2023",
      "source": "https://enterprise.gethyper.ai/reports/q1-sales-2023",
      "type": "web"
    },
    "page_content": "Quarterly Sales Report Q1 2023\nExecutive Summary\nThe first quarter saw a 17% increase in sales across all sectors. The enterprise software division exceeded its targets with a significant contribution to the overall growth...",
    "type": "Document"
  },
  {
    "metadata": {
      "name": "Market Analysis: Q1 Consumer Trends",
      "source": "https://enterprise.gethyper.ai/analyses/q1-market-trends",
      "type": "web"
    },
    "page_content": "Market Analysis: Q1 Consumer Trends\nAbstract\nThis paper provides an in-depth analysis of consumer trends in the first quarter of 2023, highlighting the shifts in customer behavior...",
    "type": "Document"
  }
]

In this example, the response includes detailed content from two sources, providing comprehensive information and references. This structure ensures you have access to a wealth of data, facilitating informed decisions and insights.