Start a skill run
Start a skill run in the background and get a run id at once.
curl --request POST \
--url https://api.valendata.com/v1/skills/{slug}/runs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"inputs": {},
"parameters": {},
"max_results": 250,
"max_pages": 1,
"browser_type": "<string>",
"proxy_config": "<string>",
"profile_id": "<string>",
"scrape_mode": "<string>",
"webhook_url": "<string>",
"version": 2
}
'import requests
url = "https://api.valendata.com/v1/skills/{slug}/runs"
payload = {
"inputs": {},
"parameters": {},
"max_results": 250,
"max_pages": 1,
"browser_type": "<string>",
"proxy_config": "<string>",
"profile_id": "<string>",
"scrape_mode": "<string>",
"webhook_url": "<string>",
"version": 2
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
inputs: {},
parameters: {},
max_results: 250,
max_pages: 1,
browser_type: '<string>',
proxy_config: '<string>',
profile_id: '<string>',
scrape_mode: '<string>',
webhook_url: '<string>',
version: 2
})
};
fetch('https://api.valendata.com/v1/skills/{slug}/runs', 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.valendata.com/v1/skills/{slug}/runs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'inputs' => [
],
'parameters' => [
],
'max_results' => 250,
'max_pages' => 1,
'browser_type' => '<string>',
'proxy_config' => '<string>',
'profile_id' => '<string>',
'scrape_mode' => '<string>',
'webhook_url' => '<string>',
'version' => 2
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.valendata.com/v1/skills/{slug}/runs"
payload := strings.NewReader("{\n \"inputs\": {},\n \"parameters\": {},\n \"max_results\": 250,\n \"max_pages\": 1,\n \"browser_type\": \"<string>\",\n \"proxy_config\": \"<string>\",\n \"profile_id\": \"<string>\",\n \"scrape_mode\": \"<string>\",\n \"webhook_url\": \"<string>\",\n \"version\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.valendata.com/v1/skills/{slug}/runs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"inputs\": {},\n \"parameters\": {},\n \"max_results\": 250,\n \"max_pages\": 1,\n \"browser_type\": \"<string>\",\n \"proxy_config\": \"<string>\",\n \"profile_id\": \"<string>\",\n \"scrape_mode\": \"<string>\",\n \"webhook_url\": \"<string>\",\n \"version\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.valendata.com/v1/skills/{slug}/runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"inputs\": {},\n \"parameters\": {},\n \"max_results\": 250,\n \"max_pages\": 1,\n \"browser_type\": \"<string>\",\n \"proxy_config\": \"<string>\",\n \"profile_id\": \"<string>\",\n \"scrape_mode\": \"<string>\",\n \"webhook_url\": \"<string>\",\n \"version\": 2\n}"
response = http.request(request)
puts response.read_body{
"run_id": "<string>",
"status": "<string>",
"poll_url": "<string>",
"idempotent_replay": false,
"draft_run": false
}{
"detail": "The request is malformed: the body is not JSON, the cursor or Idempotency-Key is not valid.",
"code": "invalid_json",
"type": "invalid_request_error",
"request_id": "3f9a1c2b7d4e"
}{
"detail": "The API key is missing, malformed, revoked, or expired.",
"code": "unauthorized",
"type": "authentication_error",
"request_id": "3f9a1c2b7d4e"
}{
"detail": "Not enough credits to start. `detail` includes `current_balance` and `required`.",
"code": "payment_required",
"type": "billing_error",
"request_id": "3f9a1c2b7d4e"
}{
"detail": "The key lacks a scope, is limited to other skills or workflows, or you may not do this.",
"code": "permission_denied",
"type": "permission_error",
"request_id": "3f9a1c2b7d4e"
}{
"detail": "It does not exist, or it is not yours to see.",
"code": "not_found",
"type": "invalid_request_error",
"request_id": "3f9a1c2b7d4e"
}{
"detail": "A conflict with the current state, or a request with this Idempotency-Key is still running.",
"code": "conflict",
"type": "conflict_error",
"request_id": "3f9a1c2b7d4e"
}{
"detail": "Invalid request — name: Field required",
"code": "validation_error",
"type": "invalid_request_error",
"request_id": "3f9a1c2b7d4e",
"param": "name",
"errors": [
{
"type": "missing",
"loc": [
"body",
"name"
],
"msg": "Field required"
}
]
}{
"detail": "Too many requests for this key, or too many runs in progress. Wait `Retry-After` seconds.",
"code": "rate_limited",
"type": "rate_limit_error",
"request_id": "3f9a1c2b7d4e"
}{
"detail": "Something broke on our side. Retry; runs that fail on our side are refunded.",
"code": "internal_error",
"type": "api_error",
"request_id": "3f9a1c2b7d4e"
}inputs. If your account is busy, the run waits in a queue (up to about an hour, then it fails uncharged).
The rows are not in this response. Read Get a run until status is no longer queued or running, or set webhook_url to have the finished run sent to you. See Webhooks. Send an Idempotency-Key to make retries safe.Authorizations
API key with the vd_sk_ prefix, as Authorization: Bearer vd_sk_.... Create keys in Settings → API Keys.
Headers
Any unique string (such as your order id). Resending the same request with the same key within 24 hours returns the first answer (with Idempotent-Replayed: true) and does nothing twice; the same key with a different request is a 422 idempotency_key_reused.
1 - 255Path Parameters
Body
Body of POST /v1/skills/{slug}/runs.
The skill's inputs (see input_schema on GET /v1/skills/{slug}).
Max rows to return; 0 means the entire list. Omit to use the skill's saved default.
0 <= x <= 500x >= 0https URL that receives the finished run as a signed POST (X-Valendata-Signature).
Recipe version to replay (GET /v1/skills/{slug}/versions). Omit for the pinned or live one.
x >= 1curl --request POST \
--url https://api.valendata.com/v1/skills/{slug}/runs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"inputs": {},
"parameters": {},
"max_results": 250,
"max_pages": 1,
"browser_type": "<string>",
"proxy_config": "<string>",
"profile_id": "<string>",
"scrape_mode": "<string>",
"webhook_url": "<string>",
"version": 2
}
'import requests
url = "https://api.valendata.com/v1/skills/{slug}/runs"
payload = {
"inputs": {},
"parameters": {},
"max_results": 250,
"max_pages": 1,
"browser_type": "<string>",
"proxy_config": "<string>",
"profile_id": "<string>",
"scrape_mode": "<string>",
"webhook_url": "<string>",
"version": 2
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
inputs: {},
parameters: {},
max_results: 250,
max_pages: 1,
browser_type: '<string>',
proxy_config: '<string>',
profile_id: '<string>',
scrape_mode: '<string>',
webhook_url: '<string>',
version: 2
})
};
fetch('https://api.valendata.com/v1/skills/{slug}/runs', 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.valendata.com/v1/skills/{slug}/runs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'inputs' => [
],
'parameters' => [
],
'max_results' => 250,
'max_pages' => 1,
'browser_type' => '<string>',
'proxy_config' => '<string>',
'profile_id' => '<string>',
'scrape_mode' => '<string>',
'webhook_url' => '<string>',
'version' => 2
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.valendata.com/v1/skills/{slug}/runs"
payload := strings.NewReader("{\n \"inputs\": {},\n \"parameters\": {},\n \"max_results\": 250,\n \"max_pages\": 1,\n \"browser_type\": \"<string>\",\n \"proxy_config\": \"<string>\",\n \"profile_id\": \"<string>\",\n \"scrape_mode\": \"<string>\",\n \"webhook_url\": \"<string>\",\n \"version\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.valendata.com/v1/skills/{slug}/runs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"inputs\": {},\n \"parameters\": {},\n \"max_results\": 250,\n \"max_pages\": 1,\n \"browser_type\": \"<string>\",\n \"proxy_config\": \"<string>\",\n \"profile_id\": \"<string>\",\n \"scrape_mode\": \"<string>\",\n \"webhook_url\": \"<string>\",\n \"version\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.valendata.com/v1/skills/{slug}/runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"inputs\": {},\n \"parameters\": {},\n \"max_results\": 250,\n \"max_pages\": 1,\n \"browser_type\": \"<string>\",\n \"proxy_config\": \"<string>\",\n \"profile_id\": \"<string>\",\n \"scrape_mode\": \"<string>\",\n \"webhook_url\": \"<string>\",\n \"version\": 2\n}"
response = http.request(request)
puts response.read_body{
"run_id": "<string>",
"status": "<string>",
"poll_url": "<string>",
"idempotent_replay": false,
"draft_run": false
}{
"detail": "The request is malformed: the body is not JSON, the cursor or Idempotency-Key is not valid.",
"code": "invalid_json",
"type": "invalid_request_error",
"request_id": "3f9a1c2b7d4e"
}{
"detail": "The API key is missing, malformed, revoked, or expired.",
"code": "unauthorized",
"type": "authentication_error",
"request_id": "3f9a1c2b7d4e"
}{
"detail": "Not enough credits to start. `detail` includes `current_balance` and `required`.",
"code": "payment_required",
"type": "billing_error",
"request_id": "3f9a1c2b7d4e"
}{
"detail": "The key lacks a scope, is limited to other skills or workflows, or you may not do this.",
"code": "permission_denied",
"type": "permission_error",
"request_id": "3f9a1c2b7d4e"
}{
"detail": "It does not exist, or it is not yours to see.",
"code": "not_found",
"type": "invalid_request_error",
"request_id": "3f9a1c2b7d4e"
}{
"detail": "A conflict with the current state, or a request with this Idempotency-Key is still running.",
"code": "conflict",
"type": "conflict_error",
"request_id": "3f9a1c2b7d4e"
}{
"detail": "Invalid request — name: Field required",
"code": "validation_error",
"type": "invalid_request_error",
"request_id": "3f9a1c2b7d4e",
"param": "name",
"errors": [
{
"type": "missing",
"loc": [
"body",
"name"
],
"msg": "Field required"
}
]
}{
"detail": "Too many requests for this key, or too many runs in progress. Wait `Retry-After` seconds.",
"code": "rate_limited",
"type": "rate_limit_error",
"request_id": "3f9a1c2b7d4e"
}{
"detail": "Something broke on our side. Retry; runs that fail on our side are refunded.",
"code": "internal_error",
"type": "api_error",
"request_id": "3f9a1c2b7d4e"
}
