This page will help you get started with Pigro Intelligent Search API

What is Pigro?

Pigro is a ready-to-use intelligent search solution that enables you to find clear-cut answers across your documents. Using semantic models combined with statistical algorithms it retrieves the span of text in answer to the user's query directly from imported documents.
Our system does not require any semantic configuration or tuning and allows you to easily implement a search solution in your application through API.

How Pigro works?

In 3 steps: import, training, search.

  • import: send your content to Pigro through Upload API. We support Plain text, HTML, and Office like documents (Word, PowerPoint, Excel, and OpenOffice formats).
  • training: after the upload, thanks to the training content will be available for searching.
  • search: as soon as your library is trained you can answer queries in natural language with Search API. Our solution will compare the users’ query with the information inside your library to extract the most relevant spans of text, character offsets of your original content.

How do i set up?

API Key

To start using Pigro APIs you just need to browse to api.pigro.ai and fill in the form with your email. You will receive your API Key token to be used in all the API requests.

730730

The API Key needs to be set in each API call as a header:

curl
...
--header 'x-api-key: yourAPIKeyHere' \
...

Set the language

As soon as you register you can start assembling your library by uploading your documents. Before doing that, you should update your settings specifying the language of your documents (the default language is english). You can do that with the Update Settings API in the following way:

curl --location --request POST 'https://api.pigro.ai/update_settings' \
--header 'Content-Type: application/json' \
--header 'x-api-key: yourAPIKeyHere' \
--data-raw '
{
    "settings": {
        "language": "en"
  }
}
'

You can specify other settings as well (see more in the Update Settings API) but this step needs to be done before uploading your documents for the search API to work properly. If you need to change again the language you should first delete all your documents. Then, after changing the language, re-upload them to your library.

If you need to support more than a language then you should create more than one library, by using different API Key tokens. At the moment you can only obtain one API Key token per email.