데이터셋

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

Header

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

Parameter

Key Required Description
api_key 필수 해시스크래퍼 API 키 (API키는 오른쪽 위 프로필을 누르신후 내 정보에 가시면 얻을수 있습니다.)
schedule_id 필수 Schedule Id
page 페이지 번호

cURL 샘플코드

curl -X POST \
  --header "Content-Type: application/json; version=2" \
  --data '{
    "api_key": "YOUR_API_KEY",
    "schedule_id": "YOUR_SCHEDULE_ID",
    "page": "1"
  }' \
  'api.hashscraper.com/api/get_schedule_results'

              

Ruby 샘플코드


begin
  api_key = 'YOUR_API_KEY'
  schedule_id = 'YOUR_SCHEDULE_ID'

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

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

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

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

  puts response.body
rescue => e
  puts e
end

            

Python 샘플코드

import requests
import json

api_key = 'YOUR_API_KEY'
schedule_id = 'YOUR_SCHEDULE_ID'
url = 'http://api.hashscraper.com/api/get_schedule_results'

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

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

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

print(response.text)

            

NodeJS 샘플코드

const api_key = 'YOUR_API_KEY';
const schedule_id = 'YOUR_SCHEDULE_ID';

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

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

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 샘플코드

<?php

$api_key = 'YOUR_API_KEY';
$schedule_id = 'YOUR_SCHEDULE_ID';

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

$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,
    'schedule_id' => $schedule_id,
    '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;


            

Java 샘플코드

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 scheduleId = 'YOUR_SCHEDULE_ID';
        String host = "api.hashscraper.com";
        String port = "80";
        String path = "/api/get_schedule_results";

        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("schedule_id", scheduleId);
            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());
        }
    }
}

            

응답 JSON

{
    "result": "success",
    "version": "v2",
    "current_page": 1,
    "total_page": 1,
    "dataset": [
      {
        "schedule_result_id": 13224553,
        "sr_status": "finish",
        "created_at": "2023-10-18T16:20:01.000+09:00",
        "sum_point": -500.0,
        "param_info": {
          "param1(검색할 키워드)": "개발자",
          "param2(최대 수집 개수)": "10"
        },
        "no_result": false,
        "union": false
      },
      {
        "schedule_result_id": 13224560,
        "sr_status": "finish",
        "created_at": "2023-10-18T16:52:32.000+09:00",
        "sum_point": -500.0,
        "param_info": {
          "param1(검색할 키워드)": "디자이너",
          "param2(최대 수집 개수)": "10"
        },
        "no_result": false,
        "union": false
      },
      {
        "schedule_result_id": 13224674,
        "sr_status": "finish",
        "created_at": "2023-10-18T17:20:29.000+09:00",
        "sum_point": -500.0,
        "param_info": {
          "param1(검색할 키워드)": "마케터",
          "param2(최대 수집 개수)": "10"
        },
        "no_result": false,
        "union": false
      }
    ]
  }