app.js 843 Bytes
const express = require("express");
const app = express();
const bodyParser = require('body-parser');
const request = require("request");
const router = express.Router();

let kakaoOptions = {
    url : "https://dapi.kakao.com/v2/local/search/keyword",
    method : "GET",
    headers : {
        'Authorization': 'KakaoAK 56e51abe725086bc9db03da986e47fed'
    },
    qs: {
        'query': 'CGV 광명',
        //'category_group_code' : 'CT1',
        'size' : 5
    },
    encoding : 'UTF-8'
}

request(kakaoOptions, function (err, res, body) {
    theater_list = JSON.parse(body).documents;
    if(!err && res.statusCode == 200){
        theater_list.forEach(info => {
            if(info.category_name.endsWith("CJCGV"))
                console.log(info.place_name + " : " + info.place_url);
        });
    }
})

module.exports = router;