Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search; Country code not being applied. #700

Open
nikhil3113 opened this issue Dec 17, 2024 · 0 comments
Open

Search; Country code not being applied. #700

nikhil3113 opened this issue Dec 17, 2024 · 0 comments

Comments

@nikhil3113
Copy link

  • Operating System: Windows 11
  • Node version: 20.17.0
  • google-play-scraper version: ^10.0.1

Description:

Added country code in my express app, but on testing in postman getting default country ("us") results.

Example code:

let gplay;

(async () => {
  gplay = await import("google-play-scraper");
})();


const search = async (req, res) => {
  try {
    const keyword = req.query.keyword;

    if (!keyword) {
      return res.status(400).json({
        message: "Query and appId are required",
      });
    }

    const result = await gplay.default.search({
      term: "loan",
      lang: "en",
      country: "in",
    });

    return res.status(200).json({
      success: true,
      data: result,
    });
  } catch (error) {
    console.log(error);
    return res.status(500).json({
      message: "Server Error",
    });
  }
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant