HomeProductsRAG Search

RAG Search

NEW

FREE 1440 requests/day

€0.0059 + VAT

FREE requests

Quickly find the most relevant text extracts from your documents using RAG technology and obtain contextual, secure answers without data leaks. All via API and in real time.

Delivery

In real time

API

AI

available for
  • gz

RAG Search is an API service based on Retrieval-Augmented Generation (RAG) technology that enables intelligent searches within your data and documents, identifying the most relevant information in real time from a query. Thanks to an advanced AI-powered system, the service returns one or more relevant text extracts (snippets), ensuring accurate and secure responses without any risk of sensitive data leaks.

The RAG-as-a-Service by Openapi technology allows companies to access, process, and generate accurate responses based on their proprietary data. Our service bridges the gap between Large Language Models (LLM) and the organization’s specific knowledge, eliminating “hallucinations” and providing reliable, consistent, and fully contextualized responses.

With RAG-as-a-Service, you can easily and scalably integrate RAG capabilities into your applications without managing complex infrastructure or data pipelines. The service allows you to automatically add and index your structured data, enabling the LLM to access up-to-date and relevant information in real time. In this way, Openapi combines the power of advanced language models with contextual search on company data, delivering precise, current, and truly knowledge-based responses.

In addition to RAG Search, Openapi offers two other document search services: Search with Answer (which provides AI-generated answers) and Conversation (which allows starting new conversations with contextualized responses based on previous conversations). All three services are available globally.

For RAG Search to function properly and for the generated response to be as relevant and consistent as possible, three steps must be followed:

  • Create a new RAG
  • Upload a document
  • Start the indexing process

Indexing refers to the process that allows retrieving the most relevant information quickly in response to a query. To obtain contextual and accurate responses, it is essential to start indexing whenever a RAG is modified (document uploaded or deleted).

Create a New RAG

POST /rag

The first step, as mentioned, involves creating a new, empty RAG, into which one or more documents can then be uploaded. This is possible through the POST /rag endpoint.

REQUEST EXAMPLE

The request should include:

  • Name to assign to the RAG
  • Optional activation of OCR (Optical Character Recognition)
  • Optional time interval for automatic indexing start
{
  "name": "RAGTest",
  "options": {
    "ocr": false,
    "autoIndexingIntervalHours": 0
  },
  "callback": {
    "method": "POST",
    "field": "string",
    "url": "https://www.mysite.it/callback.php",
    "data": {}
  }
}

RESPONSE EXAMPLE

The response returns RAG details such as ID and name, state, options, settings (e.g., OCR off), total and indexed documents, creation, update, and last indexing dates.

{
  "data": {
    "id": "68947e1e0dab7e743108abfb",
    "name": "RAGTest",
    "state": "ready",
    "options": {
      "ocr": false,
      "autoIndexingIntervalHours": 0
    },
    "totalDocuments": 0,
    "totalIndexedDocuments": 0,
    "sizeMegaByte": 0,
    "createdAt": "2025-09-04T10:45:42.036Z",
    "updatedAt": "2025-09-04T10:45:42.036Z",
    "indexedAt": "2025-09-04T10:45:42.036Z",
    "indexingRunAt": "2025-09-04T10:45:42.036Z",
    "callback": {
      "method": "POST",
      "field": "string",
      "url": "https://www.mysite.it/callback.php",
      "data": {}
    }
  },
  "success": true,
  "message": "",
  "error": null
}

Upload a Document

POST /rag/{id}/documents

Once the RAG is created, you can proceed to upload a document into it via the POST /rag/{id}/documents endpoint.

REQUEST EXAMPLE

The request must specify the RAG ID where the document will be uploaded.

The payload must include:

  • Document name (fileName)
  • Document content (fileContent): a Base64-encoded string in JSON format
  • Metadata (string, document date, geolocation coordinates, boolean value), i.e., additional customizable information associated with the document, useful when using the RAG Search service
{
  "fileName": "documentTest",
  "fileContent": "string",
  "metadata": {
    "custom_key_str": "string",
    "custom_key_date": "2025-09-04T10:51:06.259Z",
    "custom_key_int": 0,
    "custom_key_geo_latitude": 0,
    "custom_key_geo_longitude": 0,
    "custom_key_bool": true
  }
}

RESPONSE EXAMPLE

The response provides details about the document, including ID, name, state, metadata, size, file type, creation, and update dates.

{
  "data": [
    {
      "id": "string",
      "name": "string",
      "state": "string",
      "metadata": {
        "custom_key_str": "string",
        "custom_key_date": "2025-09-04T10:51:06.260Z",
        "custom_key_int": 0,
        "custom_key_geo_latitude": 0,
        "custom_key_geo_longitude": 0,
        "custom_key_bool": true
      },
      "sizeMegaByte": 0,
      "mimeType": "string",
      "createdAt": "2025-09-04T10:51:06.260Z",
      "updatedAt": "2025-09-04T10:51:06.260Z",
      "paymentDueDate": "2025-09-04T10:51:06.260Z"
    }
  ],
  "success": true,
  "message": "",
  "error": null
}

At any time, you can retrieve the list of documents within a RAG using the GET /rag/{id}/documents endpoint.

Start Indexing Process

PATCH /rag/{id}

As mentioned above, to obtain contextual and accurate responses, it is essential to start indexing whenever a RAG is modified (document uploaded or deleted). If this step is skipped, the system will continue relying on previous data only.

Indexing can be started manually via PATCH/rag/{id}, or automatic indexing can be set to run every few hours (user-defined). Automatic indexing is configured when creating the RAG via the POST /rag endpoint. There are no additional costs for either manual or automatic indexing.

REQUEST EXAMPLE

The request must specify the RAG ID for which manual indexing is started.

The payload must include the startIndexing parameter set to true to initiate indexing:

"startIndexing": true

RESPONSE EXAMPLE

The response provides details on the RAG name, state (e.g., ready, indexing), settings (e.g., OCR on/off, automatic indexing on/off), number of documents present and indexed, current RAG size in MB, creation, and update dates.

{
  "data": {
    "id": "68947e1e0dab7e743108abfb",
    "name": "RAGTest",
    "state": "indexing",
    "options": {
      "ocr": false,
      "autoIndexingIntervalHours": 0
    },
    "totalDocuments": 0,
    "totalIndexedDocuments": 0,
    "sizeMegaByte": 0,
    "createdAt": "2025-09-04T10:55:37.306Z",
    "updatedAt": "2025-09-04T10:55:37.306Z",
    "callback": {
      "method": "POST",
      "field": "string",
      "url": "https://www.mysite.it/callback.php",
      "data": {}
    }
  },
  "success": true,
  "message": "",
  "error": null
}

RAG SEARCH

POST /rag/search

After completing the three steps above, you can perform the actual search through the POST /rag/search endpoint.

As mentioned, RAG Search allows you—via API and in real time—to find the document or information you need across all your files using an AI-powered search engine, starting from a query. All this is fully secure and without any risk of sensitive data leaks.

REQUEST EXAMPLE

The request should include:

  • RAG ID where the search will be performed
  • Query, i.e., the word or phrase to search to find specific documents
  • Maximum length (max_len), the maximum number of results to return, sorted by relevance
  • Metadata filters (metadata_filter), any filters set during document upload (string, document date, geolocation, boolean)
  • Settings, additional search parameters such as prompt style (e.g., basic, technical, non-technical, brief, list format)
{
  "ragId": "688b2ab3bccc6a603202f87c",
  "query": "what services are available?",
  "max_len": 5,
  "metadata_filter": "(custom_key_int<175 AND custom_key_bool = \"true\") OR (custom_key_int<125 AND custom_key_bool = \"false\")",
  "settings": {
    "prompt_style": "basic"
  }
}

RESPONSE EXAMPLE

RAG Search returns information about the most relevant documents for your query, including text snippets, helping you quickly locate the data you need.

Specifically, the response payload provides:

  • One or more relevant text extracts found in the document (snippets)
  • Document ID
  • RAG ID from which the document comes
  • Document name
  • Document state
  • Metadata
{
  "data": [
    [
      {
        "snippets": [
          "string"
        ],
        "id": "689c70313f292734010a7dda",
        "ragId": "689c6ed7b283ac0aa40c1555",
        "name": "documentTest",
        "state": "indexing",
        "metadata": {
          "custom_key_str": "string",
          "custom_key_date": "2025-09-04T13:32:33.635Z",
          "custom_key_int": 0,
          "custom_key_geo_latitude": 0,
          "custom_key_geo_longitude": 0,
          "custom_key_bool": true
        }
      }
    ]
  ],
  "success": true,
  "message": "",
  "error": null
}

Thanks to RAG Search, you can query your documents quickly, ensuring the system returns the most accurate responses possible and extracts information only from uploaded and indexed data. This keeps your information fully secure.

The service is especially designed for companies managing large volumes of documents (contracts, reports, manuals), such as:

  • Law firms, for rapid document verification and analysis
  • CRM and knowledge base systems that require fast, reliable internal searches
  • Companies in finance, insurance, and healthcare sectors, where data precision and security are critical for reliable operations
  • E-commerce and marketplaces seeking always-updated operational information to optimize processes and decisions

In general, RAG Search is ideal for any organization or professional needing fast access to precise, up-to-date information within their documents, optimizing search times and result reliability.

Sign Up

Do you need help?

Haven't found the answer you're looking for?

Fill in all the details, we will get back to you as soon as possible!

Frequently Asked Questions

RAG Search is an API service based on Retrieval-Augmented Generation (RAG) technology that enables intelligent searches within your data and documents.

The system identifies the most relevant information in real time based on a query and returns pertinent and contextual text excerpts (snippets). All of this happens securely, with no risk of sensitive data leakage.

What is RAG Search?

Openapi’s RAG-as-a-Service technology allows companies to query their proprietary data and obtain reliable, relevant, and contextualized answers, while reducing the risk of “hallucinations” typical of Large Language Models (LLMs).

Integration is simple and scalable, with no need to manage complex infrastructure: documents are automatically indexed, allowing the model to access up-to-date and relevant information in real time.

In this way, Openapi combines the power of artificial intelligence with the precision of enterprise data search, ensuring answers are always grounded in the organization’s actual knowledge.

How does Openapi’s RAG-as-a-Service technology work?

If a document is not indexed, the updated information it contains will not be available for searches.

In practice, until reindexing is performed, RAG Search will continue to provide answers based only on previously indexed data, ignoring any recent changes or additions.

To ensure accurate and complete results, it is therefore essential to start the indexing process whenever a modification is made to the RAG (such as uploading or deleting a document).

Indexing is free of charge and can be performed manually or set to run automatically at regular intervals.

What happens if a document is not indexed?

Absolutely. All data remains confined within the proprietary environment and is never used to train external models.

Processing takes place securely, with no risk of leakage or exposure of sensitive information.

Does RAG guarantee data security?

The system supports the most common file formats: JPEG (.jpeg/.jpg), PNG (.png), PDF (.pdf), plain text (.txt), Word documents (.doc/.docx), Excel spreadsheets (.xls/.xlsx), and PowerPoint presentations (.ppt/.pptx).

Which file formats can be uploaded?

Yes, all three RAG services (Search, Search with Answer, and Conversation) are available worldwide.

Are RAG services available globally?

All three services are based on the same RAG technology and allow you to search through your documents with relevant and contextual answers to your query, but they return different types of output:

  • RAG Search provides one or more relevant text excerpts found in the uploaded and indexed documents
  • RAG Search with Answer generates a single natural language answer.
  • RAG Conversation allows you to have conversations that maintain the memory of the dialogue and take into account the historical context when responding. The output is generated in natural language and returned within a dialogue that can be resumed via the session ID, ensuring continuity between interactions.

All services operate securely, with no risk of sensitive data leakage.

What is the difference between RAG Search, RAG Search with Answer, and RAG Conversation?

RAG services are ideal for companies that manage large volumes of documents (contracts, reports, manuals) and for any organization or professional who needs quick access to precise, up-to-date information.

For example, they are particularly suited for:

  • Law firms, for fast document checks and analyses
  • CRM and knowledge base systems that require quick and reliable internal searches
  • Companies in finance, insurance, and healthcare, where accuracy and data security are essential
  • E-commerce and marketplaces that need constantly updated operational information to optimize processes and decision-making

In general, RAG services support any organization seeking to improve efficiency, speed, and reliability in managing and searching company information.

Who are the RAG services designed for?

Responses are provided in real time.

What is the response time for the RAG service?

The cost varies depending on the service requested.

For document uploads (endpoint POST /rag/{id}/documents), the cost is calculated based on file size, at €0.0065/MB. When using the OCR service, an additional cost of €0.00190 per page applies.

For the RAG Search service, pricing starts at €0.0034 per request for subscription plans and €0.0059 per single request.

What are the costs of the RAG Search service?