Upload Excel Parameter File V4
Uploads an Excel parameter file for a scraper.
Uploads an Excel file via multipart/form-data. The uploaded file becomes the active parameter file for the scraper, and any previously active file on the same scraper is deactivated automatically (transactional).
Allowed extensions are .xlsx and .xls. In addition to the extension, the file's leading bytes are checked against magic signatures (xlsx=ZIP, xls=OLE2). The file part's Content-Type value is ignored, so any MIME type is acceptable (e.g. application/octet-stream). The overall request must still be multipart/form-data.
The value in the N-th column becomes paramN (e.g. column 1 → param1, column 5 → param5). Empty columns are skipped. Every row from the first one is collected as one run, so a header row is collected too.
Request Parameters
-
Authorization: HeaderHashScraper API key. Send it in the form
Bearer <api_key>. -
schedule_id: String (path)ID of the scraper to upload to. Passed as the
{schedule_id}path segment. You can copy the Bot ID from Actions → Copy Bot ID on the scraper's detail page. -
excel_file: File (multipart)The Excel file to upload. Sent as the
excel_filefield ofmultipart/form-data.
Response Fields
-
result: StringResult of the request.
-
version: StringAPI version.
-
request_id: StringRequest trace ID.
-
elapsed_sec: FloatTime the server took to produce the response, in seconds (Float).
-
data: ObjectUpload result.
-
id: StringEcho of the scraper ID.
-
file_name: StringOriginal filename of the uploaded file.
-
detected_type: StringDetected file type that passed validation.
xlsxorxls.
-
Error Responses
-
MISSING_API_KEY
{ "result": "error", "version": "v4", "request_id": "req_5a8c1f1c-...", "code": "MISSING_API_KEY", "message": "API key is missing.", "elapsed_sec": 0.0008, "details": { "hint": "Send `Authorization: Bearer <api_key>` header." } } -
INVALID_API_KEY
{ "result": "error", "version": "v4", "request_id": "req_5a8c1f1c-...", "code": "INVALID_API_KEY", "message": "API key is invalid.", "elapsed_sec": 0.0011 } -
SCHEDULE_NOT_FOUND
{ "result": "error", "version": "v4", "request_id": "req_5a8c1f1c-...", "code": "SCHEDULE_NOT_FOUND", "message": "Schedule not found.", "elapsed_sec": 0.0021, "details": { "resource": "schedule", "id": "8f3a7c1e9b5d24f6" } } -
MISSING_PARAM (excel_file)
{ "result": "error", "version": "v4", "request_id": "req_5a8c1f1c-...", "code": "MISSING_PARAM", "message": "Required parameter is missing.", "elapsed_sec": 0.0010, "details": { "param_name": "excel_file" } } -
INVALID_PARAM (excel_file)
{ "result": "error", "version": "v4", "request_id": "req_5a8c1f1c-...", "code": "INVALID_PARAM", "message": "excel_file must be .xlsx or .xls with matching magic bytes.", "elapsed_sec": 0.0017, "details": { "param_name": "excel_file", "file_name": "report.csv", "allowed_extensions": [".xlsx", ".xls"] } }
Related Guides
curl -X PUT 'https://www.hashscraper.com/v4/api/schedules/8f3a7c1e9b5d24f6/excel_param' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-F 'excel_file=@/path/to/params.xlsx'
require 'net/http'
require 'json'
require 'uri'
uri = URI('https://www.hashscraper.com/v4/api/schedules/8f3a7c1e9b5d24f6/excel_param')
req = Net::HTTP::Put.new(uri)
req['Authorization'] = 'Bearer YOUR_API_KEY'
File.open('/path/to/params.xlsx', 'rb') do |file|
req.set_form([['excel_file', file]], 'multipart/form-data')
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
http.request(req)
end
puts res.code
puts JSON.pretty_generate(JSON.parse(res.body))
end
import json
import requests
url = "https://www.hashscraper.com/v4/api/schedules/8f3a7c1e9b5d24f6/excel_param"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
with open("/path/to/params.xlsx", "rb") as f:
files = {"excel_file": f}
response = requests.put(url, headers=headers, files=files)
print(response.status_code)
print(json.dumps(response.json(), indent=2, ensure_ascii=False))
{
"result": "success",
"version": "v4",
"request_id": "req_5a8c1f1c-9b2d-4e7c-9abf-3f7e0a4d1b21",
"elapsed_sec": 0.0421,
"data": {
"id": "8f3a7c1e9b5d24f6",
"file_name": "params_2026Q2.xlsx",
"detected_type": "xlsx"
}
}