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.
Download newsdataio/newsdataapi
More information about newsdataio/newsdataapi
Files in newsdataio/newsdataapi
Package newsdataapi
Short Description Official PHP client (SDK) for the Newsdata.io News API — fetch real-time, historical, crypto, and stock-market news via REST with validation, retries, and error handling.
License MIT
Homepage https://newsdata.io
Informations about the package newsdataapi

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.
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
ext-curl Version *
ext-json Version *