크롤링 봇

URL
api.hashscraper.com/api/get_schedules
요청방식
POST
Port
80
Status
ACTIVE

Header

Key Required Value
Content-Type 필수 application/json; version=2

Parameter

Key Required Description
api_key 필수 해시스크래퍼 API 키 (API키는 오른쪽 위 프로필을 누르신후 내 정보에 가시면 얻을수 있습니다.)
page 페이지 번호
category 카테고리 번호 입력 ( 카테고리 보기 )
keyword 봇 이름 검색어 입력

샘플코드

  • cURL
  • Ruby
  • Python
  • NodeJS
  • PHP
  • Java
curl -X POST \
  --header "Content-Type: application/json; version=2" \
  --data '{
    "api_key": "YOUR_API_KEY",
    "page": "1"
  }' \
  'api.hashscraper.com/api/get_schedules'

              
begin
  api_key = 'YOUR_API_KEY'

  host = 'api.hashscraper.com'
  port = '80'
  path = "/api/get_schedules"

  request = Net::HTTP::Post.new(path)

  request['Content-Type'] = 'application/json; version=2'
  request.body = {
    api_key: api_key,
    page: '1'
  }.to_json

  response = Net::HTTP.start(host, port) do |http|
    http.request(request)
  end

  puts response.body
rescue => e
  puts e
end

            
import requests
import json

api_key = 'YOUR_API_KEY'

url = 'http://api.hashscraper.com/api/get_schedules'

headers = {
  'Content-Type': 'application/json; version=2'
}

data = {
  'api_key': api_key,
  'page': '1'
}

response = requests.post(url, headers=headers, json=data)

print(response.text)

            
const api_key = 'YOUR_API_KEY';

const host = "api.hashscraper.com";
const port = 80;
const path = "/api/get_schedules";

const requestData = {
  api_key: api_key,
  page: "1",
};

const requestOptions = {
  method: "POST",
  headers: {
    "Content-Type": "application/json; version=2",
  },
  body: JSON.stringify(requestData),
};

async function makeRequest() {
  try {
    const response = await fetch(
      `http://${host}:${port}${path}`,
      requestOptions
    );
    const data = await response.json();
    console.log(data);
  } catch (error) {
    console.error(error.message);
  }
}

makeRequest();

            
<?php

$api_key = 'YOUR_API_KEY';

$host = 'api.hashscraper.com';
$port = '80';
$path = '/api/get_schedules';

$url = 'http://' . $host . ':' . $port . $path;
$user_agent = "MyApp/1.0"; // 원하는 User-Agent 값을 여기에 설정하세요

$headers = array(
    'Content-Type: application/json; version=2',
    "User-Agent: $user_agent"

);

$data = array(
    'api_key' => $api_key,
    'page' => '1',
);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);
if($response === false) {
    die('Error: ' . curl_error($ch));
}

curl_close($ch);

echo $response;

            
import org.json.JSONObject;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;

public class Main {

    public static void main(String[] args) {
        String apiKey = 'YOUR_API_KEY';
        String host = "api.hashscraper.com";
        String port = "80";
        String path = "/api/get_schedules";

        try {
            URL url = new URL("http://" + host + ":" + port + path);
            HttpURLConnection connection = (HttpURLConnection) url.openConnection();
            connection.setRequestMethod("POST");
            connection.setRequestProperty("Content-Type", "application/json; version=2");
            connection.setDoOutput(true);

            JSONObject jsonRequest = new JSONObject();
            jsonRequest.put("api_key", apiKey);
            jsonRequest.put("page", "1");

            OutputStreamWriter out = new OutputStreamWriter(connection.getOutputStream());
            out.write(jsonRequest.toString());
            out.flush();
            out.close();

            int responseCode = connection.getResponseCode();
            StringBuilder response = new StringBuilder();
            if (responseCode == HttpURLConnection.HTTP_OK) {
                BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
                String inputLine;
                while ((inputLine = in.readLine()) != null) {
                    response.append(inputLine);
                }
                in.close();
            }

            System.out.println(response.toString());

        } catch (Exception e) {
            System.out.println(e.getMessage());
        }
    }
}

            

API 응답 샘플

{
  "result": "success",
  "version": "v2",
  "current_page": 1,
  "total_page": 1,
  "schedules": [
    {
      "name": "잡코리아 채용정보 수집",
      "point": 50.0,
      "update_at": "2023-10-13",
      "version": 1.15,
      "category": 6,
      "schedule_id": "잡코리아 채용정보 수집_1697187514090",
      "param_info": {
        "param1(검색키워드)": "1",
        "param2(최대수집개수)": "2"
      },
      "period": "manual",
      "union": false,
      "description": null
    },
    {
      "name": "사람인 채용공고 수집",
      "point": 50.0,
      "update_at": "2023-10-16",
      "version": 0.3,
      "category": 6,
      "schedule_id": "사람인 채용공고 수집_1697441449957",
      "param_info": {
        "param1(검색할 키워드)": "개발자",
        "param2(최대 수집 개수)": "2"
      },
      "period": "manual",
      "union": false,
      "description": null
    }
  ]
}