> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Get FAQs - KG

<Badge icon="arrow-left" color="gray">[Back to API List](/ai-for-service/apis/automation/api-list)</Badge>

Retrieves a list of questions and nodes under the Knowledge task. Supports parameters such as ktId and parentId (node ID).

| **Method**        | GET                                                                                                                              |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| **Endpoint**      | `https://{{host}}/api/public/bot/{{botId}}/faqs?ktId=&limit=&offset=&parentId=&withallchild=&type=&language=en`                  |
| **Content Type**  | `application/json`                                                                                                               |
| **Authorization** | `auth: {{JWT}}` See [How to generate the JWT Token](/ai-for-service/apis/automation/api-introduction/#generating-the-jwt-token). |
| **API Scope**     | App Builder: Manage Knowledge Graph; Admin Console: Manage Knowledge Graph                                                       |

## Path Parameters

| **Parameter** | **Description**                                                          | **Required** |
| ------------- | ------------------------------------------------------------------------ | ------------ |
| `host`        | The environment URL. For example, `https://platform.kore.ai`             | Required     |
| `BotId`       | Bot ID or Stream ID found under **General Settings** on the App Builder. | Required     |

## Query Parameters

| **Parameter**  | **Description**                                                                                                                                                                                                         | **Required** |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ |
| `ktId`         | The Knowledge task ID. Retrieve from the request of the GetFAQs API call. [Learn more](https://community.kore.ai/t/using-getfaqs-api/1724/2). **Note:** `ktId` values differ between in-development and published bots. | Required     |
| `limit`        | Number of records to fetch. Default and maximum is `50`.                                                                                                                                                                | Optional     |
| `offset`       | Number of records to skip. Defaults to `0`.                                                                                                                                                                             | Optional     |
| `parentId`     | The ID of nodes in the Knowledge tasks section. Retrieve from the response of the GetFAQs API call. [Learn more](https://community.kore.ai/t/using-getfaqs-api/1724/2).                                                 | Optional     |
| `withallchild` | Whether to include child nodes.                                                                                                                                                                                         | Optional     |
| `type`         | Type of FAQs to fetch.                                                                                                                                                                                                  | Optional     |
| `language`     | Bot language code (for example, `en` for English, `de` for German).                                                                                                                                                     | Required     |
| `search`       | Search the KG using a reference ID or display name.                                                                                                                                                                     | Optional     |

## Sample Request

```json theme={null}
curl -X GET \
  'https://{{host}}/api/public/bot/{{bot_id}}/faqs?ktId=5afxxxxxf&limit=30&offset=0&parentId=xxxxx-xxx-xxx-xxx-xxxxx&withallchild=true&type=all&language=en' \
  -H 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \
  -H 'content-type: application/json'
```

## Body Parameters

No body parameters are passed.

## Sample Response

```json theme={null}
{
    "faqs": [
        {
            "_id": "670ceb958ba112b5eb9xxxxx",
            "streamId": "st-b4a0b261-7558-52e2-aca1-85171cfxxxxx",
            "conditionalResp": false,
            "questionPayload": {
                "question": "sub child faq1",
                "tagsPayload": []
            },
            "responseType": "message",
            "answerPayload": [
                {
                    "_id": "mt-eea8c021-30f9-5fe8-bd90-9cabcedxxxxx",
                    "streamId": "st-b4a0b261-7558-52e2-aca1-85171cfxxxxx",
                    "channel": "default",
                    "createdBy": "u-fb720fec-2e37-5485-bbee-95ff521xxxxx",
                    "createdOn": "Mon Oct 14 2024 09:59:49 GMT+0000 (Coordinated Universal Time)",
                    "lModBy": "u-fb720fec-2e37-5485-bbee-95ff521xxxxx",
                    "lMod": "Mon Oct 14 2024 09:59:49 GMT+0000 (Coordinated Universal Time)",
                    "text": "ans2",
                    "type": "basic"
                }
            ],
            "subQuestions": [],
            "subAnswers": [],
            "parent": "5d7dd953-4dca-43ee-a62b-0234556xxxxx",
            "leafterm": "sub child german1",
            "createdOn": "2024-10-14T09:59:49.916Z",
            "createdBy": "u-fb720fec-2e37-5485-bbee-95ff521xxxxx",
            "modifiedOn": "2024-10-14T09:59:49.916Z",
            "lastModifiedBy": "u-fb720fec-2e37-5485-bbee-95ff521xxxxx",
            "botName": "Enterprise german New",
            "knowledgeTaskId": "6700d9778ba112b5eb9xxxxx",
            "sortId": 17288999xxxxx,
            "language": "de",
            "faqStatus": true,
            "editLocked": false,
            "isPublished": false,
            "refId": "e5320a4d-6b26-5ce9-b803-532e874xxxxx",
            "label": "sub child faq1",
            "faqLinkedBy": [],
            "__v": 0,
            "fullPath": [
                "oct 5 german new",
                "child german1",
                "sub child german1"
            ]
        }
    ],
    "moreAvailable": false,
    "count": 9
}
```

<Note>
  Refer to [Get FAQs - KG V2](/ai-for-service/apis/automation/get-faqs-from-knowledge-task-V2) which supports the parameters: botId, language, mode (configured/published), and nodeName.
</Note>
