Media Download
curl --request POST \
--url https://sdk.nimbleway.com/v2/media \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"country": "<string>",
"expected_mime_types": [
"<string>"
],
"locale": "<string>"
}
'import requests
url = "https://sdk.nimbleway.com/v2/media"
payload = {
"url": "<string>",
"country": "<string>",
"expected_mime_types": ["<string>"],
"locale": "<string>"
}
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({
url: '<string>',
country: '<string>',
expected_mime_types: ['<string>'],
locale: '<string>'
})
};
fetch('https://sdk.nimbleway.com/v2/media', 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://sdk.nimbleway.com/v2/media",
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([
'url' => '<string>',
'country' => '<string>',
'expected_mime_types' => [
'<string>'
],
'locale' => '<string>'
]),
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://sdk.nimbleway.com/v2/media"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"country\": \"<string>\",\n \"expected_mime_types\": [\n \"<string>\"\n ],\n \"locale\": \"<string>\"\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://sdk.nimbleway.com/v2/media")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"country\": \"<string>\",\n \"expected_mime_types\": [\n \"<string>\"\n ],\n \"locale\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sdk.nimbleway.com/v2/media")
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 \"url\": \"<string>\",\n \"country\": \"<string>\",\n \"expected_mime_types\": [\n \"<string>\"\n ],\n \"locale\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"browser_actions": {
"results": [
{
"duration": 1,
"error": "<string>",
"result": "<unknown>"
}
],
"success": true,
"total_duration": 1
},
"cookies": [
"<unknown>"
],
"eval": [
"<unknown>"
],
"fetch": [
"<unknown>"
],
"headers": {},
"html": "<string>",
"links": [
"<string>"
],
"markdown": "<string>",
"network_capture": [
{
"filter": {
"validation": false,
"wait_for_requests_count": 0,
"resource_type": "document",
"status_code": 349.5,
"url": {
"type": "exact",
"value": "<string>"
},
"wait_for_requests_count_timeout": 123
},
"results": [
{
"request": {
"headers": {},
"method": "<string>",
"url": "<string>",
"body": "<string>"
},
"response": {
"body": "<string>",
"headers": {},
"status": 123,
"status_text": "<string>"
}
}
],
"errorMessage": "<string>"
}
],
"pages_html": [
"<string>"
],
"parsing": {
"entities": {},
"status": "<string>"
},
"redirects": [
{
"status_code": 349.5,
"url": "<string>"
}
],
"screenshots": [
"<unknown>"
]
},
"metadata": {
"agent": "<string>",
"driver": "<string>",
"localization_id": "<string>",
"query_duration": 123,
"query_time": "<string>",
"response_parameters": "<unknown>",
"tag": "<string>"
},
"task_id": "<string>",
"url": "<string>",
"debug": {
"performance_metrics": {},
"proxy_total_bytes_usage": 1,
"transformed_output": "<unknown>",
"userbrowser": "<unknown>"
},
"pagination": {
"next_page_params": {}
},
"status_code": 123,
"warnings": [
"<string>"
]
}Media Download
Download media from a URL. Waits for the result before responding.
POST
/
v2
/
media
Media Download
curl --request POST \
--url https://sdk.nimbleway.com/v2/media \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"country": "<string>",
"expected_mime_types": [
"<string>"
],
"locale": "<string>"
}
'import requests
url = "https://sdk.nimbleway.com/v2/media"
payload = {
"url": "<string>",
"country": "<string>",
"expected_mime_types": ["<string>"],
"locale": "<string>"
}
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({
url: '<string>',
country: '<string>',
expected_mime_types: ['<string>'],
locale: '<string>'
})
};
fetch('https://sdk.nimbleway.com/v2/media', 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://sdk.nimbleway.com/v2/media",
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([
'url' => '<string>',
'country' => '<string>',
'expected_mime_types' => [
'<string>'
],
'locale' => '<string>'
]),
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://sdk.nimbleway.com/v2/media"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"country\": \"<string>\",\n \"expected_mime_types\": [\n \"<string>\"\n ],\n \"locale\": \"<string>\"\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://sdk.nimbleway.com/v2/media")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"country\": \"<string>\",\n \"expected_mime_types\": [\n \"<string>\"\n ],\n \"locale\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sdk.nimbleway.com/v2/media")
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 \"url\": \"<string>\",\n \"country\": \"<string>\",\n \"expected_mime_types\": [\n \"<string>\"\n ],\n \"locale\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"browser_actions": {
"results": [
{
"duration": 1,
"error": "<string>",
"result": "<unknown>"
}
],
"success": true,
"total_duration": 1
},
"cookies": [
"<unknown>"
],
"eval": [
"<unknown>"
],
"fetch": [
"<unknown>"
],
"headers": {},
"html": "<string>",
"links": [
"<string>"
],
"markdown": "<string>",
"network_capture": [
{
"filter": {
"validation": false,
"wait_for_requests_count": 0,
"resource_type": "document",
"status_code": 349.5,
"url": {
"type": "exact",
"value": "<string>"
},
"wait_for_requests_count_timeout": 123
},
"results": [
{
"request": {
"headers": {},
"method": "<string>",
"url": "<string>",
"body": "<string>"
},
"response": {
"body": "<string>",
"headers": {},
"status": 123,
"status_text": "<string>"
}
}
],
"errorMessage": "<string>"
}
],
"pages_html": [
"<string>"
],
"parsing": {
"entities": {},
"status": "<string>"
},
"redirects": [
{
"status_code": 349.5,
"url": "<string>"
}
],
"screenshots": [
"<unknown>"
]
},
"metadata": {
"agent": "<string>",
"driver": "<string>",
"localization_id": "<string>",
"query_duration": 123,
"query_time": "<string>",
"response_parameters": "<unknown>",
"tag": "<string>"
},
"task_id": "<string>",
"url": "<string>",
"debug": {
"performance_metrics": {},
"proxy_total_bytes_usage": 1,
"transformed_output": "<unknown>",
"userbrowser": "<unknown>"
},
"pagination": {
"next_page_params": {}
},
"status_code": 123,
"warnings": [
"<string>"
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
200 - application/json
Successful Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The status of the task.
Available options:
success, skipped, fatal, error, postponed, ignored, rejected, blocked Unique identifier for the task.
The final URL.
Show child attributes
Show child attributes
Pagination information if applicable.
- object
- object[]
Show child attributes
Show child attributes
The HTTP status code of the task.
List of warnings generated during the task.
Was this page helpful?
⌘I