# Ringkasan AI SERP API

**API:** Data API

**Endpoint:** `POST /v1/beta/dataforseo/serp/ai_summary`

**Tags:** DataForSEO

Memulangkan gambaran keseluruhan AI yang ditunjukkan Google di atas hasil untuk pertanyaan di Google. Memulangkan `keyword`, `type`, `se_domain`, `location_code`, `language_code`, `check_url`, `datetime`, `spell`, `refinement_chips`, `item_types`, `items_count` dan `items`. Dibungkus dalam sampul DataForSEO: data dalam `tasks[0].result`, hasil dalam `tasks[0].status_code` - permintaan yang ditolak tetap memulangkan HTTP 200.

### Rujukan harga

- Pemeteran: Kos respons yang dilaporkan.
- Anggaran rujukan setiap permintaan: USD 0.02.
- Pengganda pelanggan rujukan: 1.0. Jangan gunakan semula pada amaun pelanggan yang telah diselesaikan.

Metadata rujukan sahaja, bukan sebut harga akaun, harga terjamin atau had perbelanjaan. Kredit sumber bukan kredit Felo. Caj akhir mengikut rekod pengebilan Felo.

## Related links

- [UUID](<https://en.wikipedia.org/wiki/Universally_unique_identifier>)

## Base URL

- `https://openapi.felo.ai`

## Authentication

- `FeloBearerAuth` (http bearer, bearer format Felo API Key)
- `FeloApiKey` (apiKey in header `X-API-Key`)

## Request body

Required: **no**

### application/json

Schema:

```json
{
  "type": "array",
  "items": {
    "type": [
      "object",
      "null"
    ],
    "oneOf": [
      {
        "type": "object",
        "properties": {
          "task_id": {
            "type": "string",
            "description": "<em>pengecam tugas</em><br><strong>medan wajib</strong><br>pengecam unik tugas berkaitan dalam format UUID<br>anda boleh menggunakannya dalam tempoh <strong>30 hari</strong> untuk meminta hasil tugas pada bila-bila masa"
          },
          "prompt": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>prompt AI</em><br>medan pilihan<br>tugas tambahan untuk peringkas AI;<br>sebarang bentuk teks, soalan atau maklumat yang memberitahu AI respons seperti apa yang anda cari;<br>bilangan maksimum simbol atau aksara yang boleh anda tentukan: <code>2000</code>;<br><strong>ambil perhatian:</strong> prompt anda mesti relevan dengan kata kunci yang ditentukan dalam permintaan POST ke SERP API"
          },
          "support_extra": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>sokong ciri SERP tambahan</em><br>medan pilihan<br>jika ditetapkan kepada <code>true</code>, model AI akan mempertimbangkan ciri SERP tambahan berikut, selain hasil <code>organic</code>: <code>answer_box</code>, <code>knowledge_graph</code>, <code>featured_snippet</code>;<br>nilai lalai: <code>true</code>"
          },
          "fetch_content": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>ambil kandungan daripada halaman dalam SERP</em><br>medan pilihan<br>jika ditetapkan kepada <code>true</code>, API akan mengambil kandungan daripada halaman yang dipaparkan dalam hasil SERP, dan model AI akan mempertimbangkan kandungan ini semasa menjana ringkasan dalam hasil;<br>nilai lalai: <code>false</code>"
          },
          "include_links": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>sertakan pautan sumber dalam ringkasan</em><br>medan pilihan<br>jika ditetapkan kepada <code>true</code>, medan <code>summary</code> dalam respons API akan mengandungi pautan ke sumber ringkasan yang dijana;<br>nilai lalai: <code>false</code>"
          }
        },
        "example": [
          {
            "task_id": "07031739-1535-0139-0000-9d1e639a5b7d",
            "prompt": "explain what DataForSEO is",
            "include_links": true,
            "fetch_content": true
          }
        ]
      }
    ]
  },
  "example": [
    {
      "task_id": "07031739-1535-0139-0000-9d1e639a5b7d",
      "prompt": "explain what DataForSEO is",
      "include_links": true,
      "fetch_content": true
    }
  ]
}
```

## Responses

### 200 — Operasi berjaya

Headers:
- `X-Request-Id` (string) — Pengecam permintaan untuk disertakan semasa menghubungi sokongan Felo.

**application/json**

Schema: object | null

```json
{
  "type": [
    "object",
    "null"
  ],
  "oneOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_SerpAiSummaryResponseInfo"
    }
  ]
}
```

### 400 — Permintaan tidak dapat diproses. Semak parameter permintaan.

### 401 — Kunci API Felo yang sah diperlukan.

### 402 — Permintaan tidak dapat diteruskan kerana keperluan pengebilan tidak dipenuhi.

### 403 — Akaun tidak dibenarkan melakukan operasi ini.

### 429 — Had permintaan atau had perbelanjaan telah dicapai.

### 502 — Perkhidmatan tidak dapat menyelesaikan permintaan.

### 503 — API atau perkhidmatan pengebilan tidak tersedia buat sementara waktu.

### 504 — Perkhidmatan tamat masa semasa memproses permintaan.

### default — Respons ralat; respons passthrough huluan mungkin menggunakan format penyedia

**application/json**

Schema:

```json
{}
```

## Schema definitions

### Response36Afe1097B20_BaseResponseInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseInfo`

```json
{
  "properties": {
    "version": {
      "type": [
        "string",
        "null"
      ],
      "description": "versi semasa API"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "kod status umum; anda boleh menemui senarai penuh kod respons di sini"
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "mesej maklumat umum; anda boleh menemui senarai penuh mesej maklumat umum di sini"
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "jumlah masa pelaksanaan, saat"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "jumlah kos tugas, USD",
      "format": "double"
    },
    "tasks_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "bilangan tugas dalam array tasks",
      "format": "int64"
    },
    "tasks_error": {
      "type": [
        "integer",
        "null"
      ],
      "description": "bilangan tugas dalam array tasks yang dipulangkan dengan ralat",
      "format": "int64"
    }
  }
}
```

### Response36Afe1097B20_BaseResponseTaskInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo`

```json
{
  "properties": {
    "id": {
      "type": [
        "string",
        "null"
      ],
      "description": "pengecam tugas; pengecam tugas unik dalam sistem kami dalam format UUID"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "kod status tugas yang dijana oleh DataForSEO; boleh berada dalam julat berikut: 10000-60000; anda boleh menemui senarai penuh kod respons di sini"
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "mesej maklumat tugas; anda boleh menemui senarai penuh mesej maklumat umum di sini"
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "masa pelaksanaan, saat"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "jumlah kos tugas, USD",
      "format": "double"
    },
    "result_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "bilangan elemen dalam array hasil",
      "format": "int64"
    },
    "path": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "string",
          "null"
        ]
      },
      "description": "Laluan URL"
    },
    "data": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "object",
          "null"
        ]
      },
      "description": "mengandungi parameter yang sama seperti yang anda tentukan dalam permintaan POST"
    }
  }
}
```

### Response36Afe1097B20_SerpAiSummaryItem

`#/components/schemas/Response36Afe1097B20_SerpAiSummaryItem`

```json
{
  "type": "object",
  "properties": {
    "summary": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>ringkasan yang dijana</em><br>ringkasan yang dijana oleh model AI mengikut parameter yang ditentukan dalam permintaan"
    }
  }
}
```

### Response36Afe1097B20_SerpAiSummaryResponseInfo

`#/components/schemas/Response36Afe1097B20_SerpAiSummaryResponseInfo`

```json
{
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BaseResponseInfo"
    },
    {
      "type": "object",
      "properties": {
        "tasks": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "object",
              "null"
            ],
            "oneOf": [
              {
                "$ref": "#/components/schemas/Response36Afe1097B20_SerpAiSummaryTaskInfo"
              }
            ]
          },
          "description": "<em>tatasusunan tugas</em>"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_SerpAiSummaryResultInfo

`#/components/schemas/Response36Afe1097B20_SerpAiSummaryResultInfo`

```json
{
  "type": "object",
  "properties": {
    "items_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>bilangan item dalam tatasusunan hasil</em>",
      "format": "int64"
    },
    "items": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "object",
          "null"
        ],
        "oneOf": [
          {
            "$ref": "#/components/schemas/Response36Afe1097B20_SerpAiSummaryItem"
          }
        ]
      },
      "description": "<em>tatasusunan items</em>"
    }
  }
}
```

### Response36Afe1097B20_SerpAiSummaryTaskInfo

`#/components/schemas/Response36Afe1097B20_SerpAiSummaryTaskInfo`

```json
{
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo"
    },
    {
      "type": "object",
      "properties": {
        "result": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "object",
              "null"
            ],
            "oneOf": [
              {
                "$ref": "#/components/schemas/Response36Afe1097B20_SerpAiSummaryResultInfo"
              }
            ]
          },
          "description": "<em>tatasusunan hasil</em>"
        }
      }
    }
  ]
}
```
