{"id":1232070,"date":"2021-04-11T19:58:28","date_gmt":"2021-04-11T19:58:28","guid":{"rendered":"https:\/\/www.newsomaticapi.com\/?page_id=1232070"},"modified":"2026-01-28T12:06:49","modified_gmt":"2026-01-28T12:06:49","slug":"api-documentation","status":"publish","type":"page","link":"https:\/\/www.newsomaticapi.com\/api-documentation\/","title":{"rendered":"API Documentation"},"content":{"rendered":"<h2>Before you begin<\/h2>\n<p>Note that you can bypass reading this document if you use the <a href=\"https:\/\/wpbay.com\/product\/newsomatic-automatic-news-post-generator-plugin-for-wordpress\/\">Newsomatic plugin<\/a> together with this API. You should read this document only if you will create your own implementation of the code that will use this API. If this is the case, lets get started!<\/p>\n<h2>General Info<\/h2>\n<p>NewsomaticAPI is a simple HTTP REST API for searching and retrieving live articles from all over the web. It can help you answer questions like:<\/p>\n<ul>\n<li>What top stories is CNN running right now?<\/li>\n<li>What new articles were published about the next gaming laptop, today?<\/li>\n<li>Has my service or product been mentioned or reviewed by any blogs recently?<\/li>\n<\/ul>\n<p>You can search for articles with any combination of the following criteria:<\/p>\n<ul>\n<li><strong>Keyword or phrase<\/strong>. Eg: find all articles containing the word &#8216;Microsoft&#8217;.<\/li>\n<li><strong>Date published<\/strong>. Eg: find all articles published yesterday.<\/li>\n<li><strong>Source domain name<\/strong>. Eg: find all articles published on thenextweb.com.<\/li>\n<li><strong>Language<\/strong>. Eg: find all articles written in English.<\/li>\n<\/ul>\n<p>You can sort the results in the following orders:<\/p>\n<ul>\n<li>Date published<\/li>\n<li>Relevancy to search keyword<\/li>\n<li>Popularity of source<\/li>\n<\/ul>\n<h2>API Keys<\/h2>\n<p>You need an API key to use the API &#8211; this is a unique key that identifies your requests. You can get an API key <a href=\"https:\/\/www.newsomaticapi.com\/register\/\" target=\"_blank\" rel=\"noopener\">here<\/a> (you will need a purchase code for the <a href=\"https:\/\/wpbay.com\/product\/newsomatic-automatic-news-post-generator-plugin-for-wordpress\/\" target=\"_blank\" rel=\"noopener\">Newsomatic plugin<\/a>). If you use this API key, you will have a 500 API call\/day limit. If you wish to get more, you need to subscribe <a href=\"https:\/\/www.newsomaticapi.com\/register\/\" target=\"_blank\" rel=\"noopener\">NewsomaticAPI on RapidAPI<\/a>.<\/p>\n<p>If you create an API key based on a purchase code of the Newsomatic plugin, authentication is handled with a simple API key. You can attach your API key to a request in this simple way: via the <strong><em>apikey<\/em> <\/strong>query string parameter.<br>If you are using a subscription to NewsomaticAPI from RapidAPI, you will need to pass the following headers to your request:<\/p>\n<ul>\n<li>X-RapidAPI-Host: newsomaticapi.p.rapidapi.com<\/li>\n<li>X-RapidAPI-Key: YOUR_API_KEY_FROM_RAPIDAPI<\/li>\n<\/ul>\n<p>In this case, you will not need to use the apikey URL parameter to send your API key, but the API key needs to be sent using the above header.<\/p>\n<p>We strongly recommend the either of last two so that your API key isn&#8217;t visible to others in logs or via request sniffing.<\/p>\n<h2 class=\"black-90 fw3\">API Base URLs<\/h2>\n<p>If you create an API key based on a purchase code of the Newsomatic plugin, the base URL of the API will be:<\/p>\n<p><code>https:\/\/newsomaticapi.com\/apis\/news\/v1<br>\n<\/code><\/p>\n<p>If you subscribe to NewsomaticAPI on RapidAPI, the base URL of the API will be:<\/p>\n<p><code>https:\/\/newsomaticapi.p.rapidapi.com<br>\n<\/code><\/p>\n<h2 class=\"black-90 fw3\">Endpoints<\/h2>\n<p>NewsomaticAPI has 3 main endpoints:<\/p>\n<ul>\n<li>Everything <code>\/all<\/code> \u2013 search every article published by over 2,500 different sources large and small in the last 60 days.<\/li>\n<li>Top headlines <code>\/top<\/code> \u2013 returns breaking news headlines for countries, categories, and singular publishers.<\/li>\n<li>Sources <code>\/sources<\/code> \u2013 returns information (including name, description, and category) about all the sources available for searching.<\/li>\n<\/ul>\n<p>Examples of the above endpoints:<\/p>\n<ul>\n<li><code>https:\/\/newsomaticapi.com\/apis\/news\/v1\/all<\/code><\/li>\n<li><code>https:\/\/newsomaticapi.p.rapidapi.com\/all<\/code><\/li>\n<\/ul>\n<p>There is also a minor endpoint that can be used to retrieve a small subset of the publishers we can scan:<\/p>\n<h2>Example request (using the 500 API request\/day API key):<\/h2>\n<p><em>https:\/\/newsomaticapi.com\/apis\/news\/v1\/all?apikey=xxxxxxxxxxxxxxxxxxx&amp;q=trump&amp;country=us&amp;language=en&amp;pageSize=5&amp;category=general<\/em><\/p>\n<h2>Endpoint: Everything<\/h2>\n<p>Search through millions of articles from over 2,500 large and small news sources and blogs.<\/p>\n<h3>Request parameters:<\/h3>\n<ul class=\"table-group\">\n<li id=\"errors-param\" class=\"table-group-item\">\n<h3 class=\"table-group-item-label\">apikey <em>*<span class=\"table-group-item-label-details important\">REQUIRED<\/span><\/em><\/h3>\n<p class=\"table-group-item-description\">Your API key. Get it using your purchase code for the Newsomatic plugin, from <a href=\"https:\/\/www.newsomaticapi.com\/register\/\">this page.<\/a><\/p>\n<\/li>\n<\/ul>\n<ul class=\"table-group\">\n<li id=\"errors-param\" class=\"table-group-item\">\n<h3 class=\"table-group-item-label\">q<\/h3>\n<p class=\"table-group-item-description\">Keywords or phrases to search for in the article title and body. Advanced search is supported here:<\/p>\n<ul>\n<li>Surround phrases with quotes (&#8220;) for exact match.<\/li>\n<li>Prepend words or phrases that&nbsp;<em>must<\/em>&nbsp;appear with a + symbol. Eg: +bitcoin<\/li>\n<li>Prepend words that&nbsp;<em>must not<\/em>&nbsp;appear with a &#8211; symbol. Eg: -bitcoin<\/li>\n<\/ul>\n<p>The complete value for&nbsp;<code>q<\/code>&nbsp;must be&nbsp;<strong>URL-encoded<\/strong>.<\/p>\n<\/li>\n<\/ul>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li class=\"table-group-item-description\">&nbsp;<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul class=\"table-group\">\n<li class=\"table-group-item\">\n<h3 class=\"table-group-item-label\">qInTitle<\/h3>\n<\/li>\n<li class=\"table-group-item\">\n<ul class=\"table-group\">\n<li class=\"table-group-item\">\n<p class=\"table-group-item-description\">Keywords or phrases to search for in the article title only.<\/p>\n<p>Advanced search is supported here:<\/p>\n<ul>\n<li>Surround phrases with quotes (&#8220;) for exact match.<\/li>\n<li>Prepend words or phrases that&nbsp;<em>must<\/em>&nbsp;appear with a + symbol. Eg: +bitcoin<\/li>\n<li>Prepend words that&nbsp;<em>must not<\/em>&nbsp;appear with a &#8211; symbol. Eg: -bitcoin<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p class=\"table-group-item-description\">The complete value for&nbsp;<code>qInTitle<\/code>&nbsp;must be&nbsp;<strong>URL-encoded<\/strong>.<\/p>\n<\/li>\n<li class=\"table-group-item\">\n<h3 class=\"table-group-item-label\">sources<\/h3>\n<p class=\"table-group-item-description\">A comma separated string of identifiers (maximum 10) for the news sources or blogs you want headlines from. Use the \/sources&nbsp;endpoint to locate these programmatically or look at the&nbsp;sources index.<\/p>\n<\/li>\n<li class=\"table-group-item\">\n<h3 class=\"table-group-item-label\">domains<\/h3>\n<p class=\"table-group-item-description\">A comma separated string of domains (eg bbc.co.uk, techcrunch.com, engadget.com) to restrict the search to.<\/p>\n<\/li>\n<li class=\"table-group-item\">\n<h3 class=\"table-group-item-label\">excludeDomains<\/h3>\n<p class=\"table-group-item-description\">A comma separated string of domains (eg bbc.co.uk, techcrunch.com, engadget.com) to remove from the results.<\/p>\n<\/li>\n<li class=\"table-group-item\">\n<h3 class=\"table-group-item-label\">from<\/h3>\n<p class=\"table-group-item-description\">A date and optional time for the&nbsp;<em>oldest<\/em>&nbsp;article allowed. This should be in ISO 8601 format (e.g.&nbsp;<code>2021-04-11<\/code>&nbsp;or&nbsp;<code>2021-04-11T19:40:08<\/code>)<\/p>\n<p><span class=\"table-group-item-label-details\">Default: the oldest according to your plan.<\/span><\/p>\n<\/li>\n<li class=\"table-group-item\">\n<h3 class=\"table-group-item-label\">to<\/h3>\n<p class=\"table-group-item-description\">A date and optional time for the&nbsp;<em>newest<\/em>&nbsp;article allowed. This should be in ISO 8601 format (e.g.&nbsp;<code>2021-04-11<\/code>&nbsp;or&nbsp;<code>2021-04-11T19:40:08<\/code>)<\/p>\n<p><span class=\"table-group-item-label-details\">Default: the newest according to your plan.<\/span><\/p>\n<\/li>\n<li class=\"table-group-item\">\n<h3 class=\"table-group-item-label\">language<\/h3>\n<p class=\"table-group-item-description\">The 2-letter ISO-639-1 code of the language you want to get headlines for. Possible options: <code>all ar bg cr cz de en es fr gr hd he hu id it jp kr lt lv nl no pl pt ro rs ru se si sk sx th tr ua ud zh vn<\/code><\/p>\n<p><span class=\"table-group-item-label-details\">Default: all languages returned.<\/span><\/p>\n<\/li>\n<li class=\"table-group-item\">\n<h3 class=\"table-group-item-label\">country<\/h3>\n<p class=\"table-group-item-description\">The 2-letter ISO-639-1 code of the country you want to get headlines for. Possible options: <code>ar au br bs ca zh cz de es fr gb ie in it nl no pk ru sa se us za ae at be bg ch co cu do eg gh gr hk hu id is jp kr ke lt lv ma mx my ng nz pe ph pl pt ro hr jm rs sg si sk th tr tt tw ua ve vn<\/code><\/p>\n<p><span class=\"table-group-item-label-details\">Default: all countries returned.<\/span><\/p>\n<\/li>\n<li class=\"table-group-item\">\n<h3 class=\"table-group-item-label\">excludeCountry<\/h3>\n<p class=\"table-group-item-description\">The 2-letter ISO-639-1 code of the country you want to exclude from results. You can add a comma separated list of maximum 5 countries. Possible options: <code>ar au br bs ca zh cz de es fr gb ie in it nl no pk ru sa se us za ae at be bg ch co cu do eg gh gr hk hu id is jp kr ke lt lv ma mx my ng nz pe ph pl pt ro hr jm rs sg si sk th tr tt tw ua ve vn<\/code><\/p>\n<p><span class=\"table-group-item-label-details\">Default: all countries returned.<\/span><\/p>\n<\/li>\n<li class=\"table-group-item\">\n<div class=\"table-group-item-description\">\n<h3 class=\"table-group-item-label\">category<\/h3>\n<p class=\"table-group-item-description\">Find sources that display news of this category. Possible options:&nbsp;<code>business<\/code><code>entertainment<\/code><code>general<\/code><code>health<\/code><code>science<\/code><code>sports<\/code><code>technology<\/code>. Default: all categories.<\/p>\n<\/div>\n<\/li>\n<li class=\"table-group-item\">\n<h3 class=\"table-group-item-label\">sortBy<\/h3>\n<p class=\"table-group-item-description\">The order to sort the articles in. Possible options:&nbsp;<code>relevancy<\/code>,&nbsp;<code>popularity<\/code>,&nbsp;<code>publishedAt<\/code>, <code>random.<\/code><br><code>relevancy<\/code>&nbsp;= articles more closely related to&nbsp;<code>q<\/code>&nbsp;come first.<br><code>popularity<\/code>&nbsp;= articles from popular sources and publishers come first.<br><code>publishedAt<\/code>&nbsp;= newest articles come first.<br><code>random<\/code>&nbsp;= random articles.<\/p>\n<p><span class=\"table-group-item-label-details\">Default:&nbsp;<code>publishedAt<\/code><\/span><\/p>\n<\/li>\n<li class=\"table-group-item\">\n<h3 class=\"table-group-item-label\">pageSize *must be <span class=\"table-group-item-label-details\">int<\/span><\/h3>\n<p class=\"table-group-item-description\">The number of results to return per page.<\/p>\n<p><span class=\"table-group-item-label-details\">Default:&nbsp;<code>8<\/code>. Maximum:&nbsp;<code>100<\/code>.<\/span><\/p>\n<\/li>\n<li class=\"table-group-item\">\n<h3 class=\"table-group-item-label\">page *must be <span class=\"table-group-item-label-details\">int<\/span><\/h3>\n<p class=\"table-group-item-description\">Use this to page through the results.<\/p>\n<p><span class=\"table-group-item-label-details\">Default:&nbsp;<code>1<\/code>.<\/span><\/p>\n<\/li>\n<\/ul>\n<h3>Response object<\/h3>\n<h5 class=\"table-group-item-label\">The results of the request:<\/h5>\n<h5 class=\"table-group-item-label\">&#8211; callcount:<\/h5> <span class=\"table-group-item-label-details\">The number of API calls remaining for your API key<\/span>\n<h5 class=\"table-group-item-label\">&#8211; pagination:<\/h5> <span class=\"table-group-item-label-details\">Details about the pagination of results. Contained fields are: <strong>current_page<\/strong> (the page displayed in the API call), <strong>total_pages<\/strong> (how many pages of results exist), <strong>page_size<\/strong> (the number of results displayed for each page), <strong>total_results<\/strong> (the total number of results available), <strong>remaining_pages<\/strong> (how many pages are still available)<\/span>\n<h5 class=\"table-group-item-label\">&#8211; articles:<\/h5> <span class=\"table-group-item-label-details\">array[article]<\/span>\n<p><\/p>\n<p>Contents of an <strong>article<\/strong> object:<\/p>\n<ul>\n<li>source<br>The identifier id and a display name name for the source this article came from.<\/li>\n<li>author<br>The author of the article<\/li>\n<li>title<br>The headline or title of the article.<\/li>\n<li>description<br>A description or snippet from the article.<\/li>\n<li>url<br>The direct URL to the article.<\/li>\n<li>urlToImage<br>The URL to a relevant image for the article.<\/li>\n<li>publishedAt<br>The date and time that the article was published.<\/li>\n<li>content<br>The unformatted content of the article.<\/li>\n<\/ul>\n<h2>Endpoint: Top Headlines<\/h2>\n<p>This endpoint provides live top and breaking headlines for a country, specific category in a country, single source, or multiple sources. You can also search with keywords. Articles are sorted by the earliest date published first.<\/p>\n<h3>Request parameters<\/h3>\n<ul class=\"table-group\">\n<li id=\"errors-param\" class=\"table-group-item\">\n<h3 class=\"table-group-item-label\">apikey <em>*<span class=\"table-group-item-label-details important\">REQUIRED<\/span><\/em><\/h3>\n<p class=\"table-group-item-description\">Your API key. Get it using your purchase code for the Newsomatic plugin, from <a href=\"https:\/\/www.newsomaticapi.com\/register\/\">this page.<\/a><\/p>\n<\/li>\n<\/ul>\n<ul class=\"table-group\">\n<li id=\"errors-param\" class=\"table-group-item\">\n<h3 class=\"table-group-item-label\">q<\/h3>\n<p class=\"table-group-item-description\">Keywords or phrases to search for in the article title and body. Advanced search is supported here:<\/p>\n<ul>\n<li>Surround phrases with quotes (&#8220;) for exact match.<\/li>\n<li>Prepend words or phrases that&nbsp;<em>must<\/em>&nbsp;appear with a + symbol. Eg: +bitcoin<\/li>\n<li>Prepend words that&nbsp;<em>must not<\/em>&nbsp;appear with a &#8211; symbol. Eg: -bitcoin<\/li>\n<\/ul>\n<p>The complete value for&nbsp;<code>q<\/code>&nbsp;must be&nbsp;<strong>URL-encoded<\/strong>.<\/p>\n<\/li>\n<\/ul>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li class=\"table-group-item-description\">&nbsp;<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul class=\"table-group\">\n<li class=\"table-group-item\">\n<h3 class=\"table-group-item-label\">qInTitle<\/h3>\n<\/li>\n<li>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li class=\"table-group-item-description\">\n<p class=\"mt0\">Keywords or phrases to search for in the article title only.<\/p>\n<p>Advanced search is supported here:<\/p>\n<ul>\n<li>Surround phrases with quotes (&#8220;) for exact match.<\/li>\n<li>Prepend words or phrases that&nbsp;<em>must<\/em>&nbsp;appear with a + symbol. Eg: +bitcoin<\/li>\n<li>Prepend words that&nbsp;<em>must not<\/em>&nbsp;appear with a &#8211; symbol. Eg: -bitcoin<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li style=\"list-style-type: none;\">&nbsp;<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p class=\"table-group-item-description\">The complete value for&nbsp;<code>qInTitle<\/code>&nbsp;must be&nbsp;<strong>URL-encoded<\/strong>.<\/p>\n<ul class=\"table-group\">\n<li class=\"table-group-item\">\n<h3 class=\"table-group-item-label\">sources<\/h3>\n<p class=\"table-group-item-description\">A comma separated string of identifiers (maximum 10) for the news sources or blogs you want headlines from. Use the \/sources&nbsp;endpoint to locate these programmatically or look at the&nbsp;sources index.<\/p>\n<\/li>\n<li class=\"table-group-item\">\n<h3 class=\"table-group-item-label\">domains<\/h3>\n<p class=\"table-group-item-description\">A comma separated string of domains (eg bbc.co.uk, techcrunch.com, engadget.com) to restrict the search to.<\/p>\n<\/li>\n<li class=\"table-group-item\">\n<h3 class=\"table-group-item-label\">excludeDomains<\/h3>\n<p class=\"table-group-item-description\">A comma separated string of domains (eg bbc.co.uk, techcrunch.com, engadget.com) to remove from the results.<\/p>\n<\/li>\n<li class=\"table-group-item\">\n<h3 class=\"table-group-item-label\">from<\/h3>\n<p class=\"table-group-item-description\">A date and optional time for the&nbsp;<em>oldest<\/em>&nbsp;article allowed. This should be in ISO 8601 format (e.g.&nbsp;<code>2021-04-11<\/code>&nbsp;or&nbsp;<code>2021-04-11T19:40:08<\/code>)<\/p>\n<p><span class=\"table-group-item-label-details\">Default: the oldest according to your plan.<\/span><\/p>\n<\/li>\n<li class=\"table-group-item\">\n<h3 class=\"table-group-item-label\">to<\/h3>\n<p class=\"table-group-item-description\">A date and optional time for the&nbsp;<em>newest<\/em>&nbsp;article allowed. This should be in ISO 8601 format (e.g.&nbsp;<code>2021-04-11<\/code>&nbsp;or&nbsp;<code>2021-04-11T19:40:08<\/code>)<\/p>\n<p><span class=\"table-group-item-label-details\">Default: the newest according to your plan.<\/span><\/p>\n<\/li>\n<li class=\"table-group-item\">\n<h3 class=\"table-group-item-label\">language<\/h3>\n<p class=\"table-group-item-description\">The 2-letter ISO-639-1 code of the language you want to get headlines for. Possible options: <code>all ar bg cr cz de en es fr gr hd he hu id it jp kr lt lv nl no pl pt ro rs ru se si sk sx th tr ua ud zh vn<\/code><\/p>\n<p><span class=\"table-group-item-label-details\">Default: all languages returned.<\/span><\/p>\n<\/li>\n<li class=\"table-group-item\">\n<h3 class=\"table-group-item-label\">country<\/h3>\n<p class=\"table-group-item-description\">The 2-letter ISO-639-1 code of the country you want to get headlines for. Possible options: <code>all ar au br bs ca zh cz de es fr gb ie in it nl no pk ru sa se us za ae at be bg ch co cu do eg gh gr hk hu id is jp kr ke lt lv ma mx my ng nz pe ph pl pt ro hr jm rs sg si sk th tr tt tw ua ve vn\n<\/code><\/p>\n<p><span class=\"table-group-item-label-details\">Default: all countries returned.<\/span><\/p>\n<\/li>\n<li class=\"table-group-item\">\n<h3 class=\"table-group-item-label\">excludeCountry<\/h3>\n<p class=\"table-group-item-description\">The 2-letter ISO-639-1 code of the country you want to exclude from results. You can add a comma separated list of maximum 5 countries. Possible options: <code>ar au br bs ca zh cz de es fr gb ie in it nl no pk ru sa se us za ae at be bg ch co cu do eg gh gr hk hu id is jp kr ke lt lv ma mx my ng nz pe ph pl pt ro hr jm rs sg si sk th tr tt tw ua ve vn<\/code><\/p>\n<p><span class=\"table-group-item-label-details\">Default: all countries returned.<\/span><\/p>\n<\/li>\n<li class=\"table-group-item\">\n<div class=\"table-group-item-description\">\n<h3 class=\"table-group-item-label\">category<\/h3>\n<p class=\"table-group-item-description\">Find sources that display news of this category. Possible options:&nbsp;<code>business<\/code><code>entertainment<\/code><code>general<\/code><code>health<\/code><code>science<\/code><code>sports<\/code><code>technology<\/code>. Default: all categories.<\/p>\n<\/div>\n<\/li>\n<li class=\"table-group-item\">\n<h3 class=\"table-group-item-label\">sortBy<\/h3>\n<p class=\"table-group-item-description\">The order to sort the articles in. Possible options:&nbsp;<code>relevancy<\/code>,&nbsp;<code>popularity<\/code>,&nbsp;<code>publishedAt<\/code>, <code>random<\/code>.<br><code>relevancy<\/code>&nbsp;= articles more closely related to&nbsp;<code>q<\/code>&nbsp;come first.<br><code>popularity<\/code>&nbsp;= articles from popular sources and publishers come first.<br><code>publishedAt<\/code>&nbsp;= newest articles come first.<br><code>random<\/code>&nbsp;= random articles.<\/p>\n<p><span class=\"table-group-item-label-details\">Default:&nbsp;<code>publishedAt<\/code><\/span><\/p>\n<\/li>\n<li class=\"table-group-item\">\n<h3 class=\"table-group-item-label\">pageSize *must be <span class=\"table-group-item-label-details\">int<\/span><\/h3>\n<p class=\"table-group-item-description\">The number of results to return per page.<\/p>\n<p><span class=\"table-group-item-label-details\">Default:&nbsp;<code>100<\/code>. Maximum:&nbsp;<code>100<\/code>.<\/span><\/p>\n<\/li>\n<li class=\"table-group-item\">\n<h3 class=\"table-group-item-label\">page *must be <span class=\"table-group-item-label-details\">int<\/span><\/h3>\n<p class=\"table-group-item-description\">Use this to page through the results.<\/p>\n<p><span class=\"table-group-item-label-details\">Default:&nbsp;<code>1<\/code>.<\/span><\/p>\n<\/li>\n<\/ul>\n<h3>Response object<\/h3>\n<h5 class=\"table-group-item-label\">The results of the request:<\/h5>\n<h5 class=\"table-group-item-label\">&#8211; callcount:<\/h5> <span class=\"table-group-item-label-details\">The number of API calls remaining for your API key<\/span>\n<h5 class=\"table-group-item-label\">&#8211; pagination:<\/h5> <span class=\"table-group-item-label-details\">Details about the pagination of results. Contained fields are: <strong>current_page<\/strong> (the page displayed in the API call), <strong>total_pages<\/strong> (how many pages of results exist), <strong>page_size<\/strong> (the number of results displayed for each page), <strong>total_results<\/strong> (the total number of results available), <strong>remaining_pages<\/strong> (how many pages are still available)<\/span>\n<h5 class=\"table-group-item-label\">&#8211; articles:<\/h5> <span class=\"table-group-item-label-details\">array[article]<\/span>\n<p><\/p>\n<p>Contents of an <strong>article<\/strong> object:<\/p>\n<ul>\n<li>source<br>The identifier id and a display name name for the source this article came from.<\/li>\n<li>author<br>The author of the article<\/li>\n<li>title<br>The headline or title of the article.<\/li>\n<li>description<br>A description or snippet from the article.<\/li>\n<li>url<br>The direct URL to the article.<\/li>\n<li>urlToImage<br>The URL to a relevant image for the article.<\/li>\n<li>publishedAt<br>The date and time that the article was published.<\/li>\n<li>content<br>The unformatted content of the article.<\/li>\n<\/ul>\n<h2>Endpoint: Sources<\/h2>\n<p>This endpoint returns the subset of news publishers that top headlines are available from. It&#8217;s mainly a convenience endpoint that you can use to keep track of the publishers available on the API.<\/p>\n<h3>Request parameters<\/h3>\n<ul class=\"table-group\">\n<li id=\"errors-param\" class=\"table-group-item\">\n<h3 class=\"table-group-item-label\">apikey *<span class=\"table-group-item-label-details important\">REQUIRED<\/span><\/h3>\n<p class=\"table-group-item-description\">Your API key.<\/p>\n<\/li>\n<\/ul>\n<h3>Response object<\/h3>\n<h5 class=\"table-group-item-label\">The results of the request:<\/h5>\n<h5 class=\"table-group-item-label\">&#8211; callcount:<\/h5> <span class=\"table-group-item-label-details\">The number of API calls remaining for your API key<\/span>\n<h5 class=\"table-group-item-label\">&#8211; sources:<\/h5> <span class=\"table-group-item-label-details\">array[source]<\/span>\n<p><\/p>\n<p>Contents of a <b>source <\/b>object:<\/p>\n<ul>\n<li>name<br>The name of the news source, which acts also as its unique identifier<\/li>\n<\/ul>\n<h2>Errors<\/h2>\n<p>If you make a bad request we&#8217;ll let you know by returning a relevant HTTP status code along with more details in the body. You will also get the &#8220;callcount&#8221; API response, containing the remaining number of API calls for your API key for the current day.<\/p>\n<h2>WordPress Plugin which uses the API<\/h2>\n<p>Currently, you can use the NewsomaticAPI in the <a href=\"https:\/\/wpbay.com\/product\/newsomatic-automatic-news-post-generator-plugin-for-wordpress\/\">Newsomatic plugin for WordPress<\/a>. It provides a done-for-you implementation of this API and it is always kept updated and functional.<\/p>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Before you begin Note that you can bypass reading this document if you use the Newsomatic plugin together with this API. You should read this document only if you will create your own implementation of the code that will use this API. If this is the case, lets get started! General Info NewsomaticAPI is a &#8230;.&nbsp;&nbsp;<a class=\" special\" href=\"https:\/\/www.newsomaticapi.com\/api-documentation\/\">Read More<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1232070","page","type-page","status-publish","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.newsomaticapi.com\/apis\/wp\/v2\/pages\/1232070","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.newsomaticapi.com\/apis\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.newsomaticapi.com\/apis\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.newsomaticapi.com\/apis\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.newsomaticapi.com\/apis\/wp\/v2\/comments?post=1232070"}],"version-history":[{"count":24,"href":"https:\/\/www.newsomaticapi.com\/apis\/wp\/v2\/pages\/1232070\/revisions"}],"predecessor-version":[{"id":10722596,"href":"https:\/\/www.newsomaticapi.com\/apis\/wp\/v2\/pages\/1232070\/revisions\/10722596"}],"wp:attachment":[{"href":"https:\/\/www.newsomaticapi.com\/apis\/wp\/v2\/media?parent=1232070"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}