Serp

‌‌ The purpose of the Live SERP API AI Summary endpoint is to provide a summary of the content found on any SERP and generate a response based on the user’s specified prompt. To obtain results, you have to specify task_id, which you can find in the response to the POST request. Learn more in our Help Center.

post/v3/serp/ai_summary

Request

  • Base URL: https://api.dataforseo.com
  • URL: https://api.dataforseo.com/v3/serp/ai_summary
  • Auth: HTTP basic

Request body

task_idstring

<em>task identifier</em><br><strong>required field</strong><br>unique identifier of the associated task in the <a href="https://en.wikipedia.org/wiki/Universally_unique_identifier">UUID</a> format<br>you will be able to use it within <strong>30 days</strong> to request the results of the task at any time

promptstring nullable

<em>AI prompt</em><br>optional field<br>additional task for AI summariser;<br>any form of text, question or information that communicates to AI what response you're looking for;<br>max number of symbols or characters you can specify: <code>2000</code>;<br><strong>note:</strong> your prompt has to be relevant to the keyword specified in the POST request to SERP API

support_extraboolean nullable

<em>support extra SERP features</em><br>optional field<br>if set to <code>true</code>, the AI model will consider the following extra SERP features, in addition to <code>organic</code> results: <code>answer_box</code>, <code>knowledge_graph</code>, <code>featured_snippet</code>;<br>default value: <code>true</code>

fetch_contentboolean nullable

<em>fetch content from pages in SERPs</em><br>optional field<br>if set to <code>true</code>, the API will fetch the content from pages featured in SERP results, and the AI model will consider this content when generating the summary in the result;<br>default value: <code>false</code>

include_linksboolean nullable

<em>include source links in the summary</em><br>optional field<br>if set to <code>true</code>, the <code>summary</code> field in the API response will contain links to sources of the generated summary;<br>default value: <code>false</code>

Example request

[
  {
    "task_id": "07031739-1535-0139-0000-9d1e639a5b7d",
    "prompt": "explain what DataForSEO is",
    "include_links": true,
    "fetch_content": true
  }
]

Response

Successful operation

versionstring nullable

the current version of the API

status_codeinteger nullable

general status code you can find the full list of the response codes here

status_messagestring nullable

general informational message you can find the full list of general informational messages here

timestring nullable

total execution time, seconds

costnumber double nullable

total tasks cost, USD

tasks_countinteger nullable

the number of tasks in the tasks array

tasks_errorinteger nullable

the number of tasks in the tasks array returned with an error

Changes