Skip to main content
POST
/
api
/
agentTools
/
executeTask
Execute Task
curl --request POST \
  --url https://api.example.com/api/agentTools/executeTask
import requests

url = "https://api.example.com/api/agentTools/executeTask"

response = requests.post(url)

print(response.text)
const options = {method: 'POST'};

fetch('https://api.example.com/api/agentTools/executeTask', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/agentTools/executeTask",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.example.com/api/agentTools/executeTask"

req, _ := http.NewRequest("POST", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.example.com/api/agentTools/executeTask")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/api/agentTools/executeTask")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
The request body, generated cURL example, and response schema are shown in the API panel. Use this page for execution rules that are easy to miss.
Create and start a scraping task from a template returned by searchTemplates.
1

Choose a template

Pass templateName from searchTemplates.
2

Serialize parameters

Send parameters as a JSON object serialized as a string.
3

Follow server guidance

Use retryGuidance, suggestedNextCall, workflow, and toolHint instead of fixed polling intervals.
searchTemplates -> executeTask -> exportData

Required header

x-external-user-id is required for user-scoped execution.

Row limit

targetMaxRows is optional and accepts values from 0 to 1000000.
Source-backed fields must use option keys. MultiInput and multiselect-like fields must use arrays, even for one item.
templateName is required.taskName is optional.parameters is optional, but must be a serialized JSON object when provided.targetMaxRows is optional.
accepted: the task was accepted for execution.ready: data may be ready to export.awaiting_source_selection: a source-backed field needs a valid option key.invalid, start_failed, and failed: check recoverySuggestion, blockingIssues, missingParamNames, and invalidSourceSelections.
taskId identifies the task to export or inspect.lotNo identifies the batch or run. Pass it to exportData when returned.recoverySuggestion, blockingIssues, missingParamNames, and invalidSourceSelections help the client repair invalid calls.