The world of cryptocurrency is a dynamic landscape, with developments and trends that shift at lightning speed. In this article, we’ll delve into the significance of the “Crypto News” endpoint, its features, and how it empowers you to stay up-to-date with the ever-evolving world of cryptocurrency.
How to Utilize Crypto Endpoint
The “Crypto” news endpoint offered by Newsdata.io is a specialized feature designed to deliver real-time news articles exclusively related to cryptocurrencies and blockchain technology. This endpoint provides a curated stream of crypto-focused news articles, Including the launch of a new token, regulatory developments, or market trends.
You can access the “Crypto” news endpoint by following the given steps:
1. Construct Your Request
The foremost step towards retrieval of crypto-related articles is constructing an API request using the “Crypto” news endpoint.
https://newsdata.io/api/1/crypto?apikey=pub_YOUR_API_KEY
2. Authentication
Moving forward, you need to make sure to include your API key in the request to authenticate your access to the “Crypto” news endpoint.
3. Add Filters
You can construct your request by including filters such as keywords, sources, and languages. This ensures that the fetched articles align with your specifications.
You can also include parameters like q, coin, timeframe, etc. in your request to ensure efficient data extraction.
4. Receive and Process
Upon making the request, you’ll receive a JSON response containing a curated list of crypto news articles. Each article’s details include its title, source, publication date, URL, and more.
Request Parameter of Crypto News Endpoints
1. id
Search specific news articles related to crypto using a unique “article_id” string assigned to each article. You can include up to 50 such ‘article_id’ strings in a single query.
For better understanding, below are some examples.
- If you want to fetch only a single article with the specified ‘article_id’,
https://newsdata.io/api/1/crypto?apikey=pub_YOUR_API_KEY&id=79266bfa1d4d0411da6738b22cfd40b7
- If you want to fetch several articles with individual specified ‘article_id’,
https://newsdata.io/api/1/crypto?apikey=pub_YOUR_API_KEY&id=79266bfa1d4d0411da6738b22cfd40b7,518d04b61fe9fa6bf7af4a14df5b2422,bd09c2c39bf6d63f7c3ec22bbf4aa2e9
2. Coin
Search for news articles related to specific crypto coins using their short forms. You can include up to 5 such crypto coin short forms in a single query.
For example, ‘coin=btc’, where btc means Bitcoin.
For better understanding, below are some examples.
- If you want to fetch news articles related to Bitcoin,
https://newsdata.io/api/1/crypto?apikey=pub_YOUR_API_KEY&coin=btc
- If you want to fetch news articles related to Ethereum and Bitcoin,
https://newsdata.io/api/1/crypto?apikey=pub_YOUR_API_KEY&coin=eth,btc
3. q
Search news articles with specific keywords anywhere presented in the entire article.
For example, ‘q=bitcoin’, will show all the relevant articles that contain the keyword Bitcoin.
https://newsdata.io/api/1/crypto?apikey=pub_YOUR_API_KEY&q=Bitcoin
This will fetch all the relevant articles that contain the keyword ‘Bitcoin’ mentioned anywhere throughout the content. Similarly, you can add various queries and fetch your data.
4. qInTitle
Search news articles with specific keywords or phrases present in the news titles only.
For example, ‘qInTitle=Bitcoin’, will show all the relevant articles that contain Bitcoin in the news title.
https://newsdata.io/api/1/crypto?apikey=pub_YOUR_API_KEY&qInTitle=Bitcoin
This request will fetch all the related articles that contain the keyword “Bitcoin” in the article’s title only.
5. qInMeta
Search the news articles with the specified keyword/phrases in the URL,meta description, and title by using this parameter.
https://newsdata.io/api/1/crypto?apikey=pub_YOUR_API_KEY&qInMeta=bitcoin
6. timeframe
Search articles from a specific timeline by adding a timeframe parameter to your request.
- The timeframe can be set between 1 and 48 hours.
- The timeframe can also be set in a minute range, which is 1–2880 minutes.
NOTE: You can only use one parameter at a time.
For a better understanding, below are some examples.
- If you set the ‘timeframe=6’, it will fetch articles from the past 6 hours.
https://newsdata.io/api/1/crypto?apikey=pub_YOUR_API_KEY&q=bitcoin&timeframe=6
This parameter will fetch all the articles related to ‘Bitcoin’ for the past 6 hours.
- If you set the ‘timeframe=6’, it will fetch articles from the past 6 hours.
- If you set the ‘timeframe=420m’, it will fetch articles from the past 420 minutes.
https://newsdata.io/api/1/crypto?apikey=pub_YOUR_API_KEY&q=bitcoin&timeframe=420m
This parameter will fetch all the relevant articles with a query ‘Bitcoin’ from the past 420 minutes.
7. Language
Search the news articles for a specific language. You can add up to 5 languages in a single query. Check the codes for all the languages here.
For example, ‘language=fr’, where fr means French, will fetch you relevant articles in French.
For better understanding, below are some examples.
- If you set ‘language=fr’, it will fetch all relevant articles in French.
https://newsdata.io/api/1/crypto?apikey=pub_YOUR_API_KEY&q=Bitcoin&language=fr
- If you set ‘language=en,fr’, it will fetch relevant articles in English and French.
https://newsdata.io/api/1/crypto?apikey=pub_YOUR_API_KEY&q=Bitcoin&language=en,fr
- If you set ‘language=fr’, it will fetch all relevant articles in French.
NOTE: To fetch articles in different languages, you can add the language code mentioned in the documentation page.
8. Tag
Search the news articles for a specific crypto-AI classified tags. You can add up to 5 tags in a single query. Check the codes for all the AI tags here.
For example, ‘tag=blockchain’, will fetch you relevant articles with blockchain tag.
For better understanding, here is an example.
If you set ‘tag=blockchain’, it will fetch all relevant articles with ‘blockchain’ tag.
https://newsdata.io/api/1/crypto?apikey=pub_YOUR_API_KEY&q=Bitcoin&tag=blockchain
NOTE: To fetch articles in different languages, you can add the language code mentioned in the documentation page.
9. domain
Search the news articles of specific news domains, such as the BBC or the New York Times. You can add up to 5 domains in a single query. You can check the domain names here.
The request parameter would be ‘domain=coindesk‘.
For better understanding, here are some examples.
- If you set ‘domain=invezz’, it will fetch you relevant articles from the Invezz domain.
https://newsdata.io/api/1/crypto?apikey=pub_YOUR_API_KEY&q=bitcoin&domain=invezz
- If you set ‘domain=coindesk’, it will fetch you all relevant articles from the Coin Desk domain.
https://newsdata.io/api/1/crypto?apikey=pub_YOUR_API_KEY&q=bitcoin&domain=coindesk
- If you set ‘domain=invezz’, it will fetch you relevant articles from the Invezz domain.
NOTE: This parameter is currently being merged with the domainurl parameter.
10. domainurl
Search for relevant articles from the news domains. You can include up to 5 domain URLs in a single query.
The request parameter would be ‘domainurl=coindesk.com’.
For better understanding, below are some examples.
- If you set ‘domainurl=invezz.com’, it will fetch articles from the specified domain.
https://newsdata.io/api/1/crypto?apikey=pub_YOUR_API_KEY&q=bitcoin&domainurl=invezz.com
- If you set ‘domainurl=coindesk.com,invezz.com’, it will fetch articles from the specified domains.
https://newsdata.io/api/1/crypto?apikey=pub_YOUR_API_KEY&q=bitcoin&domainurl=coindesk.com,invezz.com
NOTE: If you enter the wrong domainurl, the system will show error and the correct domainurl(s) will be shown in the suggestions below. From there you can choose the correct domainurl(s) and continue fetching your results.
11. excludedomain
You can exclude the domains or news sources you don’t want articles from. You can exclude up to domains/news sources.
The request parameter would be ‘excludedomain=nytimes.com’.
For a better understanding, below are some examples.
- If you set ‘excludedomain=invezz.com’, you will get relevant articles excluding articles from Invezz.com.
https://newsdata.io/api/1/crypto?apikey=pub_YOUR_API_KEY&q=bitcoin&excludedomain=invezz.com
- If you set ‘excludedomain=invezz.com’, you will get relevant articles excluding articles from Invezz.com.
- If you set ‘excludedomain=invezz.com,coindesk.com’, you will get articles except from Invezz.com and coindesk.com.
https://newsdata.io/api/1/crypto?apikey=pub_YOUR_API_KEY&q=bitcoin&excludedomain=invezz.com,coindesk.com
- If you set ‘excludedomain=invezz.com,coindesk.com’, you will get articles except from Invezz.com and coindesk.com.
13. Excludefield
You can exclude the response object field you don’t want to be fetched regarding news articles, using this parameter.
For example, ‘excludefield=pubdate’
The given request would fetch the articles that doesn’t contain the ‘Publish Date’ field of response objects.
https://newsdata.io/api/1/crypto?apikey=YOUR_API_KEY&q=games&excludefield=pubdate
14. prioritydomain
Domain priority allows the users to extract news articles based on the domain authority of news sources.
The priority is set on 3 different levels which are top, middle, and low.
- Top: Fetches news articles from the top 10% of the news domains. The request parameter is ‘prioritydomain=top’.
https://newsdata.io/api/1/crypto?apikey=pub_YOUR_API_KEY&q=DOGE&prioritydomain=top
- Medium: Fetches news articles from the top 30% of the news domains. The request parameter is ‘prioritydomain=medium’.
https://newsdata.io/api/1/crypto?apikey=pub_YOUR_API_KEY&q=DOGE&prioritydomain=medium
- Low: Fetches news articles from the top 50% of the news domains. The request parameter is ‘prioritydomain=low’.
https://newsdata.io/api/1/crypto?apikey=pub_YOUR_API_KEY&q=DOGE&prioritydomain=low
15. timezone
Search the articles on the basis of specific time zones. You can add any specific time zone by checking the time zone.
The request parameter for the time zone would be ‘timezone=America/New_York’.
For Example,
- If you set ‘timezone=Asia/Dubai’, you will fetch relevant articles from the specified timezone.
https://newsdata.io/api/1/crypto?apikey=pub_YOUR_API_KEY&q=Bitcoin&timezone=Asia/Dubai
16. Full Content
You can request a full-content article or without a full-content article using this parameter.
The request parameter of this would be ‘full_content=1’ for full content and ‘full_content=0‘, which doesn’t contain full-width content.
- For Full Content
https://newsdata.io/api/1/crypto?apikey=pub_YOUR_API_KEY&q=Solana&full_content=1
- Without full content
https://newsdata.io/api/1/crypto?apikey=pub_YOUR_API_KEY&q=Solana&full _content=0
17. Image
Search the articles with or without featured images using this parameter.
The request parameter for this would be ‘image=1’ to have the articles with images and ‘image=0’ for those articles without featured images.
- For articles with featured images
https://newsdata.io/api/1/crypto?apikey=pub_YOUR_API_KEY&q=Solana&image=1
- For articles without featured images
https://newsdata.io/api/1/crypto?apikey=pub_YOUR_API_KEY&q=Solana&image=0
18. Video
This parameter would help users retrieve videos containing articles. The request parameter would be ‘video=1’ for articles with video and ‘video=0’ for those articles without video.
- For articles with video
https://newsdata.io/api/1/crypto?apikey=pub_YOUR_API_KEY&q=Ripple&video=1
- For articles without video
https://newsdata.io/api/1/crypto?apikey=pub_YOUR_API_KEY&q=Ripple&video=0
20. Size
This parameter allows the users to customize the number of articles that they can obtain per API request.
For free users, the maximum limit is 10, and for paid users, the limit is up to 50 per request.
- The ‘size=30’ request will fetch 30 articles/requests.
https://newsdata.io/api/1/crypto?apikey=pub_YOUR_API_KEY&q=DOGE&size=30
Note that it is only for paid users because their max limit is up to 50 and for free users they would be required to upgrade their plan to access the ‘crypto’ endpoint.
20. Removeduplicate
This parameter would help users to remove duplicate articles.The request parameter to remove duplicate articles would be ‘removeduplicate=1‘
For Example:
https://newsdata.io/api/1/crypto?apikey=YOUR_API_KEY&q=YOUR_QUERY&removeduplicate=1
21. Page
This parameter allows the user to navigate to the next page. While fetching the data you will see a ‘nextPage’ string at the bottom of the screen. You can insert this in your query to navigate to the next page manually.
For Example:
https://newsdata.io/api/1/crypto?apikey=YOUR_API_KEY&q=YOUR_QUERY&page=XXXPPPXXXXXXXXXX
This parameter will take you to the next page with a set of new articles.
To learn more about this parameter, click here.
Hello, Curious Minds!
Welcome to my corner of the digital world, a space brimming with words and woven with ideas. Fresh out of the rigorous trenches of an Economics honors degree at the esteemed University of Delhi, I know a thing or two about crunching numbers and dissecting trends. But beyond the world of graphs and equations, lies my love for reading and writing. Admittedly, I’m a newbie in the content writing scene, still tasting the ink of fresh beginnings. I believe every corner of life holds a story waiting to be told, and I’m eager to be your storyteller. So, strap yourselves in, dear readers, and let’s dive into the captivating world of words together!
P.S. Feel free to drop a comment or reach out – I’m always up for a good conversation!