# ตั้งค่างานค้นหา Tripadvisor (Business Data)

**API:** Data API

**Endpoint:** `POST /v1/beta/dataforseo/business_data/tripadvisor/search/task_post`

**Tags:** DataForSEO

เข้าคิวที่พัก Tripadvisor ที่ตรงกับคำค้น - ใช้หา id ที่ endpoint รีวิวต้องใช้ - และคืนค่า `id` ของงาน ห่อหุ้มในซองของ DataForSEO: ข้อมูลอยู่ใน `tasks[0].result` ผลลัพธ์อยู่ใน `tasks[0].status_code` - คำขอที่ถูกปฏิเสธยังคงคืนค่า HTTP 200 ดึงผลด้วย `get_dataforseo_business_tripadvisor_search_fetch`; รีวิวได้จาก `post_dataforseo_business_tripadvisor_reviews_submit`

### ข้อมูลอ้างอิงราคา

- การวัดปริมาณ: ต้นทุนการตอบกลับที่รายงาน
- ประมาณการคำขออ้างอิง: USD 0.2428
- ตัวคูณลูกค้าอ้างอิง: 1.0 ห้ามนำไปใช้ซ้ำกับยอดที่ตัดบัญชีของลูกค้าแล้ว

เป็นเพียงข้อมูลเมตาอ้างอิง ไม่ใช่ใบเสนอราคาของบัญชี ไม่ใช่ราคาที่รับประกัน และไม่ใช่เพดานการใช้จ่าย เครดิตทรัพยากรไม่ใช่เครดิต Felo การเรียกเก็บเงินขั้นสุดท้ายเป็นไปตามบันทึกการเรียกเก็บเงินของ Felo

## Related links

- [บทความ Help Center](<https://dataforseo.com/help-center/rules-and-limitations-of-keyword-and-keywords-fields-in-dataforseo-apis>)
- [ราคา](<https://dataforseo.com/pricing/business-data/business-data-api-tripadvisor-search-pricing>)
- [Help Center](<https://dataforseo.com/help-center/pingbacks-postbacks-with-dataforseo-api>)

## 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": {
          "keyword": {
            "type": "string",
            "description": "<em>คีย์เวิร์ด</em><br><strong>ฟิลด์ที่จำเป็น</strong><br>คีย์เวิร์ดที่ระบุควรบ่งบอกถึงหมวดหมู่ธุรกิจ ชื่อบริษัท หรือสถานที่สำคัญ;<br>ระบุได้สูงสุด 700 อักขระในฟิลด์ <code>keyword</code>;<br>%## ทั้งหมดจะถูกถอดรหัส (อักขระ ‘+’ จะถูกถอดรหัสเป็นอักขระเว้นวรรค);<br>หากต้องการใช้ อักขระ “%” สำหรับ <code>keyword</code> ของคุณ โปรดระบุเป็น “%25”<p>ดูรายละเอียดกฎและข้อจำกัดของฟิลด์ <code>keyword</code> และ <code>keywords</code> ใน DataForSEO API ได้ในบทความ Help Center"
          },
          "location_name": {
            "type": "string",
            "description": "<em>ชื่อเต็มของสถานที่ของเสิร์ชเอนจิน</em><br><strong>ฟิลด์ที่จำเป็นหากไม่ได้ระบุ</strong> <code>location_code</code><br>คุณสามารถรับรายการสถานที่ที่ใช้ได้พร้อม <code>location_name</code> ได้โดยส่งคำขอแยกไปที่ <code>https://api.dataforseo.com/v3/business_data/tripadvisor/locations</code><br>ตัวอย่าง:<br><code class=\"long-string\">London,England,United Kingdom</code>"
          },
          "location_code": {
            "type": "integer",
            "description": "<em>รหัสสถานที่ของเสิร์ชเอนจิน</em><br><strong>ฟิลด์ที่จำเป็นหากไม่ได้ระบุ</strong> <code>location_name</code><br>คุณสามารถรับรายการสถานที่ที่ใช้ได้พร้อม <code>location_code</code> ได้โดยส่งคำขอแยกไปที่ <code>https://api.dataforseo.com/v3/business_data/tripadvisor/locations</code><br>ตัวอย่าง:<br><code class=\"long-string\">1003854</code>"
          },
          "priority": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>ลำดับความสำคัญของงาน</em><br>ฟิลด์ที่ไม่บังคับ<br>รับค่าต่อไปนี้ได้:<br>1 – ลำดับความสำคัญการทำงานปกติ (กำหนดเป็นค่าเริ่มต้น)<br>2 – ลำดับความสำคัญการทำงานสูง คุณจะถูกเรียกเก็บเงินเพิ่มสำหรับงานที่มีลำดับความสำคัญการทำงานสูง<br>คำนวณค่าใช้จ่ายได้ที่หน้า ราคา"
          },
          "depth": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>ความลึกในการดึงข้อมูล</em><br>ฟิลด์ที่ไม่บังคับ<br>จำนวนผลการค้นหาที่จะคืนในการตอบกลับของ API<br>แนะนำอย่างยิ่งให้ตั้งค่าความลึกเป็นจำนวนเท่าของสามสิบ เนื่องจากระบบของเราประมวลผลผลการค้นหาครั้งละสามสิบรายการ;<br>ค่าเริ่มต้น: <code>30</code>;<br>ค่าสูงสุด: <code>210</code><p><strong>บัญชีของคุณจะถูกเรียกเก็บเงินต่อ SERP ที่มีผลลัพธ์ไม่เกิน 30 รายการ;</strong> <br>การตั้งค่าความลึกเกิน 30 อาจทำให้มีค่าใช้จ่ายเพิ่มเติมหากเสิร์ชเอนจินคืนผลลัพธ์เกิน 30 รายการ</a>;<br>คำนวณค่าใช้จ่ายได้ที่หน้า ราคา"
          },
          "tag": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>ตัวระบุงานที่ผู้ใช้กำหนด</em><br>ฟิลด์ไม่บังคับ<br><em>จำกัด 255 อักขระ</em><br>ใช้พารามิเตอร์นี้เพื่อระบุงานและจับคู่กับผลลัพธ์<br>คุณจะพบค่า <code>tag</code> ที่ระบุในออบเจ็กต์ <code>data</code> ของการตอบกลับ"
          },
          "postback_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>URL สำหรับส่งผลลัพธ์ของงาน</em><br>ฟิลด์ที่ไม่บังคับ<br>เมื่องานเสร็จสิ้น เราจะส่งคำขอ POST พร้อมผลลัพธ์ที่บีบอัดในรูปแบบ <code>gzip</code> ไปยัง <code>postback_url</code> ที่คุณระบุ<br>คุณสามารถใช้สตริง ‘$id’ เป็นตัวแปร <code>$id</code> และ ‘$tag’ เป็นตัวแปร <code>$tag</code> ที่เข้ารหัส URL เราจะกำหนดค่าที่จำเป็นก่อนส่งคำขอ<br>ตัวอย่าง:<br><code>http://your-server.com/postbackscript?id=$id</code><br><code>http://your-server.com/postbackscript?id=$id&amp;tag=$tag</code><br><strong>หมายเหตุ:</strong> อักขระพิเศษใน <code>postback_url</code> จะถูกเข้ารหัส URL; <br>กล่าวคือ อักขระ <code>#</code> จะถูกเข้ารหัสเป็น <code>%23</code><p>ดูข้อมูลเพิ่มเติมได้ในHelp Center ของเรา"
          },
          "pingback_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>URL แจ้งเตือนเมื่องานเสร็จสิ้น</em><br>ฟิลด์ที่ไม่บังคับ<br>เมื่องานเสร็จสิ้น เราจะแจ้งให้คุณทราบผ่านคำขอ GET ที่ส่งไปยัง URL ที่คุณระบุ<br>คุณสามารถใช้สตริง ‘$id’ เป็นตัวแปร <code>$id</code> และ ‘$tag’ เป็นตัวแปร <code>$tag</code> ที่เข้ารหัส URL เราจะกำหนดค่าที่จำเป็นก่อนส่งคำขอ<br>ตัวอย่าง:<br><code>http://your-server.com/pingscript?id=$id</code><br><code>http://your-server.com/pingscript?id=$id&amp;tag=$tag</code><br><strong>หมายเหตุ:</strong> อักขระพิเศษใน <code>pingback_url</code> จะถูกเข้ารหัส URL; <br>กล่าวคือ อักขระ <code>#</code> จะถูกเข้ารหัสเป็น <code>%23</code><p>ดูข้อมูลเพิ่มเติมได้ในHelp Center ของเรา"
          }
        },
        "example": [
          {
            "keyword": "pizza",
            "location_code": 1003854,
            "depth": 30
          }
        ]
      }
    ]
  },
  "example": [
    {
      "keyword": "pizza",
      "location_code": 1003854,
      "depth": 30
    }
  ]
}
```

## Responses

### 200 — ดำเนินการสำเร็จ

Headers:
- `X-Request-Id` (string) — ตัวระบุคำขอที่ต้องระบุเมื่อติดต่อฝ่ายสนับสนุนของ Felo

**application/json**

Schema: object | null

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

### 400 — ไม่สามารถประมวลผลคำขอได้ ตรวจสอบพารามิเตอร์ของคำขอ

### 401 — จำเป็นต้องใช้คีย์ API ของ Felo ที่ถูกต้อง

### 402 — ไม่สามารถดำเนินการตามคำขอได้ เนื่องจากไม่เป็นไปตามข้อกำหนดด้านการเรียกเก็บเงิน

### 403 — บัญชีไม่ได้รับอนุญาตให้ดำเนินการนี้

### 429 — ถึงขีดจำกัดคำขอหรือการใช้จ่ายแล้ว

### 502 — บริการไม่สามารถดำเนินการตามคำขอให้เสร็จสิ้นได้

### 503 — API หรือบริการเรียกเก็บเงินไม่พร้อมใช้งานชั่วคราว

### 504 — บริการหมดเวลาระหว่างประมวลผลคำขอ

### default — การตอบกลับข้อผิดพลาด; การตอบกลับที่ส่งผ่านจากต้นทางอาจใช้รูปแบบของผู้ให้บริการ

**application/json**

Schema:

```json
{}
```

## Schema definitions

### Response36Afe1097B20_BaseResponseInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseInfo`

```json
{
  "properties": {
    "version": {
      "type": [
        "string",
        "null"
      ],
      "description": "เวอร์ชันปัจจุบันของ API"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "รหัสสถานะทั่วไป\nคุณสามารถดูรายการรหัสการตอบกลับทั้งหมดได้ที่นี่"
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "ข้อความข้อมูลทั่วไป\nคุณสามารถดูรายการข้อความข้อมูลทั่วไปทั้งหมดได้ที่นี่"
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "เวลาดำเนินการทั้งหมด (วินาที)"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "ค่าใช้จ่ายรวมของงาน, USD",
      "format": "double"
    },
    "tasks_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "จำนวนงานในอาร์เรย์ tasks",
      "format": "int64"
    },
    "tasks_error": {
      "type": [
        "integer",
        "null"
      ],
      "description": "จำนวนงานในอาร์เรย์ tasks ที่ส่งคืนพร้อมข้อผิดพลาด",
      "format": "int64"
    }
  }
}
```

### Response36Afe1097B20_BaseResponseTaskInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo`

```json
{
  "properties": {
    "id": {
      "type": [
        "string",
        "null"
      ],
      "description": "ตัวระบุงาน\nตัวระบุงานที่ไม่ซ้ำกันในระบบของเราในรูปแบบ UUID"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "รหัสสถานะของงาน\nสร้างโดย DataForSEO โดยอยู่ในช่วงต่อไปนี้ได้: 10000-60000\nคุณสามารถดูรายการรหัสการตอบกลับทั้งหมดได้ที่นี่"
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "ข้อความข้อมูลของงาน\nคุณสามารถดูรายการข้อความข้อมูลทั่วไปทั้งหมดได้ที่นี่"
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "เวลาดำเนินการ, วินาที"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "ค่าใช้จ่ายรวมของงาน, USD",
      "format": "double"
    },
    "result_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "จำนวนองค์ประกอบในอาร์เรย์ result",
      "format": "int64"
    },
    "path": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "string",
          "null"
        ]
      },
      "description": "พาธ URL"
    },
    "data": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "object",
          "null"
        ]
      },
      "description": "มีพารามิเตอร์เดียวกับที่คุณระบุในคำขอ POST"
    }
  }
}
```

### Response36Afe1097B20_BusinessDataTripadvisorSearchTaskPostResponseInfo

`#/components/schemas/Response36Afe1097B20_BusinessDataTripadvisorSearchTaskPostResponseInfo`

```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_BusinessDataTripadvisorSearchTaskPostTaskInfo"
              }
            ]
          },
          "description": "<em>อาร์เรย์ของงาน</em>"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_BusinessDataTripadvisorSearchTaskPostTaskInfo

`#/components/schemas/Response36Afe1097B20_BusinessDataTripadvisorSearchTaskPostTaskInfo`

```json
{
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo"
    },
    {
      "type": "object",
      "properties": {
        "result": {
          "type": [
            "object",
            "null"
          ],
          "description": "<em>อาร์เรย์ของผลลัพธ์</em><br>ในกรณีนี้ ค่าจะเป็น <code>null</code>"
        }
      }
    }
  ]
}
```
