# Search Public Engines

## Prerequisites

* Register with [Sepana](https://app.sepana.io)&#x20;
* Create an API key (API keys can be viewed [here](https://app.sepana.io/account?tab=API+Access)).

<figure><img src="/files/Yua2UyqmNFBLNnqTvckm" alt=""><figcaption></figcaption></figure>

## Steps

### Fetch API key

This step requires a user to fetch a valid API key from their Sepana dashboard. For this particular example, we will be copying the API key with the name "**read-only-key**" displayed in the above image. Click on ![](/files/l9I8fssWeX7X44bmAxX3)to copy the API key.&#x20;

```
API_KEY = "Gh_rNsAhI-9Ws2BbmqrJpZ49pFkUZuZtsrE_FEg5N5Wce6hAQZoCpQ"
```

### List Public Engines

Use the API key obtained in the [previous section](#copy-any-api-key-associated-with-your-account) to list the available Public Engines within Sepana. The [List Public Engines endpoint](/sepana-search-api/web3-search-cloud/search-api.md#list-public-engines) can be used to fetch this.

{% code title="Request" %}

```bash
curl --location --request GET \
'https://api.sepana.io/v1/engine/public/list' \
--header 'x-api-key: Gh_rNsAhI-9Ws2BbmqrJpZ49pFkUZuZtsrE_FEg5N5Wce6hAQZoCpQ'
```

{% endcode %}

{% code title="Response" %}

```json
[
  {
    "engine_id": "ffea4660-9829-4a56-acf7-eb74b259c372",
    "engine_name": "blockchain-authority",
    "namespace": "d9601b27-e91b-4987-a664-ec9af8769e63",
    "network": "",
    "total_records": 3000,
    "total_size": 70590,
    "created_at": {
      "val": "12/01/2022 12:11:23 PM ",
      "_spec_type": "<class 'datetime.datetime'>"
    }
  },
  {
    "engine_id": "2fa05f86-b999-4be3-9daa-6fd62f381e75",
    "engine_name": "ethglobal-work",
    "namespace": "5ef7b76f-800c-4051-b32c-46d75e4ffeea",
    "network": "",
    "total_records": 940,
    "total_size": 2080,
    "created_at": {
      "val": "12/01/2022 05:24:50 AM ",
      "_spec_type": "<class 'datetime.datetime'>"
    }
  },
  ....
]
```

{% endcode %}

### Select Public Engines

Next, you can choose the Engine of interest from the list obtained in [previous section](#list-public-engines).

Here, we are choosing ***ffea4660-9829-4a56-acf7-eb74b259c372*** (blockchain-authority) and ***2fa05f86-b999-4be3-9daa-6fd62f381e75*** (ethglobal-work)

### Search

Now, that you have the API key and engine ids of the selected Engines. You can now perform "[**Search**](/sepana-search-api/web3-search-cloud/search-api.md#search)".

{% code title="Request" %}

```bash
curl --location --request POST 'https://api.sepana.io/v1/search' \
--header 'x-api-key: Gh_rNsAhI-9Ws2BbmqrJpZ49pFkUZuZtsrE_FEg5N5Wce6hAQZoCpQ' \
--header 'Content-Type: application/json' \
--data-raw '{
    "engine_ids": [
        "ffea4660-9829-4a56-acf7-eb74b259c372",
        "2fa05f86-b999-4be3-9daa-6fd62f381e75"
    ],
    "query": {
        "query_string": {
            "query": "india"
        }
    },
    "size": 2,
    "page": 0
}
'
```

{% endcode %}

{% code title="Response" %}

```json
{
    "hits": {
        "total": {
            "value": 4,
            "relation": "eq"
        },
        "max_score": 0.2876821,
        "hits": [
            {
                "_index": "ffea4660-9829-4a56-acf7-eb74b259c372",
                "_type": "_doc",
                "_id": "RfEFzoQBxqv6fmT099iM",
                "_score": 0.2876821,
                "_source": {
                    "Stages": "Series A",
                    "Date": "2021-08-31T00:00:00.000Z",
                    "Investors": "Accel,Bertelsmann India Investments",
                    "Description": "Decentralized personal loans marketplace",
                    "Founder": "Mayank Tewari,Prerit Srivastava",
                    "Website": "https://www.skeps.com/",
                    "Project": "Skeps",
                    "Category": "CeFi",
                    "Sub-categories": "Lending/Borrowing",
                    "Announcement": "",
                    "Fundraising Round": "Skeps - Series A",
                    "Record ID": "recufCOPL5Y7csrNj",
                    "Name": "Skeps",
                    "category_name": "CeFi",
                    "subcategory_name": "Lending/Borrowing",
                    "fundraising_round": "Skeps - Series A",
                    "Investors_name": "Accel, Bertelsmann India Investments",
                    "founders_name": "Mayank Tewari, Prerit Srivastava",
                    "Created": "2021-09-06T08: 22:21.000Z",
                    "Amount": "9500000",
                    "Investors copy": "",
                    "Valuation": ""
                }
            },
            {
                "_index": "2fa05f86-b999-4be3-9daa-6fd62f381e75",
                "_type": "_doc",
                "_id": "RvELzoQBxqv6fmT0odgB",
                "_score": 0.13353139,
                "_source": {
                    "indicator": {
                        "id": "NY.GDP.MKTP.CD",
                        "value": "GDP (current US$)"
                    },
                    "country": {
                        "id": "IN",
                        "value": "India"
                    },
                    "countryiso3code": "IND",
                    "date": "2021",
                    "value": 3173397590816.91,
                    "unit": "",
                    "obs_status": "",
                    "decimal": 0
                }
            }
        ]
    },
    "aggregations": null
}
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sepana.io/sepana-search-api/guides/search-public-engines.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
