everything
Search through millions of articles from over 30,000 large and small news sources and blogs. This includes breaking news as well as lesser articles. This endpoint suits article discovery and analysis, but can be used to retrieve articles for display, too.
/v2/everything
Usage and SDK Samples
curl -X GET -H "apieco-key: [[apiKey]]" "https://api.apieco.ir/newsapi/v2/everything?qInTitle=&excludeDomains=&domains=&sources=&from=&to=&language=&sortBy=&q=&pageSize=&page="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.EverythingApi;
import java.io.File;
import java.util.*;
public class EverythingApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: apieco-key
ApiKeyAuth apieco-key = (ApiKeyAuth) defaultClient.getAuthentication("apieco-key");
apieco-key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apieco-key.setApiKeyPrefix("Token");
EverythingApi apiInstance = new EverythingApi();
String apiecoKey = apiecoKey_example; // String |
String qInTitle = qInTitle_example; // String | Keywords or phrases to search for in the article title only.
String excludeDomains = excludeDomains_example; // String | A comma-seperated string of domains (eg bbc.co.uk, techcrunch.com, engadget.com) to remove from the results.
String domains = domains_example; // String | A comma-seperated string of domains (eg bbc.co.uk, techcrunch.com, engadget.com) to restrict the search to.
String sources = sources_example; // String | A comma-seperated string of identifiers for the news sources or blogs you want headlines from. Use the /sources endpoint to locate these programmatically
String from = from_example; // String | A date and optional time for the oldest article allowed. This should be in ISO 8601 format (e.g. 2020-04-10 or 2020-04-10T07:20:02) Default: the oldest according to your plan.
String to = to_example; // String | A date and optional time for the newest article allowed. This should be in ISO 8601 format (e.g. 2020-04-10 or 2020-04-10T07:20:02) Default: the newest according to your plan
String language = language_example; // String | The 2-letter ISO-639-1 code of the language you want to get headlines
String sortBy = sortBy_example; // String | The order to sort the articles in. Possible options: relevancy, popularity, publishedAt. relevancy = articles more closely related to q come first. popularity = articles from popular sources and publishers come first. publishedAt = newest articles come first. Default: publishedAt
String q = q_example; // String | Keywords or phrases to search for in the article title and body.
Advanced search is supported here:
Surround phrases with quotes (") for exact match. Prepend words or phrases that must appear with a + symbol. Eg: +bitcoin Prepend words that must not appear with a - symbol. Eg: -bitcoin Alternatively you can use the AND / OR / NOT keywords, and optionally group these with parenthesis. Eg: crypto AND (ethereum OR litecoin) NOT bitcoin.
Integer pageSize = 56; // Integer | The number of results to return per page (request). 20 is the default, 100 is the maximum.
Integer page = 56; // Integer | Use this to page through the results if the total results found is greater than the page size.
try {
array[inline_response_200] result = apiInstance.everything(apiecoKey, qInTitle, excludeDomains, domains, sources, from, to, language, sortBy, q, pageSize, page);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling EverythingApi#everything");
e.printStackTrace();
}
}
}
import io.swagger.client.api.EverythingApi;
public class EverythingApiExample {
public static void main(String[] args) {
EverythingApi apiInstance = new EverythingApi();
String apiecoKey = apiecoKey_example; // String |
String qInTitle = qInTitle_example; // String | Keywords or phrases to search for in the article title only.
String excludeDomains = excludeDomains_example; // String | A comma-seperated string of domains (eg bbc.co.uk, techcrunch.com, engadget.com) to remove from the results.
String domains = domains_example; // String | A comma-seperated string of domains (eg bbc.co.uk, techcrunch.com, engadget.com) to restrict the search to.
String sources = sources_example; // String | A comma-seperated string of identifiers for the news sources or blogs you want headlines from. Use the /sources endpoint to locate these programmatically
String from = from_example; // String | A date and optional time for the oldest article allowed. This should be in ISO 8601 format (e.g. 2020-04-10 or 2020-04-10T07:20:02) Default: the oldest according to your plan.
String to = to_example; // String | A date and optional time for the newest article allowed. This should be in ISO 8601 format (e.g. 2020-04-10 or 2020-04-10T07:20:02) Default: the newest according to your plan
String language = language_example; // String | The 2-letter ISO-639-1 code of the language you want to get headlines
String sortBy = sortBy_example; // String | The order to sort the articles in. Possible options: relevancy, popularity, publishedAt. relevancy = articles more closely related to q come first. popularity = articles from popular sources and publishers come first. publishedAt = newest articles come first. Default: publishedAt
String q = q_example; // String | Keywords or phrases to search for in the article title and body.
Advanced search is supported here:
Surround phrases with quotes (") for exact match. Prepend words or phrases that must appear with a + symbol. Eg: +bitcoin Prepend words that must not appear with a - symbol. Eg: -bitcoin Alternatively you can use the AND / OR / NOT keywords, and optionally group these with parenthesis. Eg: crypto AND (ethereum OR litecoin) NOT bitcoin.
Integer pageSize = 56; // Integer | The number of results to return per page (request). 20 is the default, 100 is the maximum.
Integer page = 56; // Integer | Use this to page through the results if the total results found is greater than the page size.
try {
array[inline_response_200] result = apiInstance.everything(apiecoKey, qInTitle, excludeDomains, domains, sources, from, to, language, sortBy, q, pageSize, page);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling EverythingApi#everything");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: apieco-key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"apieco-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"apieco-key"];
String *apiecoKey = apiecoKey_example; //
String *qInTitle = qInTitle_example; // Keywords or phrases to search for in the article title only. (optional)
String *excludeDomains = excludeDomains_example; // A comma-seperated string of domains (eg bbc.co.uk, techcrunch.com, engadget.com) to remove from the results. (optional)
String *domains = domains_example; // A comma-seperated string of domains (eg bbc.co.uk, techcrunch.com, engadget.com) to restrict the search to. (optional)
String *sources = sources_example; // A comma-seperated string of identifiers for the news sources or blogs you want headlines from. Use the /sources endpoint to locate these programmatically (optional)
String *from = from_example; // A date and optional time for the oldest article allowed. This should be in ISO 8601 format (e.g. 2020-04-10 or 2020-04-10T07:20:02) Default: the oldest according to your plan. (optional)
String *to = to_example; // A date and optional time for the newest article allowed. This should be in ISO 8601 format (e.g. 2020-04-10 or 2020-04-10T07:20:02) Default: the newest according to your plan (optional)
String *language = language_example; // The 2-letter ISO-639-1 code of the language you want to get headlines (optional)
String *sortBy = sortBy_example; // The order to sort the articles in. Possible options: relevancy, popularity, publishedAt. relevancy = articles more closely related to q come first. popularity = articles from popular sources and publishers come first. publishedAt = newest articles come first. Default: publishedAt (optional)
String *q = q_example; // Keywords or phrases to search for in the article title and body.
Advanced search is supported here:
Surround phrases with quotes (") for exact match. Prepend words or phrases that must appear with a + symbol. Eg: +bitcoin Prepend words that must not appear with a - symbol. Eg: -bitcoin Alternatively you can use the AND / OR / NOT keywords, and optionally group these with parenthesis. Eg: crypto AND (ethereum OR litecoin) NOT bitcoin. (optional)
Integer *pageSize = 56; // The number of results to return per page (request). 20 is the default, 100 is the maximum. (optional)
Integer *page = 56; // Use this to page through the results if the total results found is greater than the page size. (optional)
EverythingApi *apiInstance = [[EverythingApi alloc] init];
[apiInstance everythingWith:apiecoKey
qInTitle:qInTitle
excludeDomains:excludeDomains
domains:domains
sources:sources
from:from
to:to
language:language
sortBy:sortBy
q:q
pageSize:pageSize
page:page
completionHandler: ^(array[inline_response_200] output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var NewsApi = require('_news_api');
var defaultClient = NewsApi.ApiClient.instance;
// Configure API key authorization: apieco-key
var apieco-key = defaultClient.authentications['apieco-key'];
apieco-key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apieco-key.apiKeyPrefix['apieco-key'] = "Token"
var api = new NewsApi.EverythingApi()
var apiecoKey = apiecoKey_example; // {String}
var opts = {
'qInTitle': qInTitle_example, // {String} Keywords or phrases to search for in the article title only.
'excludeDomains': excludeDomains_example, // {String} A comma-seperated string of domains (eg bbc.co.uk, techcrunch.com, engadget.com) to remove from the results.
'domains': domains_example, // {String} A comma-seperated string of domains (eg bbc.co.uk, techcrunch.com, engadget.com) to restrict the search to.
'sources': sources_example, // {String} A comma-seperated string of identifiers for the news sources or blogs you want headlines from. Use the /sources endpoint to locate these programmatically
'from': from_example, // {String} A date and optional time for the oldest article allowed. This should be in ISO 8601 format (e.g. 2020-04-10 or 2020-04-10T07:20:02) Default: the oldest according to your plan.
'to': to_example, // {String} A date and optional time for the newest article allowed. This should be in ISO 8601 format (e.g. 2020-04-10 or 2020-04-10T07:20:02) Default: the newest according to your plan
'language': language_example, // {String} The 2-letter ISO-639-1 code of the language you want to get headlines
'sortBy': sortBy_example, // {String} The order to sort the articles in. Possible options: relevancy, popularity, publishedAt. relevancy = articles more closely related to q come first. popularity = articles from popular sources and publishers come first. publishedAt = newest articles come first. Default: publishedAt
'q': q_example, // {String} Keywords or phrases to search for in the article title and body.
Advanced search is supported here:
Surround phrases with quotes (") for exact match. Prepend words or phrases that must appear with a + symbol. Eg: +bitcoin Prepend words that must not appear with a - symbol. Eg: -bitcoin Alternatively you can use the AND / OR / NOT keywords, and optionally group these with parenthesis. Eg: crypto AND (ethereum OR litecoin) NOT bitcoin.
'pageSize': 56, // {Integer} The number of results to return per page (request). 20 is the default, 100 is the maximum.
'page': 56 // {Integer} Use this to page through the results if the total results found is greater than the page size.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.everything(apiecoKey, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class everythingExample
{
public void main()
{
// Configure API key authorization: apieco-key
Configuration.Default.ApiKey.Add("apieco-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("apieco-key", "Bearer");
var apiInstance = new EverythingApi();
var apiecoKey = apiecoKey_example; // String |
var qInTitle = qInTitle_example; // String | Keywords or phrases to search for in the article title only. (optional)
var excludeDomains = excludeDomains_example; // String | A comma-seperated string of domains (eg bbc.co.uk, techcrunch.com, engadget.com) to remove from the results. (optional)
var domains = domains_example; // String | A comma-seperated string of domains (eg bbc.co.uk, techcrunch.com, engadget.com) to restrict the search to. (optional)
var sources = sources_example; // String | A comma-seperated string of identifiers for the news sources or blogs you want headlines from. Use the /sources endpoint to locate these programmatically (optional)
var from = from_example; // String | A date and optional time for the oldest article allowed. This should be in ISO 8601 format (e.g. 2020-04-10 or 2020-04-10T07:20:02) Default: the oldest according to your plan. (optional)
var to = to_example; // String | A date and optional time for the newest article allowed. This should be in ISO 8601 format (e.g. 2020-04-10 or 2020-04-10T07:20:02) Default: the newest according to your plan (optional)
var language = language_example; // String | The 2-letter ISO-639-1 code of the language you want to get headlines (optional)
var sortBy = sortBy_example; // String | The order to sort the articles in. Possible options: relevancy, popularity, publishedAt. relevancy = articles more closely related to q come first. popularity = articles from popular sources and publishers come first. publishedAt = newest articles come first. Default: publishedAt (optional)
var q = q_example; // String | Keywords or phrases to search for in the article title and body.
Advanced search is supported here:
Surround phrases with quotes (") for exact match. Prepend words or phrases that must appear with a + symbol. Eg: +bitcoin Prepend words that must not appear with a - symbol. Eg: -bitcoin Alternatively you can use the AND / OR / NOT keywords, and optionally group these with parenthesis. Eg: crypto AND (ethereum OR litecoin) NOT bitcoin. (optional)
var pageSize = 56; // Integer | The number of results to return per page (request). 20 is the default, 100 is the maximum. (optional)
var page = 56; // Integer | Use this to page through the results if the total results found is greater than the page size. (optional)
try
{
array[inline_response_200] result = apiInstance.everything(apiecoKey, qInTitle, excludeDomains, domains, sources, from, to, language, sortBy, q, pageSize, page);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling EverythingApi.everything: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: apieco-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('apieco-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apieco-key', 'Bearer');
$api_instance = new Swagger\Client\Api\EverythingApi();
$apiecoKey = apiecoKey_example; // String |
$qInTitle = qInTitle_example; // String | Keywords or phrases to search for in the article title only.
$excludeDomains = excludeDomains_example; // String | A comma-seperated string of domains (eg bbc.co.uk, techcrunch.com, engadget.com) to remove from the results.
$domains = domains_example; // String | A comma-seperated string of domains (eg bbc.co.uk, techcrunch.com, engadget.com) to restrict the search to.
$sources = sources_example; // String | A comma-seperated string of identifiers for the news sources or blogs you want headlines from. Use the /sources endpoint to locate these programmatically
$from = from_example; // String | A date and optional time for the oldest article allowed. This should be in ISO 8601 format (e.g. 2020-04-10 or 2020-04-10T07:20:02) Default: the oldest according to your plan.
$to = to_example; // String | A date and optional time for the newest article allowed. This should be in ISO 8601 format (e.g. 2020-04-10 or 2020-04-10T07:20:02) Default: the newest according to your plan
$language = language_example; // String | The 2-letter ISO-639-1 code of the language you want to get headlines
$sortBy = sortBy_example; // String | The order to sort the articles in. Possible options: relevancy, popularity, publishedAt. relevancy = articles more closely related to q come first. popularity = articles from popular sources and publishers come first. publishedAt = newest articles come first. Default: publishedAt
$q = q_example; // String | Keywords or phrases to search for in the article title and body.
Advanced search is supported here:
Surround phrases with quotes (") for exact match. Prepend words or phrases that must appear with a + symbol. Eg: +bitcoin Prepend words that must not appear with a - symbol. Eg: -bitcoin Alternatively you can use the AND / OR / NOT keywords, and optionally group these with parenthesis. Eg: crypto AND (ethereum OR litecoin) NOT bitcoin.
$pageSize = 56; // Integer | The number of results to return per page (request). 20 is the default, 100 is the maximum.
$page = 56; // Integer | Use this to page through the results if the total results found is greater than the page size.
try {
$result = $api_instance->everything($apiecoKey, $qInTitle, $excludeDomains, $domains, $sources, $from, $to, $language, $sortBy, $q, $pageSize, $page);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling EverythingApi->everything: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::EverythingApi;
# Configure API key authorization: apieco-key
$WWW::SwaggerClient::Configuration::api_key->{'apieco-key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'apieco-key'} = "Bearer";
my $api_instance = WWW::SwaggerClient::EverythingApi->new();
my $apiecoKey = apiecoKey_example; # String |
my $qInTitle = qInTitle_example; # String | Keywords or phrases to search for in the article title only.
my $excludeDomains = excludeDomains_example; # String | A comma-seperated string of domains (eg bbc.co.uk, techcrunch.com, engadget.com) to remove from the results.
my $domains = domains_example; # String | A comma-seperated string of domains (eg bbc.co.uk, techcrunch.com, engadget.com) to restrict the search to.
my $sources = sources_example; # String | A comma-seperated string of identifiers for the news sources or blogs you want headlines from. Use the /sources endpoint to locate these programmatically
my $from = from_example; # String | A date and optional time for the oldest article allowed. This should be in ISO 8601 format (e.g. 2020-04-10 or 2020-04-10T07:20:02) Default: the oldest according to your plan.
my $to = to_example; # String | A date and optional time for the newest article allowed. This should be in ISO 8601 format (e.g. 2020-04-10 or 2020-04-10T07:20:02) Default: the newest according to your plan
my $language = language_example; # String | The 2-letter ISO-639-1 code of the language you want to get headlines
my $sortBy = sortBy_example; # String | The order to sort the articles in. Possible options: relevancy, popularity, publishedAt. relevancy = articles more closely related to q come first. popularity = articles from popular sources and publishers come first. publishedAt = newest articles come first. Default: publishedAt
my $q = q_example; # String | Keywords or phrases to search for in the article title and body.
Advanced search is supported here:
Surround phrases with quotes (") for exact match. Prepend words or phrases that must appear with a + symbol. Eg: +bitcoin Prepend words that must not appear with a - symbol. Eg: -bitcoin Alternatively you can use the AND / OR / NOT keywords, and optionally group these with parenthesis. Eg: crypto AND (ethereum OR litecoin) NOT bitcoin.
my $pageSize = 56; # Integer | The number of results to return per page (request). 20 is the default, 100 is the maximum.
my $page = 56; # Integer | Use this to page through the results if the total results found is greater than the page size.
eval {
my $result = $api_instance->everything(apiecoKey => $apiecoKey, qInTitle => $qInTitle, excludeDomains => $excludeDomains, domains => $domains, sources => $sources, from => $from, to => $to, language => $language, sortBy => $sortBy, q => $q, pageSize => $pageSize, page => $page);
print Dumper($result);
};
if ($@) {
warn "Exception when calling EverythingApi->everything: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: apieco-key
swagger_client.configuration.api_key['apieco-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['apieco-key'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.EverythingApi()
apiecoKey = apiecoKey_example # String |
qInTitle = qInTitle_example # String | Keywords or phrases to search for in the article title only. (optional)
excludeDomains = excludeDomains_example # String | A comma-seperated string of domains (eg bbc.co.uk, techcrunch.com, engadget.com) to remove from the results. (optional)
domains = domains_example # String | A comma-seperated string of domains (eg bbc.co.uk, techcrunch.com, engadget.com) to restrict the search to. (optional)
sources = sources_example # String | A comma-seperated string of identifiers for the news sources or blogs you want headlines from. Use the /sources endpoint to locate these programmatically (optional)
from = from_example # String | A date and optional time for the oldest article allowed. This should be in ISO 8601 format (e.g. 2020-04-10 or 2020-04-10T07:20:02) Default: the oldest according to your plan. (optional)
to = to_example # String | A date and optional time for the newest article allowed. This should be in ISO 8601 format (e.g. 2020-04-10 or 2020-04-10T07:20:02) Default: the newest according to your plan (optional)
language = language_example # String | The 2-letter ISO-639-1 code of the language you want to get headlines (optional)
sortBy = sortBy_example # String | The order to sort the articles in. Possible options: relevancy, popularity, publishedAt. relevancy = articles more closely related to q come first. popularity = articles from popular sources and publishers come first. publishedAt = newest articles come first. Default: publishedAt (optional)
q = q_example # String | Keywords or phrases to search for in the article title and body.
Advanced search is supported here:
Surround phrases with quotes (") for exact match. Prepend words or phrases that must appear with a + symbol. Eg: +bitcoin Prepend words that must not appear with a - symbol. Eg: -bitcoin Alternatively you can use the AND / OR / NOT keywords, and optionally group these with parenthesis. Eg: crypto AND (ethereum OR litecoin) NOT bitcoin. (optional)
pageSize = 56 # Integer | The number of results to return per page (request). 20 is the default, 100 is the maximum. (optional)
page = 56 # Integer | Use this to page through the results if the total results found is greater than the page size. (optional)
try:
api_response = api_instance.everything(apiecoKey, qInTitle=qInTitle, excludeDomains=excludeDomains, domains=domains, sources=sources, from=from, to=to, language=language, sortBy=sortBy, q=q, pageSize=pageSize, page=page)
pprint(api_response)
except ApiException as e:
print("Exception when calling EverythingApi->everything: %s\n" % e)
Parameters
Name | Description |
---|---|
apieco-key* |
String
Required
|
Name | Description |
---|---|
qInTitle |
String
Keywords or phrases to search for in the article title only.
|
excludeDomains |
String
A comma-seperated string of domains (eg bbc.co.uk, techcrunch.com, engadget.com) to remove from the results.
|
domains |
String
A comma-seperated string of domains (eg bbc.co.uk, techcrunch.com, engadget.com) to restrict the search to.
|
sources |
String
A comma-seperated string of identifiers for the news sources or blogs you want headlines from. Use the /sources endpoint to locate these programmatically
|
from |
String
A date and optional time for the oldest article allowed. This should be in ISO 8601 format (e.g. 2020-04-10 or 2020-04-10T07:20:02) Default: the oldest according to your plan.
|
to |
String
A date and optional time for the newest article allowed. This should be in ISO 8601 format (e.g. 2020-04-10 or 2020-04-10T07:20:02) Default: the newest according to your plan
|
language |
String
The 2-letter ISO-639-1 code of the language you want to get headlines
|
sortBy |
String
The order to sort the articles in. Possible options: relevancy, popularity, publishedAt. relevancy = articles more closely related to q come first. popularity = articles from popular sources and publishers come first. publishedAt = newest articles come first. Default: publishedAt
|
q |
String
Keywords or phrases to search for in the article title and body.
Advanced search is supported here:
Surround phrases with quotes (") for exact match. Prepend words or phrases that must appear with a + symbol. Eg: +bitcoin Prepend words that must not appear with a - symbol. Eg: -bitcoin Alternatively you can use the AND / OR / NOT keywords, and optionally group these with parenthesis. Eg: crypto AND (ethereum OR litecoin) NOT bitcoin.
|
pageSize |
Integer
The number of results to return per page (request). 20 is the default, 100 is the maximum.
|
page |
Integer
Use this to page through the results if the total results found is greater than the page size.
|