Download the PHP package newsdataio/newsdataapi without Composer

On this page you can find all versions of the php package newsdataio/newsdataapi. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package newsdataapi

Alt text

Newsdata.io PHP Client

Newsdataapi allows you to create a library for accessing http services easily, in a centralized way. An API defined by newsdataapi will return a JSON object when called.

License License


Requirements

PHP 7.3 and later.


Composer

You can install the bindings via Composer. Run the following command:


Manual Installation

If you do not wish to use Composer, you can download the latest release. Then, to use the bindings, include the autoload.php file.


Dependencies

The bindings require the following extensions in order to work properly:

If you use Composer, these dependencies should be handled automatically. If you install manually, you'll want to make sure that these extensions are available.


Documentation

See the API docs.


Getting Started

LATEST NEWS API

GET     /1/news

API key : Your private Newsdata API key.

country : Find sources that display news in a specific country. Possible Options: ar , au , at , be , br , bg , ca , cn , co , cu, cz,eg, fr,de, gr, hk, hu, in, id, ie, il, it, jp, lv, lb, lt, my, mx, ma, nl, nz, ng, kp, no, pk, ph, pl, pt, ro, ru, sa, rs, sg, sk, si, za, kr, es, se, ch, tw, th, tr, ua, ae, gb, us, ve

category : Find sources that display news of this category. Possible Options: business ,entertainment ,environment, food, health, politics, science, sports, technology, top, world

language : Find sources that display news in a specific language. Possible Options: ar, bs, bg, zh, hr, cs, nl, en, fr, de, el, he, hi, hu, in, it, jp, ko, lv, lt, ms,no, pl, pt, ro, ru, sr, sk, sl, es, sv, th, tr, uk

domain : A comma seperated string of domains (maximum 5) to restrict the search to. Use the /domains endpoint to find top sources id.

q : Keywords or phrases to search for in the news title and content. The value must be URL-encoded. Advance search options: Search Social q=social, Search Social Pizza q=social pizza, Search Social but not with pizza. social -pizza q=social -pizza, Search Social but not with pizza and wildfire. social -pizza -wildfire q=social -pizza -wildfire, Search multiple keyword with AND operator. social AND pizza q=social AND pizza

qInTitle : Keywords or phrases to search for in the news title only.

page : Use this to page through the results if the total results found is greater than the page size.


ARCHIVE NEWS API

GET     /1/archive

API key : Your private Newsdata API key.

country : Find sources that display news in a specific country. Possible Options: ar , au , at , be , br , bg , ca , cn , co , cu, cz,eg, fr,de, gr, hk, hu, in, id, ie, il, it, jp, lv, lb, lt, my, mx, ma, nl, nz, ng, kp, no, pk, ph, pl, pt, ro, ru, sa, rs, sg, sk, si, za, kr, es, se, ch, tw, th, tr, ua, ae, gb, us, ve

category : Find sources that display news of this category. Possible Options: business ,entertainment ,environment, food, health, politics, science, sports, technology, top, world

language : Find sources that display news in a specific language. Possible Options: ar, bs, bg, zh, hr, cs, nl, en, fr, de, el, he, hi, hu, in, it, jp, ko, lv, lt, ms,no, pl, pt, ro, ru, sr, sk, sl, es, sv, th, tr, uk

domain : A comma seperated string of domains (maximum 5) to restrict the search to. Use the /domains endpoint to find top sources id.

from_date : A date and optional time for the oldest article allowed. This should be in ISO 8601 format (e.g. 2021-04-18 or 2021-04-18T04:04:34)

to_date : A date and optional time for the newest article allowed. This should be in ISO 8601 format (e.g. 2021-04-18 or 2021-04-18T04:04:34)

q : Keywords or phrases to search for in the news title and content. The value must be URL-encoded. Advance search options: Search Social q=social, Search Social Pizza q=social pizza, Search Social but not with pizza. social -pizza q=social -pizza, Search Social but not with pizza and wildfire. social -pizza -wildfire q=social -pizza -wildfire, Search multiple keyword with AND operator. social AND pizza q=social AND pizza

qInTitle : Keywords or phrases to search for in the news title only.

page : Use this to page through the results if the total results found is greater than the page size.


NEWS SOURCES API

GET     /1/sources

API key : Your private Newsdata API key.

country : Find sources that display news in a specific country. Possible Options: ar , au , at , be , br , bg , ca , cn , co , cu, cz,eg, fr,de, gr, hk, hu, in, id, ie, il, it, jp, lv, lb, lt, my, mx, ma, nl, nz, ng, kp, no, pk, ph, pl, pt, ro, ru, sa, rs, sg, sk, si, za, kr, es, se, ch, tw, th, tr, ua, ae, gb, us, ve

category : Find sources that display news of this category. Possible Options: business ,entertainment ,environment, food, health, politics, science, sports, technology, top, world

language : Find sources that display news in a specific language. Possible Options: ar, bs, bg, zh, hr, cs, nl, en, fr, de, el, he, hi, hu, in, it, jp, ko, lv, lt, ms,no, pl, pt, ro, ru, sr, sk, sl, es, sv, th, tr, uk


License

Provided under MIT License by Matt Lisivick.


All versions of newsdataapi with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3 || ^7.4 || ^8.0
ext-curl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package newsdataio/newsdataapi contains the following files

Loading the files please wait ....