Run a Monitor now
curl --request POST \
--url https://agent.tinyfish.ai/v1/monitors/{id}/runs \
--header 'X-API-Key: <api-key>'import requests
url = "https://agent.tinyfish.ai/v1/monitors/{id}/runs"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://agent.tinyfish.ai/v1/monitors/{id}/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://agent.tinyfish.ai/v1/monitors/{id}/runs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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://agent.tinyfish.ai/v1/monitors/{id}/runs"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://agent.tinyfish.ai/v1/monitors/{id}/runs")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://agent.tinyfish.ai/v1/monitors/{id}/runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"run": {
"results": [
{
"url": "https://example.com",
"final_url": "https://www.example.com",
"title": "Example Domain",
"description": "This domain is for use in illustrative examples.",
"language": "en",
"format": "markdown",
"text": "<string>",
"author": "John Doe",
"published_date": "2024-01-15",
"links": [
"<string>"
],
"image_links": [
"<string>"
],
"iframe_links": [
"<string>"
],
"page_metadata": {
"canonical": "https://example.com",
"robots": "max-image-preview:large",
"og": {
"title": "Example Domain",
"image": [
"https://example.com/og.png"
]
},
"twitter": {
"card": "summary_large_image"
}
},
"latency_ms": 1183.4,
"not_modified": true,
"etag": "W/\"abc123\"",
"last_modified": "Wed, 21 Oct 2015 07:28:00 GMT",
"unmatched_selectors": [
"aside.related"
]
}
],
"errors": [
{
"url": "https://invalid.example.com",
"error": "target_http_error",
"status": 404,
"unmatched_selectors": [
"article",
"#content"
],
"candidate_selectors": [
"main",
"nav",
"#content"
]
}
],
"id": "<string>",
"is_baseline": true,
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}API Reference
Run a Monitor now
Run a Monitor immediately, outside its schedule.
POST
/
v1
/
monitors
/
{id}
/
runs
Run a Monitor now
curl --request POST \
--url https://agent.tinyfish.ai/v1/monitors/{id}/runs \
--header 'X-API-Key: <api-key>'import requests
url = "https://agent.tinyfish.ai/v1/monitors/{id}/runs"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://agent.tinyfish.ai/v1/monitors/{id}/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://agent.tinyfish.ai/v1/monitors/{id}/runs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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://agent.tinyfish.ai/v1/monitors/{id}/runs"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://agent.tinyfish.ai/v1/monitors/{id}/runs")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://agent.tinyfish.ai/v1/monitors/{id}/runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"run": {
"results": [
{
"url": "https://example.com",
"final_url": "https://www.example.com",
"title": "Example Domain",
"description": "This domain is for use in illustrative examples.",
"language": "en",
"format": "markdown",
"text": "<string>",
"author": "John Doe",
"published_date": "2024-01-15",
"links": [
"<string>"
],
"image_links": [
"<string>"
],
"iframe_links": [
"<string>"
],
"page_metadata": {
"canonical": "https://example.com",
"robots": "max-image-preview:large",
"og": {
"title": "Example Domain",
"image": [
"https://example.com/og.png"
]
},
"twitter": {
"card": "summary_large_image"
}
},
"latency_ms": 1183.4,
"not_modified": true,
"etag": "W/\"abc123\"",
"last_modified": "Wed, 21 Oct 2015 07:28:00 GMT",
"unmatched_selectors": [
"aside.related"
]
}
],
"errors": [
{
"url": "https://invalid.example.com",
"error": "target_http_error",
"status": 404,
"unmatched_selectors": [
"article",
"#content"
],
"candidate_selectors": [
"main",
"nav",
"#content"
]
}
],
"id": "<string>",
"is_baseline": true,
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}Authorizations
API key for authentication. Get your key from the API Keys page.
Path Parameters
Monitor ID
Required string length:
1 - 36Response
Run result
Fetch result for Page Monitors, Search for Topic
- Option 1
- Option 2
Show child attributes
Show child attributes
Was this page helpful?