데이터셋
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 |
페이지 번호 | |
sorting |
정렬 옵션("asc"(기본값) 또는 "desc") |
샘플코드
- cURL
- Ruby
- Python
- NodeJS
- PHP
- Java
curl -X POST \
--header "Content-Type: application/json; version=2" \
--data '{
"api_key": "YOUR_API_KEY",
"schedule_id": "YOUR_SCHEDULE_ID",
"page": "1",
"sorting": "desc"
}' \
'api.hashscraper.com/api/get_schedule_results'
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',
sorting: 'desc'
}.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'
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',
'sorting': 'desc'
}
response = requests.post(url, headers=headers, json=data)
print(response.text)
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,
sorting: "desc"
};
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';
$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',
'sorting' => 'desc'
);
$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 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");
jsonRequest.put("sorting", "desc");
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,
"dataset": [
{
"schedule_result_id": 13224553,
"sr_status": "finish",
"created_at": "2023-10-18T16:20:01.000+09:00",
"data_count": 10,
"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",
"data_count": 10,
"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",
"data_count": 10,
"sum_point": -500.0,
"param_info": {
"param1(검색할 키워드)": "마케터",
"param2(최대 수집 개수)": "10"
},
"no_result": false,
"union": false
}
]
}