---
# System prepended metadata

title: Untitled

---

## 爬蟲系統


---
Base URL: https://crawlpanel.azurewebsites.net/BulkSearch
使用說明:




## 1.新增
[https://crawlpanel.azurewebsites.net/BulkSearch/InsertJobData](https://crawlpanel.azurewebsites.net/BulkSearch/InsertJobData)
#### header:
| key |value | 
| -------- | -------- | 
| Content-Type     | application/json     |
#### body:

| column |type | required| description|
| - | - | - |  - | 
| jobUrl| sting| V| 目標url|
| topN| int||取最前面的N筆(預設3)|
| type| sting|V|工作型態|

#### response :
| column |type | description|
| - | - |  - | 
| success| bool| 是否新增成功|
| data| sting|Job seq|
| returnMsg| sting|回傳訊息|
#### sample:
request:
```
{
  "jobUrl": "https://www.momoshop.com.tw/search/searchShop.jsp?keyword=%E6%94%B6%E7%B4%8D%E6%AB%83&searchType=1&cateLevel=0&cateCode=&curPage=1&_isFuzzy=0&showType=chessboardType",
  "type": "MOMOSHOP-SEARCH"
}
```
response:
```
{
  "success": true,
  "data": "20201126030533222001",
  "returnMsg": "新增成功"
}
```

## 2.查詢Job狀態


[https://crawlpanel.azurewebsites.net/BulkSearch/SearchJobStatus](https://crawlpanel.azurewebsites.net/BulkSearch/SearchJobStatus)
#### header:
| key |value | 
| -------- | -------- | 
| Content-Type     | application/json     |
#### body:

| column |type | required| description|
| - | - | - |  - | 
| seq| sting| V| Job seq|
| type| sting|V |工作型態|

#### response :
| column |type | description|
| - | - |  - | 
| success| bool| 是否成功 |
| data|SearchStatus| 查詢Job狀態 |
| returnMsg| sting | 回傳訊息  |

SearchStatus
| column |type | description|
| - | - |  - | 
| end| int| 完成的Job數量 |
| all|int|所有Job數量 |
| seq|List<string>|所有衍伸的ID代碼 |

#### sample:
request:
```
{
  "seq": "20201126150242425873",
  "type": "FAMICLOUD-FCATEGORY"
}
```
response:
```
{
    "success": true,
    "data": {
        "end": 0,
        "all": 0,
        "seq": []
    },
    "returnMsg": "查詢狀態成功"
}
```

## 3.查詢Job資料


[https://crawlpanel.azurewebsites.net/BulkSearch/SearchJobData](https://crawlpanel.azurewebsites.net/BulkSearch/SearchJobData)
#### header:
| key |value | 
| -------- | -------- | 
| Content-Type     | application/json     |
#### body:

| column |type | required| description|
| - | - | - |  - | 
| seq| sting| V| Job seq|
| type| sting| V|工作型態|
| count| int| |每頁的量 (預設100)|
| page| int| |第幾頁(預設1)|

#### response :
| column |type | description|
| - | - |  - | 
| success| bool| 是否成功 |
| data| List< string > | 查詢資料 (Json)|
| returnMsg| sting | 回傳訊息  |
#### sample:
request:
```
{
  "seq": "20201126034758895801",
  "type": "FAMICLOUD-FCATEGORY"
  "count": 14,
  "page": 5
}
```
response:
```
{
    "success": true,
    "data": [],
    "returnMsg": "查詢資料成功"
}
```


## 工作型態

| 目前存在的 | 敘述 | 
| -------- | -------- |
| MOMOSHOP-PRODUCT| MOMO-商品| 
|MOMOSHOP-DGRPCATEGORY    |MOMO-第三層分類|
|MOMOSHOP-LGRPCATEGORY    |MOMO-第二層分類|
|MOMOSHOP-STORE           |MOMO-第一層分類|
|MOMOSHOP-SEARCH          |MOMO-查詢|
|PCHOME24H-PRODUCT        |Pchome-商品|
|PCHOME24H-REGION         |Pchome-第一層分類|
|PCHOME24H-STORE          |Pchome-第一層分類|
|PCHOME24H-SIGN           |Pchome-第一層分類|
|PCHOME24H-SEARCH         |Pchome-查詢|
|PCHOMEMALL-PRODUCT       |PCHOMEMALL-商品|
|PCHOMESTORE-PRODUCT      |PCHOMESTORE-商品|
|YAHOOMALL-PRODUCT        |YAHOOMALL-商品|
|YAHOOMALL-STORE          |YAHOOMALL-第一層分類|
|YAHOOMALL-SEARCH         |YAHOOMALL-查詢|
|YAHOOBUY-PRODUCT         |YAHOOBUY-商品|
|YAHOOBUY-CATEGORY        |YAHOOBUY-第一層分類|
|ETMALL-PRODUCT           |ETMALL-商品|
|RAKUTEN-PRODUCT          |樂天-商品|
|RAKUTEN-CATEGORY         |樂天-第二層分類|
|RAKUTEN-STORE            |樂天-第一層分類|
|RAKUTEN-SEARCH           |樂天-查詢|
|KINGSTONE-PRODUCT        |金石堂-商品|
|SHOPEE24H-PRODUCT        |蝦皮-商品|
|SHOPEE24H-STORE          |蝦皮-第一層分類|
|SHOPEEMALL-PRODUCT       |蝦皮-商品|
|SHOPEEMALL-STORE         |蝦皮-第一層分類|
|SHOPEE-PRODUCT           |蝦皮-商品|
|SHOPEE-STORE             |蝦皮-第一層分類|
|TAOBAOTW-PRODUCT         |掏保台灣(已下)|
|PCONE-PRODUCT            ||
|BOOKS-PRODUCT            |博客來-商品|
|BOOKS-SCATEGORY          |博客來-第四層分類|
|BOOKS-MCATEGORY          |博客來-第三層分類|
|BOOKS-LCATEGORY          |博客來-第二層分類|
|BOOKS-STORE              |博客來-第一層分類|
|BOOKS-SEARCH             |博客來-查詢|
|HAPPYSHOPPING-PRODUCT    |熊媽媽-商品|
|HAPPYSHOPPING-SCATEGORY  |熊媽媽-第二層分類|
|HAPPYSHOPPING-MCATEGORY  |熊媽媽-第一層分類|
|IFRESH-PRODUCT           |愛上新鮮-商品|
|IFRESH-MCATEGORY         |愛上新鮮-第一層分類|
|BUY123-PRODUCT           |生活市集-商品|
|BUY123-CATEGORY          |生活市集-第一層分類|
|ANYONGFRESH-PRODUCT      |安永-商品|
|ANYONGFRESH-SCATEGORY    |安永-第一層分類|
|FAMICLOUD-PRODUCT        |鮮食家-商品|
|FAMICLOUD-SCATEGORY      |鮮食家-第二層分類|
|FAMICLOUD-FCATEGORY      |鮮食家-第一層分類|
|GREENSAFE-SUBCATEGORY    |永豐餘生技|
|GREENSAFE-MAINCATEGORY   |永豐餘生技|
|CARREFOUR-PRODUCT        |家樂福-商品|
|CARREFOUR-FCATEGORY      |家樂福-第一層分類|
|CARREFOUR-SCATEGORY      |家樂福-第二層分類|
|PXGO-PRODUCT             |全聯-商品|
|PXGO-CATEGORY            |全聯-分類|
