facundoolano / aso

Tools for app store optimization on iTunes and Google Play
MIT License
720 stars 144 forks source link

[App Store] Search suggestion always returns empty array #26

Open melihmucuk opened 5 years ago

melihmucuk commented 5 years ago

Hi, First, thanks for awesome library! I tested search suggestion with your sample code but it always returns an empty array.

const itunes = require("aso")("itunes", { country: "us" });
itunes
  .suggest({
    strategy: itunes.SEARCH,
    keywords: ["panda"],
    num: 10
  })
  .then(console.log);
melihmucuk commented 5 years ago

I did a research on this. So basically, base url should be changed with below:

const BASE_URL =
  "https://search.itunes.apple.com/WebObjects/MZSearchHints.woa/wa/hints?clientApplication=Software&term=";

and

Headers should be contain for example us;

"X-Apple-Store-Front": "143441-1,29"

@facundoolano

elanosilveira commented 5 years ago

Hi @melihmucuk,

Is it still working for you?