Upload Excel Parameter File V4

PUT www.hashscraper.com/v4/api/schedules/{schedule_id}/excel_param Content-Type: multipart/form-data

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: Header
    HashScraper API key. Send it in the form Bearer <api_key>.
    Example Bearer YOUR_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.
    Example 8f3a7c1e9b5d24f6
  • excel_file: File (multipart)
    The Excel file to upload. Sent as the excel_file field of multipart/form-data.
    Allowed .xlsx, .xls

Response Fields

  • result: String
    Result of the request.
    Allowed success, error
  • version: String
    API version.
    Example v4
  • request_id: String
    Request trace ID.
    Example req_5a8c1f1c-...
  • elapsed_sec: Float
    Time the server took to produce the response, in seconds (Float).
    Example 0.0421
  • data: Object
    Upload result.
    • id: String
      Echo of the scraper ID.
    • file_name: String
      Original filename of the uploaded file.
    • detected_type: String
      Detected file type that passed validation. xlsx or xls.
      Allowed xlsx, xls

Error Responses

  • MISSING_API_KEY
    Missing or malformed Authorization header. Send as Authorization: Bearer <api_key>. (HTTP 401)
    {
      "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
    No user matches the provided API key. (HTTP 401)
    {
      "result": "error",
      "version": "v4",
      "request_id": "req_5a8c1f1c-...",
      "code": "INVALID_API_KEY",
      "message": "API key is invalid.",
      "elapsed_sec": 0.0011
    }
  • SCHEDULE_NOT_FOUND
    No scraper matches the ID, or the caller does not have access. (HTTP 404)
    {
      "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)
    The excel_file field is empty. (HTTP 400)
    {
      "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)
    The file extension is not in the allow list (.xlsx/.xls) or the file's magic signature does not match. (HTTP 400)
    {
      "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

Example Request
  • cURL
  • Ruby
  • Python
  • NodeJS
  • PHP
  • Java
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))
Example Response 200
{
  "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"
  }
}