• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Not getting news

Scheduled Pinned Locked Moved Utilities
2 Posts 2 Posters 288 Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    WilliamF
    last edited by Dec 20, 2023, 11:00 AM

    Re: MMM-NewsAPI

    Hello, I’m trying to get Swedish news on the magic mirror.
    But all the articles are 1 day old. When I increase the page size I get more news, but all of them are still 1 day old.

    I can also only get two news sites to work and not specified news so I get all categories from sport to economics.
    I would like to limit it to just Global News and International news.

    I can also not specify either country or language, When I tried to change news to se it didnt work, so I changed it to us stil no luck. After that I just added a bunch of english news sites like bbc and cnn. But when I changed the language to en I got 0 news

    Best Regards
    William.

    M 1 Reply Last reply Dec 20, 2023, 1:44 PM Reply Quote 0
    • M Offline
      MMRIZE @WilliamF
      last edited by MMRIZE Dec 20, 2023, 1:45 PM Dec 20, 2023, 1:44 PM

      @WilliamF
      The free tier of NewsAPI provides only 1-day later news. When you want realtime news, you should pay.

      If you set config valuechoice: "headlines", you can use category, but;

      • Only available categories; business, entertainment, general, health, science, sports, technology.
      • It cannot be used mixed with sources.

      For the specified country or language, you can test it by yourself.
      You can open the browser and navigate this. (Replace API_KEY to yours. You can get your API_KEY on newspai.org site after login)

      • headlines;
      https://newsapi.org/v2/top-headlines?country=se&apiKey=API_KEY
      

      5d0630b3-b72a-48cb-bb1c-18568718cc79-image.png

      • everything;
      https://newsapi.org/v2/everything?language=en&q=apple&apiKey=API_KEY
      

      c66d9db4-b8ff-41b4-90c6-4b5a2d8aa183-image.png
      But the API doesn’t support se language.
      ba857ec9-b7fc-41b9-8bc7-fcb9c274052e-image.png

      For the usage of country, everything endpoint doesn’t support country options. Only the headlines endpoint supports it. But you should know this; country: "se" doesn’t mean “News from Swedish Press”, but rather similar to “Popular news in Sweden” or “news consumed commonly in/about Sweden”.

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      1 / 1
      • First post
        1/2
        Last post
      Enjoying MagicMirror? Please consider a donation!
      MagicMirror created by Michael Teeuw.
      Forum managed by Sam, technical setup by Karsten.
      This forum is using NodeBB as its core | Contributors
      Contact | Privacy Policy