常用文档转换API汇总
使用三个基于 NLP 的 API 构建 AI 驱动的自动化工具
人工智能 (AI) 和自然语言处理 (NLP) 的发展为利用技术自动执行复杂任务、提高效率和提供有价值的见解提供了无数可能性。毫无疑问,对智能解决方案的需求正在激增,全球人工智能市场规模预计会从2023年的2418亿美元增长到2030年的7388亿美元。
如果您正在考虑在您的组织中实施人工智能自动化,或者正在寻找加速人工智能软件开发的解决方案,那么您来对地方了。
在本文中,我们将带您了解 AI 和 NLP 的主要技术方面,探索一些使构建智能功能变得更加容易的 AI 应用程序编程接口 (API)。此外,我们将提供整合 DataForSEO 的 AI 驱动 API 所需的步骤,帮助您构建自动化工具,如内容创建、竞争对手分析以及 Google 结果摘要。
什么是自然语言处理 (NLP) 以及它如何改变 Web
自然语言处理 (NLP)是人工智能的一个分支,是一种机器学习 (ML) 技术,可处理自然语言(人类社区中自然出现的任何语言)数据集,并使计算机能够以有意义的方式理解、解释和再现人类语言。
NLP 的一个简单示例是在 Google 搜索栏中输入查询。当您开始输入时,Google 会尝试预测完整的搜索短语。
此功能称为 Google 自动完成预测,它基于 NLP 和机器学习算法,通过考虑与输入相关的热门查询、之前的搜索记录、地理位置、查询语言以及网络上的词语模式,帮助搜索引擎预测接下来的输入内容。
该搜索引擎还使用 NLP 驱动的算法来解释查询并提供相关结果,比如 BERT 和 MUM 这样的机器学习模型,通过自然语言处理来理解搜索短语、分析网上的内容、编译精选摘要并在结果页面上对网站进行排名。
搜索引擎只是 NLP 应用的一个实例,但其示例和潜在用例非常多。举几个例子,NLP 包括:
- 使聊天机器人和虚拟助手能够理解并响应用户查询;
- 改进自动语言翻译服务;
- 通过语法和拼写检查功能增强网络应用程序;
- 通过文本到语音和语音到文本的转换使网站内容更易于访问;
- 帮助检测虚假新闻、虚假和误导性信息;
- 为企业提供网络情绪分析功能;
- NLP 的应用范围广泛,例如:使聊天机器人和虚拟助手能够理解和回应用户查询;改进自动语言翻译服务;通过语法和拼写检查功能增强网络应用;通过文本到语音和语音到文本转换提升网站内容的可访问性;帮助检测假新闻、虚假信息;为企业提供网络情绪分析;自动生成内容、摘要和产品描述。
正如您所见,NLP 正在改变我们与网络技术互动的方式。随着越来越多的组织寻求利用自然语言处理的能力,构建强大的 NLP 模型面临着一系列的技术挑战。
探索 NLP 开发前景
在上一节中,我们确认了 NLP 是连接人类语言与计算能力的桥梁。接下来,让我们看看构建这座桥梁所需的过程。
首先,需要认识到 NLP 是一门融合了计算机科学、深度学习和语言学的跨学科领域。
计算机科学需要处理大量数据,深度学习使模型能够像人脑一样自主学习,语言学有助于解读人类语言的句法、计算机科学侧重于处理海量数据,深度学习使得模型能够像人脑那样自主学习,而语言学则帮助解读人类语言的句法、语义以及其他复杂特性。
为了说明这些组件如何协同工作,我们将介绍 NLP 实施步骤:
预处理
首先,NLP 软件处理并清理原始文本数据,使其适合进一步分析和训练。此阶段涉及一系列技术,例如:
- 标记化:将文本和句子分成单独的单元(标记);
- 词干提取:将单词简化为其词根形式;
- 小写:将所有文本转换为小写,以确保统一;
- 删除停用词:删除那些意义不大的词(如 for、with);
- 预处理阶段包括标记化、词干提取、小写转换、去除停用词以及噪声处理,如拼写纠正、处理首字母缩略词、俚语及其他非标准语言。
训练
在此阶段,NLP 算法在预处理数据上进行训练,以准备用于特定用例。要点如下:
- 使用 TF-IDF 或 Word2Vec 将文本转换为向量;
- 如循环神经网络、Transformers 等;
- 采用监督或无监督机器学习;
- 例如,使用梯度下降;
- 在这个阶段,NLP 算法会在预处理的数据上进行训练,以准备应用于特定场景。关键步骤包括使用 TF-IDF 或 Word2Vec 将文本转化为向量,选择任务处理架构如 RNN 或 Transformers,采用监督或无监督学习方法,创建训练循环如梯度下降,并优化性能。
部署
最后,部署 NLP 模型并将其集成到必要的系统中以处理新数据。部署包括:
- 通过 API 或框架整合模型;
- 确保可扩展性和安全性;
- 实施性能跟踪和 A/B 测试;
- 最后一步是部署 NLP 模型并将其集成到系统中以处理新的数据,这包括通过 API 或框架整合模型,确保其可扩展性和安全性,实施性能追踪和 A/B 测试,并定期重新训练模型。
总体来说,开发自然语言处理模型是一项既复杂又耗资的任务。为避免这些挑战,企业往往选择预训练模型如 BERT 或 GPT,开源 NLP 库,NLP API 或者是针对特定任务的 NLP API,如情感分析 API。
DataForSEO API 中的 NLP:内容生成、内容分析、AI SERP 摘要
DataForSEO 提供一系列利用自然语言处理 (NLP) 技术的应用程序编程接口 (API)。每个 API 都旨在执行特定任务并提供可根据您的自定义目的集成的数据。DataForSEO 提供了一系列利用 NLP 技术的 API,每个 API 都旨在执行特定任务,并提供可定制的数据。
内容生成 API
DataForSEO 的内容生成 API 是一个高效的基于 NLP 的解决方案,能自动执行多项内容相关的任务,如简化内容创作和加快内容优化。
该 API 集成了一系列技术,使我们的 NLP 模型能够:
- 制作引人入胜且独特的文章、社交媒体帖子、电子邮件等;
- 生成元标记;
- 为主要主题推荐子主题;
- 解释您的内容;
- 检测语法和拼写错误;
- 该 API 结合了多种技术,使我们的 NLP 模型能够创作吸引人的文章、社交媒体帖子、电子邮件等,生成元标签,为主题推荐子话题,解释内容,检测语法和拼写错误,并提供详细的内容分析,包括字数统计、可读性评估、关键词密度等。
为了确保输出内容符合 SEO 最佳实践且风格一致,Content Generation API 还使用复杂的机器学习算法,根据之前的输出生成单词或短语。为了确保输出内容符合 SEO 最佳实践并保持一致性,内容生成 API 使用复杂的机器学习算法,根据先前的输出生成词汇或短语。需要注意的是,生成的文本不会抄袭,但仍建议由人工编辑进行最终审阅。
在本文中,您将了解更多关于内容生成 API 及其功能的信息。
内容分析 API
DataForSEO 的内容分析 API 通过强大的情绪分析功能来加强品牌监控。该 API 利用我们先进的 NLP 模型,能够轻松识别网络上针对特定关键字、产品或品牌的提及,并即时分类每条提及的情绪。
该模型经过大量精心挑选的数据训练,不仅能够准确识别和评分积极、消极和中性情绪,还能识别和评分愤怒、喜悦、爱、悲伤等具体情绪反应以及分享内容的愿望。
除了发现提及并解读情绪外,内容分析 API 还提供了专门的端点,用于按类别或关键字查看提及和情绪的趋势。值得一提的是,该 API 支持超过 70 种语言。
了解更多:如何使用内容分析 API 来检测网络提及的情绪。
SERP API 中的 AI 摘要
SERP API 中的 AI Summary 端点是 DataForSEO 人工智能工具套件的最新成员。它利用先进的 NLP 算法来汇总搜索引擎结果页面 (SERP) 中的数据并提供关键见解。该端点也是可定制的,它提供了几个选项,可以指示算法:
- 生成摘要时考虑排名靠前的网站的内容;
- answer_box, knowledge_graph, featured_snippet;
- SERP API 中的 AI 摘要端点是 DataForSEO 人工智能工具集的最新成员,它利用先进的 NLP 算法来汇总搜索引擎结果页面(SERP)中的数据并提供关键见解。该端点可定制,提供了几个选项,如 answer_box, knowledge_graph, featured_snippet,以及根据自定义提示生成响应。
请注意,AI 摘要端点与 SERP API 兼容,并支持所有 SERP API 搜索引擎。要开始使用,您应先设置一个任务来收集搜索结果数据,然后指定该任务的 ID 并通过 AI 摘要端点进行 API 调用。
您可以查阅我们的文档以获取更多关于 AI 摘要的信息,包括详细的指导和代码示例。
最后,我们想指出 DataForSEO 提供按使用量计费的 API,确保价格合理且质量可靠。使用我们的解决方案,您可以在预算内执行定制的内容和 SERP 分析,或创建量身定制的软件。
要深入了解人工智能自动化的世界以及 NLP 驱动 API 的潜在应用场景,请继续阅读。
利用人工智能自动化的 3 个用例
在开发利用先进算法、机器学习和自然语言处理(NLP)的人工智能软件时,让各个组件和谐协作可能颇具挑战。
为了帮助您顺利完成开发过程,我们将提供分步指南,展示如何利用 DataForSEO API 的强大功能通过 AI 自动执行多项任务。
内容创作
内容创作是人工智能自动化最常见的用例之一。它使企业能够显著加快和扩展撰写文章、产品描述、社交媒体帖子、新闻通讯等的过程。
借助 DataForSEO AI SERP 摘要和内容生成 API,您可以利用强大的数据摘要和自然语言生成技术来生成连贯且相关的内容。
让我们看看如何使用这些解决方案来分析您的竞争对手,制定博客文章计划,并创建一篇可以在 SERP 中挑战您的竞争对手的完整文章。
首先,使用与您的业务和目标位置相关的关键字向Organic Google SERP API发出请求。作为示例查询,我们将针对以下位置使用“如何挑选沙发”:美国佛罗里达州。
提示:如果您不知道如何选择关键字,请尝试使用DataForSEO Labs API生成网站关键字。为了让您的研究更加具体,您可以按商业搜索意图过滤结果,以获得与购买前探索阶段最相关的关键字列表,从而最有助于与潜在客户建立信任关系。
步骤1. POST: https://api.dataforseo.com/v3/serp/google/organic/task_post
[
{
"language_name": "English",
"location_name": "Florida,United States",
"keyword": "how to pick a couch",
"device": "desktop"
}
]
收到回复后,无需手动浏览排名靠前的页面。只需使用任务 ID(例如:“id”:“09131420-1535-0066-0000-9208ccf0767a”)向AI 摘要端点发出请求,我们的算法将从结果中的页面中获取内容以生成快速摘要。您还可以使用自定义提示为我们的 AI 定义精确的任务。
第 2 步。 POST: https://api.dataforseo.com/v3/serp/ai_summary
[
{
"task_id": "09131420-1535-0066-0000-9208ccf0767a",
"prompt": "provide titles of top results and a full summary of content for each result",
"include_links": true,
"fetch_content": true,
"suport_extra": true
}
]
{
"version": "0.1.20230825",
"status_code": 20000,
"status_message": "Ok.",
"time": "22.8242 sec.",
"cost": 0.01,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "09131428-1535-0559-0000-6b9d6ed39e11",
"status_code": 20000,
"status_message": "Ok.",
"time": "22.7667 sec.",
"cost": 0.01,
"result_count": 1,
"path": [
"v3",
"serp",
"ai_summary"
],
"data": {
"api": "serp",
"function": "ai_summary",
"task_id": "09131420-1535-0066-0000-9208ccf0767a",
"prompt": "provide titles of top results and a full summary of content for each result",
"include_links": true,
"fetch_content": true,
"suport_extra": true
},
"result": [
{
"items_count": 1,
"items": [
{
"summary": "Title of top result: How to Choose the Perfect Sofa for Your Living Space [https://www.bhg.com/couch-buying-guide-7370559]\nSummary of content: This article provides tips on how to choose the perfect sofa for your living space. It suggests starting by picking a style that complements your design aesthetic. It also emphasizes the importance of considering factors like price point, comfort, quality, color, and additional features like stain-resistant fabric. The article aims to simplify the task of choosing a sofa by outlining the most important details to consider during the shopping process.\nTitle of second result: The Complete Guide on How to Buy a Sofa [https://www.apartmenttherapy.com/how-to-buy-sofa-36809606]\nSummary of content: This comprehensive guide provides valuable information on buying a sofa. It emphasizes the importance of considering both aesthetic and practical factors when making a purchase. The article suggests that comfort should be a priority and discusses how to ensure you're sourcing the right piece, especially when buying online. It also discusses the components that make up a quality sofa and provides helpful tips for making an informed decision.\nTitle of fourth result: How to Buy a Good Couch [https://www.thespruce.com/tips-for-buying-a-great-sofa-1391218]\nSummary of content: This article focuses on buying a good quality couch that will stand the test of time. It emphasizes the importance of considering factors like how the couch will be used, the space it will be in, and the style of the room. The article also discusses the difference between a couch and a sofa and provides tips on reviving an aging couch or replacing it if necessary.\nTitle of fifth result: The Ultimate Guide to Buying a Sofa That Will Stand the Test of Time [https://www.housebeautiful.com/home-remodeling/interior-designers/tips/a1092/sofa-buying-guide/]\nSummary of content: This guide highlights the significance of buying a sofa that will last and define your space. It discusses the construction of a well-constructed sofa, including the importance of a wooden frame that is kiln-dried. The article also provides tips for selecting the perfect sofa based on your lifestyle and preferences.\nTitle of sixth result: 8 Tips For Choosing the Perfect Sofa [https://www.universalexplorehome.com/2020/07/15/8-tips-for-choosing-the-perfect-sofa/]\nSummary of content: This article offers eight tips for choosing the perfect sofa. It suggests considering your lifestyle and requirements, such as the need for a sectional or stain-resistant upholstery. It also advises measuring the space and taking into account the orientation of the sofa. The article provides additional tips for selecting the right sofa for your home.\nNote: The analysis includes the ranking of each website in the google SERP."
}
]
}
]
}
]
}
现在我们已经了解了排名靠前的网站和内容类型,我们可以利用这些见解为我们的目标业务创建一篇全面的博客文章。例如,我们可以挑选一个排名结果来解释其标题和内容摘要,然后使用标题生成子主题并使用内容生成 API获取博客文章的大纲。
步骤3. POST: https://api.dataforseo.com/v3/content_generation/paraphrase/live
[
{
"text": "Title: The Ultimate Guide to Buying a Sofa That Will Stand the Test of Time. Summary of content: This guide highlights the significance of buying a sofa that will last and define your space. It discusses the construction of a well-constructed sofa, including the importance of a wooden frame that is kiln-dried. The article also provides tips for selecting the perfect sofa based on your lifestyle and preferences.",
"creativity_index": 0.3
}
]
{
"version": "0.1.20230825",
"status_code": 20000,
"status_message": "Ok.",
"time": "4.0411 sec.",
"cost": 0.01425,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "09131440-1535-0503-0000-37776669340c",
"status_code": 20000,
"status_message": "Ok.",
"time": "3.9669 sec.",
"cost": 0.01425,
"result_count": 1,
"path": [
"v3",
"content_generation",
"paraphrase",
"live"
],
"data": {
"api": "content_generation",
"function": "paraphrase",
"text": "Title: The Ultimate Guide to Buying a Sofa That Will Stand the Test of Time. Summary of content: This guide highlights the significance of buying a sofa that will last and define your space. It discusses the construction of a well-constructed sofa, including the importance of a wooden frame that is kiln-dried. The article also provides tips for selecting the perfect sofa based on your lifestyle and preferences.",
"creativity_index": 0.3
},
"result": [
{
"input_tokens": 95,
"output_tokens": 75,
"new_tokens": 75,
"generated_text": "Title: How to Choose a Sofa That Will Last a Lifetime. Summary of content: This guide offers practical advice on selecting a sofa that will stand the test of time. It covers the key factors to consider when choosing a sofa, such as the quality of the materials used, the durability of the frame, and the comfort level."
}
]
}
]
}
步骤4. POST: https://api.dataforseo.com/v3/content_generation/generate_sub_topics/live
[
{
"topic": "How to Choose a Sofa That Will Last a Lifetime",
"creativity_index": 0.9
}
]
{
"version": "0.1.20230825",
"status_code": 20000,
"status_message": "Ok.",
"time": "5.6213 sec.",
"cost": 0.0001,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "09131444-1535-0543-0000-e3b562478e10",
"status_code": 20000,
"status_message": "Ok.",
"time": "5.5858 sec.",
"cost": 0.0001,
"result_count": 1,
"path": [
"v3",
"content_generation",
"generate_sub_topics",
"live"
],
"data": {
"api": "content_generation",
"function": "generate_sub_topics",
"topic": "How to Choose a Sofa That Will Last a Lifetime",
"creativity_index": 0.9
},
"result": [
{
"input_tokens": 110,
"output_tokens": 236,
"new_tokens": 236,
"sub_topics": [
"Choosing the Right Materials",
"Considering Comfort and Support",
"Measuring for the Perfect Fit",
"Budgeting for a High-Quality Sofa",
"The Importance of Quality Upholstery",
"How to Select the Right Sleeper Sofa",
"The Benefits of Investing in a Custom Sofa",
"Evaluating the Durability of a Sofa",
"Tips for Caring for Your Sofa to Extend Its Lifespan",
"The Impact of Sofa Design on Resale Value"
]
}
]
}
]
}
一旦我们拥有了所需的一切,我们最终就可以指定主要主题和子主题来生成整篇文章的文本。
步骤5. POST: https://api.dataforseo.com/v3/content_generation/generate_text/live
[
{
"topic": "How to Choose a Sofa That Will Last a Lifetime",
"sub_topics": [
"Choosing the Right Materials",
"Considering Comfort and Support",
"Measuring for the Perfect Fit",
"Budgeting for a High-Quality Sofa",
"The Importance of Quality Upholstery",
"How to Select the Right Sleeper Sofa",
"The Benefits of Investing in a Custom Sofa",
"Evaluating the Durability of a Sofa",
"Tips for Caring for Your Sofa to Extend Its Lifespan",
"The Impact of Sofa Design on Resale Value"
],
"description": "This guide highlights the significance of buying a sofa that will last and define your space. The article also provides tips for selecting the perfect sofa based on your lifestyle and preferences.",
"meta_keywords": [
"buy a sofa",
"buy a couch",
"how to pick a couch"
],
"creativity_index": 0.8,
"word_count": 1000
}
]
{
"version": "0.1.20230825",
"status_code": 20000,
"status_message": "Ok.",
"time": "45.1599 sec.",
"cost": 0.0525,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "09131450-1535-0502-0000-3089defcc08d",
"status_code": 20000,
"status_message": "Ok.",
"time": "45.1382 sec.",
"cost": 0.0525,
"result_count": 1,
"path": [
"v3",
"content_generation",
"generate_text",
"live"
],
"data": {
"api": "content_generation",
"function": "generate_text",
"topic": "How to Choose a Sofa That Will Last a Lifetime",
"sub_topics": [
"Choosing the Right Materials",
"Considering Comfort and Support",
"Measuring for the Perfect Fit",
"Budgeting for a High-Quality Sofa",
"The Importance of Quality Upholstery",
"How to Select the Right Sleeper Sofa",
"The Benefits of Investing in a Custom Sofa",
"Evaluating the Durability of a Sofa",
"Tips for Caring for Your Sofa to Extend Its Lifespan",
"The Impact of Sofa Design on Resale Value"
],
"description": "This guide highlights the significance of buying a sofa that will last and define your space. The article also provides tips for selecting the perfect sofa based on your lifestyle and preferences.",
"meta_keywords": [
"buy a sofa",
"buy a couch",
"how to pick a couch"
],
"creativity_index": 0.8,
"word_count": 1000,
"include_conclusion": true
},
"result": [
{
"input_tokens": 288,
"output_tokens": 1050,
"new_tokens": 1050,
"generated_text": "When it comes to choosing a sofa, you want to make sure you're making a smart investment that will last for years to come. But with so many options on the market, it can be tough to know where to start. Fortunately, by considering a few key factors, you can find a sofa that not only looks great but also provides lasting comfort and support.\nChoosing the Right Materials\n-------------------\n\nThe materials used in a sofa are a crucial factor in determining its durability and lifespan. Look for sofas made with high-quality materials such as solid wood frames, durable fabrics, and comfortable cushioning. Avoid sofas with flimsy frames or low-quality materials that may break down quickly.\nConsidering Comfort and Support\n-------------------------\n\nComfort and support are essential when it comes to a sofa. Look for a sofa that provides adequate cushioning and support for your body. Consider the seat depth and height, as well as the armrest height and width. A sofa that provides the right amount of support will help prevent back and neck strain.\nMeasuring for the Perfect Fit\n-----------------------\n\nMeasuring your space and your body is crucial when choosing a sofa. Make sure you have enough space to accommodate the sofa comfortably, and consider how you'll use the space. A sofa that is too small or too large for your space can be uncomfortable and difficult to use.\nBudgeting for a High-Quality Sofa\n---------------------\n\nWhile it's important to invest in a high-quality sofa, it's also important to set a budget and stick to it. Avoid overspending on a sofa that may not provide the quality and comfort you need. Consider the cost of the sofa, as well as any additional costs such as delivery and assembly.\nThe Importance of Quality Upholstery\n------------------\n\nThe upholstery of a sofa is another important factor to consider. Look for sofas with high-quality upholstery that is durable and easy to clean. Avoid sofas with cheap or flimsy upholstery that may wear out quickly.\nHow to Select the Right Sleeper Sofa\n--------------------\n\nIf you're looking for a sofa that can convert into a bed, consider the size and comfort of the sleeper section. Make sure the sleeper section is large enough to accommodate a comfortable night's sleep, and look for a sofa with a sturdy frame that can support the weight of multiple people.\nThe Benefits of Investing in a Custom Sofa\n---------------------\n\nWhile pre-made sofas have their advantages, investing in a custom sofa can provide unparalleled comfort and style. A custom sofa can be tailored to your specific needs and preferences, providing a unique and comfortable seating solution.\nEvaluating the Durability of a Sofa\n------------------------\n\nWhen evaluating the durability of a sofa, consider the materials used, as well as the construction and design. Look for sofas with sturdy frames and high-quality materials that will withstand the test of time. Avoid sofas with flimsy frames or low-quality materials that may break down quickly.\nTips for Caring for Your Sofa to Extend Its Lifespan\n------------------\n\nProper care and maintenance can help extend the lifespan of your sofa. Avoid exposing your sofa to direct sunlight or extreme temperatures, and vacuum regularly to remove dirt and debris. Consider using a sofa protector to protect the upholstery and extend the life of your sofa.\nThe Impact of Sofa Design on Resale Value\n------------------\n\nThe design of your sofa can have a significant impact on its resale value. Choose a sofa with a timeless design that will appeal to potential buyers. Avoid sofas with trendy designs that may go out of style quickly, as they may lower the resale value of your home.",
"supplement_token": "FOQDXQ"
}
]
}
]
}
DataForSEO AI 快速而简单,帮助我们制作了一篇文章的完整草稿,这篇文章将帮助我们的业务在美国佛罗里达州的“如何挑选沙发”的 SERP 上获得推荐。
如果您想进一步了解,可以使用supplement_token
继续生成。此外,您还可以为此文本生成元标记,即标题和描述标记。您也可以尝试使用AI SERP 摘要洞察来提高点击率和用户参与度:请求 AI SERP 摘要来获取结果中的标题和描述,然后使用其中一些作为目标文本为您的博客文章生成元标记。
不要犹豫,使用与您的业务相关的示例来测试AI SERP 摘要和内容生成 API 。
竞争对手分析
分析竞争对手是任何数字营销策略的重要组成部分。人工智能自动化可以让您在几秒钟内深入了解广阔的网络,从而将您的竞争对手分析提升到一个新的水平。
我们的内容分析 API可以扫描数百万个网络资源,为您提供目标竞争对手或其产品的提及以及相关情绪。
您所要做的就是keyword
在将任务设置为搜索端点时定义一个目标。
例如,让我们尝试找到提及Maiden Home The Jones Modular沙发的最可信资源,并发现提及该产品时使用的语气。
POST: https://api.dataforseo.com/v3/content_analysis/search/live
[
{
"keyword": "Maiden Home The Jones Modular",
"keyword_fields": {
"snippet": "Maiden Home The Jones Modular"
},
"page_type": [
"news",
"blogs",
"message-boards",
"organization"
],
"search_mode": "one_per_domain",
"filters": [
"country",
"=",
"US"
],
"internal_list_limit": 5,
"order_by": [
"domain_rank,desc"
],
"limit": 2
}
]
返回的数据不仅可以帮助您发现关键词提及,还可以发现提及该关键词的每个资源的域和域强度。我们的 API 还将为您提供包含目标关键词的文本片段,而 DataForSEO AI 将确定包裹每个引用的情绪和情感反应。
{
"version": "0.1.20230825",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.2233 sec.",
"cost": 0.02006,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "09131518-1535-0463-0000-80dfa4af649b",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.1866 sec.",
"cost": 0.02006,
"result_count": 1,
"path": [
"v3",
"content_analysis",
"search",
"live"
],
"data": {
"api": "content_analysis",
"function": "search",
"keyword": "Maiden Home The Jones Modular",
"keyword_fields": {
"snippet": "Maiden Home The Jones Modular"
},
"page_type": [
"news",
"blogs",
"message-boards",
"organization"
],
"search_mode": "one_per_domain",
"filters": [
"country",
"=",
"US"
],
"order_by": [
"domain_rank,desc"
],
"limit": 2
},
"result": [
{
"offset_token": "eyJDdXJyZW50T2Zmc2V0IjoyLCJSYXdSZXF1ZXN0Ijp7ImtleXdvcmQiOiJNYWlkZW4gSG9tZSBUaGUgSm9uZXMgTW9kdWxhciIsImtleXdvcmRfZmllbGRzIjp7InNuaXBwZXQiOiJNYWlkZW4gSG9tZSBUaGUgSm9uZXMgTW9kdWxhciJ9LCJwYWdlX3R5cGUiOnsidHlwZXMiOlsibmV3cyIsImJsb2dzIiwibWVzc2FnZS1ib2FyZHMiLCJvcmdhbml6YXRpb24iXSwibWVyZ2UiOiJvciJ9LCJzZWFyY2hfbW9kZSI6Im9uZV9wZXJfZG9tYWluIiwicXVlcnkiOnsiZmllbGQiOiJjb3VudHJ5IiwidHlwZSI6ImVxIiwidmFsdWUiOiJVUyJ9LCJvcmRlcl9ieSI6eyJvcmRlcl9maWVsZCI6ImRvbWFpbl9yYW5rIiwib3JkZXJfdHlwZSI6ImRlc2MifSwibGltaXQiOjIsImFpZCI6MTUzNX0sIlNlYXJjaEFmdGVyRGF0YSI6eyJWZXJzaW9uIjoxLCJTZWFyY2hBZnRlclZhbHVlcyI6eyJkb21haW5fcmFuayI6MTU2MDYyMTguMCwiX3Njb3JlIjo0MTA3OS41NCwidXJsX2hhc2giOiItNzYzMTAxNzk0OTA5MjAzMjI5MyJ9LCJUb2tlblJlYWxPZmZzZXQiOjB9fQ==",
"total_count": 18,
"items_count": 2,
"items": [
{
"type": "content_analysis_search",
"url": "https://www.aol.com/lifestyle/22-cozy-seating-arrangements-midday-132300710.html",
"domain": "www.aol.com",
"main_domain": "aol.com",
"url_rank": 0,
"spam_score": 0,
"domain_rank": 687,
"fetch_time": "2023-07-09 23:31:43 +00:00",
"country": "US",
"language": "en",
"score": 44387.812,
"page_category": [
10009,
10413,
11574,
12818,
10405,
10021,
10178,
10937,
12263
],
"page_types": [
"news"
],
"ratings": null,
"social_metrics": null,
"content_info": {
"content_type": "page_content",
"title": "The Jones Modular",
"main_title": "The Most Comfortable Couches You Can Buy Online, According to Design Pros",
"previous_title": "Atelier Sofa",
"level": 2,
"author": "Isis Briones, Medgina Saint-Elien, Jessica Cherner",
"snippet": "Few brands craft luxurious sofas like Maiden Home. Rather than offer their loyal clients a bevy of options, which, more often than not, are more stressful than helpful, Maiden Home sells 13 styles, including The Jones, a modular option we are shamelessly obsessed with. We love it in the sea foam green pictured, but if you're into something more neutral, opt for any of the brand's myriad fabric options. Plus, it comes with free white glove delivery because it's made to order, meaning no one is going into a warehouse and pulling out a sofa that's been sitting on a shelf for months.",
"snippet_length": 586,
"social_metrics": null,
"highlighted_text": null,
"language": "en",
"sentiment_connotations": {
"anger": 0.06424564123153687,
"happiness": 0.28066372871398926,
"love": 0.20608040690422058,
"sadness": 0.10792048275470734,
"share": 0.13618203997612,
"fun": 0.2049676775932312
},
"connotation_types": {
"positive": 0.25451037287712097,
"negative": 0.11579282581806183,
"neutral": 0.6297268271446228
},
"text_category": [
10108,
10009,
10405,
10013
],
"date_published": "2023-06-02 16:38:00 +00:00",
"content_quality_score": 95,
"semantic_location": "article",
"rating": null,
"group_date": "2023-06-02 16:38:00 +00:00"
}
},
{
"type": "content_analysis_search",
"url": "https://onehousing.us/best-made-sofa/",
"domain": "onehousing.us",
"main_domain": "onehousing.us",
"url_rank": 0,
"spam_score": 0,
"domain_rank": 470,
"fetch_time": "2023-08-23 20:35:25 +00:00",
"country": "US",
"language": "en",
"score": 41079.54,
"page_category": [
10004,
10108,
10756,
10009,
10405
],
"page_types": [
"cms",
"blogs",
"organization"
],
"ratings": null,
"social_metrics": null,
"content_info": {
"content_type": "page_content",
"title": "1. Maiden Residence",
"main_title": "The 27 Best Sofa Brands for 2023",
"previous_title": "Excessive-Finish Sofas",
"level": 3,
"author": "myhouse",
"snippet": "Beginning value: Sofas begin at round $2,100.\nWith regards to your own home, Maiden Residence believes you shouldn’t settle-for generic design, lesser high quality or something in need of an ideal match. Every of its sofas is handmade to order by craftsman companions in North Carolina—working with woodworking, cushion, tailoring, and fabric artisans which have every honed their craft from strategies handed down by generations.\nAssessment: We shipped Maiden Residence’s Varick Couch and matching ottoman to one among our contributors — learn the overview right here. We aslo shipped the Jones Modular Couch to one among our writers, take a look at the Jones overview right here.\n“Prospects hunt down Maiden Residence as a result of our design ethos and dedication to high quality is second to none,” founder Nidhi Kapur informed Dwelling Cozy. “Our prospects are people who wish to discover funding items for his or her house – the items they see themselves residing with for years, these that may stand the take a look at of time each aesthetically and functionally.” \nMerchandise: Maiden Residence gives a spread of sofas, sectionals and modular items.\n Supply: Customized items are prepared for supply in as little as 6 weeks from time of order. \nDelivery charges: Complimentary transport and white glove supply service with any furnishings order.\n↦ Store now at maidenhome.com",
"snippet_length": 1386,
"social_metrics": null,
"highlighted_text": null,
"language": "en",
"sentiment_connotations": {
"anger": 0.0571134053170681,
"happiness": 0.2957421839237213,
"love": 0.25315871834754944,
"sadness": 0.08308788388967514,
"share": 0.13912850618362427,
"fun": 0.17182937264442444
},
"connotation_types": {
"positive": 0.4710148274898529,
"negative": 0.18413496017456055,
"neutral": 0.34488028287887573
},
"text_category": [
10017,
10142,
10769,
12067,
10004,
10108
],
"date_published": "2023-08-18 15:20:05 +00:00",
"content_quality_score": 94,
"semantic_location": "article",
"rating": null,
"group_date": "2023-08-18 15:20:05 +00:00"
}
}
]
}
]
}
]
}
然后,您可以使用这些意见挖掘数据来找出竞争对手产品和公司整体的优势和劣势,并据此制定自己的战略。例如,您可以复制竞争对手的一些成功功能,也可以找出需要避开的陷阱。
此外,您还可以监控竞争对手的产品在某个资源上被提及的时间,以寻找他们的品牌联盟和新的平台来推广您的产品。
Google 搜索结果摘要
人工智能自动化的另一个非常有用的用例是生成 Google 搜索结果摘要。这些数据可以以多种方式应用。
Google 新闻简报
借助先进的 NLP 技术,您可以从 Google 新闻 SERP 上的最新新闻中提取关键信息,并为用户提供包含最重要的事件的详尽简报。
问答
您还可以利用 AI 和 SERP 数据来提供问答系统,例如聊天机器人、虚拟助手或快速响应所需的自定义软件。因此,一旦用户提供查询,系统就会自动从 SERP 请求此数据,智能算法将汇总结果以返回引人注目且相关的响应。
使用我们的SERP API和AI SERP Summary端点,获取必要的情报并收集数据来支持这些解决方案将变得快速而简单。
正如我们在内容创建部分中解释的那样,您应该首先请求 SERP 数据。如果您想获取 Google 新闻结果,请对Google 新闻 SERP API的Task POST或Live端点进行 API 调用。
如果您有兴趣从传统的 Google 搜索收集数据,请使用Organic Google SERP端点。
在下面的示例中,我们将获取新闻结果页面,然后使用响应中的任务 ID 生成有关 Apple 最新动态的摘要。
步骤1. POST: https://api.dataforseo.com/v3/serp/google/news/live/advanced
[
{
"language_name": "English",
"location_name": "Florida,United States",
"keyword": "apple",
"device": "desktop"
}
]
从响应中复制任务 ID:。09131532-1535-0066-0000-24a143486afc
如有必要,在将任务设置为 AI 摘要时指定提示。
第 2 步。 POST: https://api.dataforseo.com/v3/serp/ai_summary
[
{
"task_id": "09131532-1535-0066-0000-24a143486afc",
"prompt": "provide titles of top results and a full summary of content for each result",
"include_links": true,
"fetch_content": true,
"suport_extra": true
}
]
这是最终的回应,其中包含有关 Apple 公司及其产品的新闻摘要。
{
"version": "0.1.20230825",
"status_code": 20000,
"status_message": "Ok.",
"time": "27.1968 sec.",
"cost": 0.01,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "09131532-1535-0559-0000-3e3813aeb5c5",
"status_code": 20000,
"status_message": "Ok.",
"time": "27.1364 sec.",
"cost": 0.01,
"result_count": 1,
"path": [
"v3",
"serp",
"ai_summary"
],
"data": {
"api": "serp",
"function": "ai_summary",
"task_id": "09131532-1535-0066-0000-24a143486afc",
"prompt": "provide titles of top results and a full summary of content for each result",
"include_links": true,
"fetch_content": true,
"suport_extra": true
},
"result": [
{
"items_count": 1,
"items": [
{
"summary": "Title of Result 1: Apple's $60 iCloud Service Is the Future of Apple\nSummary of Result 1: Apple announced new iCloud plans, called iCloud+, which offer 6 terabytes of cloud storage for $30 per month and 12 terabytes for $60 per month. The high cost is part of Apple's strategy to keep customers locked into its ecosystem by making it harder for them to switch to other services. The company aims to expand its services and subscription offerings in the future.\nTitle of Result 2: AI quietly reshapes Apple iPhones, Watches\nSummary of Result 2: Apple is using artificial intelligence (AI) to improve basic functions in its new iPhones and watches. The new devices feature improved semiconductor designs and a four-core \"Neural Engine\" that can process machine learning tasks up to twice as quickly. The AI components also enhance Siri, Apple's voice assistant, making it 25% more accurate. Unlike other companies, Apple is not pushing for significant transformations with AI, but rather focusing on enhancing user experience.\nTitle of Result 3: New Apple Leak Highlights Shock MacBook Pro Decision\nSummary of Result 3: There have been leaks suggesting that Apple's upcoming M3 launch may not include the expected MacBook Air and MacBook Pro laptops. These leaks have tempered expectations for Apple's October event, which was anticipated to include the launch of the M3 chipset along with new Mac products. Bloomberg's Mark Gurman suggests that Apple may opt for press releases to introduce new products instead of prerecorded announcement videos.\nTitle of Result 4: September 2023 Apple Event Spoiler-Free Video Stream [Video Posted]\nSummary of Result 4: Apple's latest \"Wonderlust\" media event is expected to be a pre-recorded presentation. The video will be made available for on-demand viewing shortly after the conclusion of the event. Users who want to avoid spoilers can gather in a designated thread until the video is posted. The timing for the availability of the video is expected to be similar to previous virtual events conducted by Apple.\nTitle of Result 5: Apple’s iPhone 15 event didn’t reveal much about the Vision Pro headset\nSummary of Result 5: Apple introduced its Vision Pro headsets, which combine virtual reality, augmented reality, and connectivity to devices like phones and computers. However, the headsets will not be available for sale until early next year. Information about the headsets is limited, and their pricing is expected to be around $3,500 and up. Apple has yet to provide details on how the headsets will be used and their specific features.\nNote: These titles and summaries are based on the provided information and may not be entirely accurate. Additional details and context may be found in the full articles by following the provided URLs."
}
]
}
]
}
]
}
如您所见,如果您拥有合适的工具,开发基于 AI 的应用程序并不一定是火箭科学。不要犹豫,大胆尝试,提出由 AI 和 NLP 推动的全新变革性解决方案。
结束语
我们希望您喜欢这段旅程,从 NLP 基础知识及其对网络的影响到 AI 自动化减少手动任务的一些最广泛用例。此时,您应该知道如何使用这些 AI 驱动的 DataForSEO API 简化内容创建、竞争对手分析和 Google 结果摘要工具的开发过程:
原文链接:Building AI-Powered Automation Tools With Three NLP-Based APIs