Upload Extension
curl --request POST \
--url https://api.example.com/browser/extensions \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"file": "<string>"
}
'import requests
url = "https://api.example.com/browser/extensions"
payload = {
"name": "<string>",
"file": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', file: '<string>'})
};
fetch('https://api.example.com/browser/extensions', 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/browser/extensions",
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([
'name' => '<string>',
'file' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.example.com/browser/extensions"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"file\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/browser/extensions")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"file\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/browser/extensions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"file\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"manifest": {},
"createdAt": "<string>",
"updatedAt": "<string>"
}Extensions
Upload Extension
Upload a Chrome extension archive so it can be loaded into future browser sessions.
POST
/
browser
/
extensions
Upload Extension
curl --request POST \
--url https://api.example.com/browser/extensions \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"file": "<string>"
}
'import requests
url = "https://api.example.com/browser/extensions"
payload = {
"name": "<string>",
"file": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', file: '<string>'})
};
fetch('https://api.example.com/browser/extensions', 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/browser/extensions",
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([
'name' => '<string>',
'file' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.example.com/browser/extensions"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"file\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/browser/extensions")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"file\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/browser/extensions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"file\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"manifest": {},
"createdAt": "<string>",
"updatedAt": "<string>"
}Overview
Stores a Chrome extension for this account. Once uploaded, the returnedid can be passed in extensions when creating a session via POST /browser/sessions.
The extension archive must be base64-encoded and sent inline in the JSON body.
Body
string
required
Human-readable extension name (used in listings).
string
required
Base64-encoded bytes of the Chrome
.crx archive (full archive, not a URL).Example Request
curl -X POST "https://api.scrapengine.io/api/v1/browser/extensions" \
-H "Authorization: Bearer $SCRAPENGINE_API_KEY" \
-H "Content-Type: application/json" \
-d "{
\"name\": \"ublock-origin\",
\"file\": \"$(base64 -w 0 ublock.crx)\"
}"
Response
Success Response (201)
string
Extension ID. Pass this in
extensions when creating a session.string
Echoed name.
object
Parsed
manifest.json from the archive.string
ISO-8601 timestamp.
string
ISO-8601 timestamp.
{
"id": "ext-9e1ab4d6",
"name": "ublock-origin",
"manifest": { "manifest_version": 3, "name": "uBlock Origin", "version": "1.55.0" },
"createdAt": "2025-04-24T12:00:00.000Z",
"updatedAt": "2025-04-24T12:00:00.000Z"
}
Error Responses
| Status | Description |
|---|---|
400 | Missing name or file, or file is not valid base64 / not a valid .crx archive. |
401 | Unauthorized — invalid or missing API key. |
Was this page helpful?
⌘I