แชร์ผ่าน


การดําเนินการบริการ GetKeywordCategories - ข้อมูลเชิงลึกของโฆษณา

รับประเภทคําสําคัญที่มีคําสําคัญที่ระบุอยู่

หมายเหตุ

การดําเนินการบริการ GetKeywordCategories ไม่ได้รับการสนับสนุนณวันที่ 21 สิงหาคม ค.ศ. 2023 เรียนรู้เพิ่มเติม

ร้องขอองค์ประกอบ

วัตถุ GetKeywordCategoriesRequest กําหนดองค์ประกอบ เนื้อความ และ ส่วนหัว ของการร้องขอการดําเนินการบริการ องค์ประกอบต้องอยู่ในลําดับเดียวกับที่แสดงใน Request SOAP

หมายเหตุ

เว้นแต่ระบุไว้เป็นอย่างอื่นด้านล่าง จําเป็นต้องระบุองค์ประกอบคําขอทั้งหมด

ร้องขอองค์ประกอบเนื้อความ

องค์ ประกอบ คำอธิบาย ชนิดข้อมูล
คำ อาร์เรย์ของคําสําคัญที่คุณต้องการกําหนดประเภทคําสําคัญที่เป็นไปได้ซึ่งแต่ละคําสําคัญเป็นสมาชิก อาร์เรย์สามารถมีคําสําคัญได้สูงสุด 1,000 คํา และคําสําคัญแต่ละคําสามารถมีได้สูงสุด 100 อักขระ อาร์เรย์สตริง
ภาษา ภาษาที่ใช้เขียนคําสําคัญ

คุณต้องตั้งค่าองค์ประกอบนี้เป็นภาษาอังกฤษ
สาย อักขระ
MaxCategories จํานวนประเภทที่จะรวมไว้ในผลลัพธ์ จํานวนสูงสุดของหมวดหมู่ที่คุณสามารถร้องขอได้คือ 5

ค่าเริ่มต้นคือ 5
Int
PublisherCountry รหัสประเทศของประเทศ/ภูมิภาคที่จะใช้เป็นแหล่งที่มาของข้อมูลประเภท

คุณต้องตั้งค่าองค์ประกอบนี้เป็น US
สาย อักขระ

องค์ประกอบส่วนหัวของคําขอ

องค์ ประกอบ คำอธิบาย ชนิดข้อมูล
AuthenticationToken โทเค็นการเข้าถึง OAuth ที่แสดงข้อมูลประจําตัวของผู้ใช้ที่มีสิทธิ์เข้าถึงบัญชี Microsoft Advertising

สําหรับข้อมูลเพิ่มเติม ดูการรับรองความถูกต้องด้วย OAuth
สาย อักขระ
CustomerAccountId ตัวระบุบัญชีโฆษณาที่เป็นเจ้าของหรือเชื่อมโยงกับเอนทิตีในคําขอ องค์ประกอบส่วนหัวนี้ต้องมีค่าเดียวกันกับองค์ประกอบเนื้อความ AccountId เมื่อต้องการทั้งสองอย่าง องค์ประกอบนี้จําเป็นสําหรับการดําเนินการบริการส่วนใหญ่ และเป็นแนวทางปฏิบัติที่ดีที่สุดที่คุณควรตั้งค่าไว้เสมอ

สําหรับข้อมูลเพิ่มเติม ดูรับบัญชีและรหัสลูกค้าของคุณ
สาย อักขระ
CustomerId ตัวระบุบัญชีผู้จัดการ (ลูกค้า) ที่ผู้ใช้กําลังเข้าถึงหรือดําเนินการ ผู้ใช้สามารถเข้าถึงบัญชีผู้จัดการได้หลายบัญชี องค์ประกอบนี้จําเป็นสําหรับการดําเนินการบริการส่วนใหญ่ และเป็นแนวทางปฏิบัติที่ดีที่สุดที่คุณควรตั้งค่าไว้เสมอ

สําหรับข้อมูลเพิ่มเติม ดูรับบัญชีและรหัสลูกค้าของคุณ
สาย อักขระ
DeveloperToken โทเค็นนักพัฒนาที่ใช้เพื่อเข้าถึง Bing Ads API

สําหรับข้อมูลเพิ่มเติม ดูรับโทเค็นนักพัฒนา
สาย อักขระ
รหัส ผ่าน องค์ประกอบนี้สงวนไว้สําหรับการใช้ภายในและจะถูกเอาออกจากเวอร์ชันในอนาคตของ API คุณต้องใช้องค์ประกอบ AuthenticationToken เพื่อตั้งค่าข้อมูลประจําตัวของผู้ใช้ สาย อักขระ
ชื่อ องค์ประกอบนี้สงวนไว้สําหรับการใช้ภายในและจะถูกเอาออกจากเวอร์ชันในอนาคตของ API คุณต้องใช้องค์ประกอบ AuthenticationToken เพื่อตั้งค่าข้อมูลประจําตัวของผู้ใช้ สาย อักขระ

องค์ประกอบการตอบสนอง

วัตถุ GetKeywordCategoriesResponse จะกําหนดองค์ประกอบ เนื้อความ และ ส่วนหัว ของการตอบสนองการดําเนินการบริการ องค์ประกอบจะถูกส่งกลับตามลําดับเดียวกับที่แสดงใน Response SOAP

องค์ประกอบเนื้อความการตอบสนอง

องค์ ประกอบ คำอธิบาย ชนิดข้อมูล
ผล อาร์เรย์ของวัตถุข้อมูล KeywordCategoryResult แต่ละวัตถุมีคําสําคัญและรายการของประเภทที่เป็นของคําสําคัญนั้นๆ

รายการจะมีรายการสําหรับคําสําคัญแต่ละรายการที่คุณระบุไว้ในคําขอ ถ้าไม่สามารถกําหนดประเภทคําสําคัญได้ รายการ KeywordCategories จะมี KeywordCategory เดียว ค่าของ ประเภท จะเป็นประเภทที่ไม่รู้จักและค่าของ ConfidenceScore จะเป็น 0.0
อาร์เรย์ KeywordCategoryResult

องค์ประกอบส่วนหัวการตอบสนอง

องค์ ประกอบ คำอธิบาย ชนิดข้อมูล
TrackingId ตัวระบุของรายการบันทึกที่ประกอบด้วยรายละเอียดของการเรียกใช้ API สาย อักขระ

ร้องขอ SOAP

เทมเพลตนี้ถูกสร้างขึ้นโดยเครื่องมือเพื่อแสดง ลําดับ ขององค์ประกอบ เนื้อความ และ ส่วนหัว สําหรับคําขอ SOAP สําหรับชนิดที่สนับสนุนที่คุณสามารถใช้กับการดําเนินการบริการนี้ โปรดดูการอ้างอิง องค์ประกอบเนื้อความคําขอ ด้านบน

<s:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header xmlns="https://bingads.microsoft.com/AdInsight/v13">
    <Action mustUnderstand="1">GetKeywordCategories</Action>
    <AuthenticationToken i:nil="false">ValueHere</AuthenticationToken>
    <CustomerAccountId i:nil="false">ValueHere</CustomerAccountId>
    <CustomerId i:nil="false">ValueHere</CustomerId>
    <DeveloperToken i:nil="false">ValueHere</DeveloperToken>
  </s:Header>
  <s:Body>
    <GetKeywordCategoriesRequest xmlns="https://bingads.microsoft.com/AdInsight/v13">
      <Keywords i:nil="false" xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <a1:string>ValueHere</a1:string>
      </Keywords>
      <Language i:nil="false">ValueHere</Language>
      <PublisherCountry i:nil="false">ValueHere</PublisherCountry>
      <MaxCategories i:nil="false">ValueHere</MaxCategories>
    </GetKeywordCategoriesRequest>
  </s:Body>
</s:Envelope>

Response SOAP

เทมเพลตนี้ถูกสร้างขึ้นโดยเครื่องมือเพื่อแสดงลําดับขององค์ประกอบ เนื้อ ความและ ส่วนหัว สําหรับการตอบสนอง SOAP

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header xmlns="https://bingads.microsoft.com/AdInsight/v13">
    <TrackingId d3p1:nil="false" xmlns:d3p1="http://www.w3.org/2001/XMLSchema-instance">ValueHere</TrackingId>
  </s:Header>
  <s:Body>
    <GetKeywordCategoriesResponse xmlns="https://bingads.microsoft.com/AdInsight/v13">
      <Result d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">
        <KeywordCategoryResult>
          <Keyword d4p1:nil="false">ValueHere</Keyword>
          <KeywordCategories d4p1:nil="false">
            <KeywordCategory>
              <Category d4p1:nil="false">ValueHere</Category>
              <ConfidenceScore>ValueHere</ConfidenceScore>
            </KeywordCategory>
          </KeywordCategories>
        </KeywordCategoryResult>
      </Result>
    </GetKeywordCategoriesResponse>
  </s:Body>
</s:Envelope>

ไวยากรณ์โค้ด

ไวยากรณ์ตัวอย่างสามารถใช้กับ Bing Ads SDKs ได้ ดู ตัวอย่างโค้ด API ของโฆษณา Bing สําหรับตัวอย่างเพิ่มเติม

public async Task<GetKeywordCategoriesResponse> GetKeywordCategoriesAsync(
	IList<string> keywords,
	string language,
	string publisherCountry,
	int? maxCategories)
{
	var request = new GetKeywordCategoriesRequest
	{
		Keywords = keywords,
		Language = language,
		PublisherCountry = publisherCountry,
		MaxCategories = maxCategories
	};

	return (await AdInsightService.CallAsync((s, r) => s.GetKeywordCategoriesAsync(r), request));
}
static GetKeywordCategoriesResponse getKeywordCategories(
	ArrayOfstring keywords,
	java.lang.String language,
	java.lang.String publisherCountry,
	int maxCategories) throws RemoteException, Exception
{
	GetKeywordCategoriesRequest request = new GetKeywordCategoriesRequest();

	request.setKeywords(keywords);
	request.setLanguage(language);
	request.setPublisherCountry(publisherCountry);
	request.setMaxCategories(maxCategories);

	return AdInsightService.getService().getKeywordCategories(request);
}
static function GetKeywordCategories(
	$keywords,
	$language,
	$publisherCountry,
	$maxCategories)
{

	$GLOBALS['Proxy'] = $GLOBALS['AdInsightProxy'];

	$request = new GetKeywordCategoriesRequest();

	$request->Keywords = $keywords;
	$request->Language = $language;
	$request->PublisherCountry = $publisherCountry;
	$request->MaxCategories = $maxCategories;

	return $GLOBALS['AdInsightProxy']->GetService()->GetKeywordCategories($request);
}
response=adinsight_service.GetKeywordCategories(
	Keywords=Keywords,
	Language=Language,
	PublisherCountry=PublisherCountry,
	MaxCategories=MaxCategories)

ข้อกําหนด

บริการ: AdInsightService.svc v13
Namespace: https://bingads.microsoft.com/AdInsight/v13