Request a Data Collection V2

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

Trigger a new data collection job on a given scraper.

Creates a new dataset immediately and starts collection in the background. Use the returned schedule_result_id to query progress and results later.

You must supply every param1~param5 that is enabled in the scraper's parameter configuration; disabled ones are ignored. Use get_param_info to check which parameters are required.

The param1~param5 values you send are not only used for this run — they are also persisted on the scraper itself and become the defaults for the next execution. Any parameter not included in the request 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.

Request Parameters

  • api_key: String
    HashScraper API key
    Example YOUR_API_KEY
  • schedule_id: String
    ID of the scraper to run.
    Example YOUR_SCHEDULE_ID
  • param1: optional String
    First scraper parameter. Required if enabled in the scraper configuration; if disabled, it is skipped during input validation. Any value you send is still echoed back in param_info and persisted on the scraper.
  • 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: Object
    Details about the triggered collection job.
    • schedule_result_id: Integer
      ID of the dataset created by this request. Use it as input to subsequent status/result lookups.
    • schedule_id: String
      Scraper ID echoed from the request.
    • param_info: Object
      Parameters used for this collection. For param1~param5, keys include the scraper's parameter labels (e.g. param1(keyword)).
  • elapsed_time: Float
    Server-side processing time (seconds, as a numeric value).
    Example 0.6725

Error Responses

  • schedule_id missing
    Required parameter schedule_id was not provided.
    {
      "result": "error",
      "version": "v2",
      "message": "`schedule_id` parameter is required"
    }
  • Schedule not found
    No scraper matches the provided schedule_id, or it is not accessible.
    {
      "result": "error",
      "version": "v2",
      "message": "schedule(id: YOUR_SCHEDULE_ID) not found"
    }
  • Required params missing
    One or more param1~param5 values that are enabled in the scraper configuration are empty. The message lists the missing parameters.
    {
      "result": "error",
      "version": "v2",
      "message": "사용되는 파라미터를 모두 입력해주세요. 사용되는 파라미터: [\"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
    The collection cannot start due to the service ticket or credit state. The message includes a specific reason; possible values are No active service ticket, Credit exhausted, Service ticket expired, and Invalid service ticket.
    {
      "result": "error",
      "version": "v2",
      "message": "Schedule execution blocked: ..."
    }

Related Guides

Example Request
  • cURL
  • Ruby
  • Python
  • NodeJS
  • PHP
  • Java
Optional parameters
Example Response 200
{
  "result": "success",
  "version": "v2",
  "collect_info": {
    "schedule_result_id": 13229287,
    "schedule_id": "사람인_채용공고_수집_1697441449957",
    "param_info": {
      "param1(검색할 키워드)": "개발자",
      "param2(최대 수집 개수)": "10"
    }
  },
  "elapsed_time": 0.6725
}