Request Multiple Data Collections V2

POST https://www.hashscraper.com/api/collect_multiple Content-Type: application/json; version=2

Trigger collections on multiple scrapers in a single call.

For each entry in the schedules array, this endpoint performs the same action as collect. Each entry can carry its own schedule_id and param1~param10.

Processing happens in two phases. The validation phase checks every entry's schedule_id and required parameters; if any entry fails, no collection is started and the call returns an error immediately. The execution phase enqueues the validated entries one by one — if a later entry fails here, the earlier entries that already enqueued are still running and the remaining ones are skipped.

For each entry, param1~param10 values are persisted on that scraper and become defaults for the next execution. Any parameter not included is overwritten with an empty value, so include every parameter currently in use even if you only intend to change a few.

Requests are rejected when the service ticket has expired or available credits are exhausted. In that case the response uses error_message instead of message. The same error_message key is used when schedules is not an array.

Request Parameters

  • api_key: String
    HashScraper API key
    Example YOUR_API_KEY
  • schedules: Array<Object>
    Array of collection request entries. Each entry can carry schedule_id and param1~param10.
    • schedule_id: String
      ID of the scraper to run.
    • param1: optional String
      First scraper parameter. Required when enabled in the scraper configuration; if disabled, it is skipped during input validation.
    • param2: optional String
      Second scraper parameter. Same rules apply.
    • param3: optional String
      Third scraper parameter. Same rules apply.
    • param4: optional String
      Fourth scraper parameter. Same rules apply.
    • param5: optional String
      Fifth scraper parameter. Same rules apply.
    • paramN (6 ≤ N ≤ 10): optional String
      Additional parameter slots used only by certain scrapers. These keys are not labelled and appear in param_info as-is (e.g. param6).

Response Fields

  • result: String
    Request outcome.
    Allowed success, error
  • version: String
    API version.
    Example v2
  • collect_info: Array<Object>
    Array of per-entry collection results, in the same order as the input schedules.
    • schedule_result_id: Integer
      ID of the dataset created by this entry. Use it as input to subsequent status/result lookups.
    • schedule_id: String
      Scraper ID echoed from the input entry.
    • param_info: Object
      Parameters used for this collection. For param1~param5, keys include the parameter labels (e.g. param1(keyword)). When the scraper has no label configured, the label slot may be empty (param1()) or a placeholder (param1(param1)). For param6~param10, keys are exposed without labels.
  • elapsed_time: Float
    Server-side processing time (seconds, as a numeric value).
    Example 0.7843

Error Responses

  • schedules missing
    Required parameter schedules was not provided.
    {
      "result": "error",
      "version": "v2",
      "message": "`schedules` parameter is required"
    }
  • Invalid schedules format
    schedules is not an array. The response uses the error_message key.
    {
      "result": "error",
      "version": "v2",
      "error_message": "Array 형식의 데이터를 입력해주세요. schedules: ...(data_type: ...)"
    }
  • Schedule not found
    One of the schedule_id values in schedules does not match any scraper, or it is not accessible. The message includes that schedule_id.
    {
      "result": "error",
      "version": "v2",
      "message": "schedule(id: YOUR_SCHEDULE_ID) not found"
    }
  • Required params missing
    One of the schedules entries is missing a required param1~param5 that the scraper has marked as enabled. The message includes the schedule_id and the missing parameters.
    {
      "result": "error",
      "version": "v2",
      "message": "[ID: YOUR_SCHEDULE_ID] 사용되는 파라미터를 모두 입력해주세요. 사용되는 파라미터: [\"param1(검색어)\"]"
    }
  • Service ticket expired
    The service ticket has expired, so the request was rejected. The response uses the error_message key.
    {
      "result": "error",
      "version": "v2",
      "error_message": "서비스 이용권의 기간이 만료되었습니다."
    }
  • Credit exhausted
    Available credits are exhausted, so the request was rejected. The response uses the error_message key.
    {
      "result": "error",
      "version": "v2",
      "error_message": "보유하신 크레딧을 모두 사용하셨습니다."
    }
  • Schedule execution blocked
    One of the entries cannot start due to the service ticket or credit state. The message includes the reason and the schedule_id; possible reasons are No active service ticket, Credit exhausted, Service ticket expired, and Invalid service ticket.
    {
      "result": "error",
      "version": "v2",
      "message": "Schedule execution blocked: ... (schedule_id: YOUR_SCHEDULE_ID)"
    }

Related Guides

Example Request
  • cURL
  • Ruby
  • Python
  • NodeJS
  • PHP
  • Java
Example Response 200
{
  "result": "success",
  "version": "v2",
  "collect_info": [
    {
      "schedule_result_id": 13229289,
      "schedule_id": "사람인_채용공고_수집_1697441449957",
      "param_info": {
        "param1(검색할 키워드)": "검색어A"
      }
    },
    {
      "schedule_result_id": 13229290,
      "schedule_id": "네이버_뉴스_수집_1687856320079",
      "param_info": {
        "param1(검색할 키워드)": "검색어B"
      }
    }
  ],
  "elapsed_time": 0.7843
}