I am working with an API for the very first time with Python and while doing so I got the following Error:
ValueError: cannot mix country/category param with sources param.
What should I do to solve this Error?
This is the code:
import config
from newsapi import NewsApiClient
newsapi = NewsApiClient(api_key=config.api_key)
top_headlines = newsapi.get_top_headlines(q='Neuralink',sources='the-verge',category='technology',language='en',country='us')```
According to the official "NewsAPI" {https://newsapi.org/docs/endpoints/top-headlines} top-headlines docs, "country" and "category" can not be used simultaneously with "sources" param.