curl https://financialmodelingprep.com/api/v3/fmp/articles?page=0&size=5&apikey=YOUR_API_KEY
{
"content" : [
{
"title" : "Soros Fund Management Has Also Invested in Bitcoin",
"date" : "2021-10-08 14:07:00",
"content" : "<p>Bitcoin continues to trade around $54,000 today following its solid upsurge since the start of the month.</p>
<p>Dawn Fitzpatrick, the CEO and CIO of Soros Fund Management, founded by billionaire investor George Soros, said that they have also invested in Bitcoin and other digital currencies, as cryptos has gone mainstream and are not only viewed as an inflation hedge.</p>
<p>In March, Fitzpatrick commented on CBDCs, viewing them as a potential threat to Bitcoin, however noting that the threat will be temporary as she believes CBDCs won’t be successful in permanently destabilizing bitcoin.</p>
",
"tickers" : "BTCUSD",
"image" : "https://cdn.financialmodelingprep.com/images/fmp-1633716457854.jpg",
"link" : "https://financialmodelingprep.com/market-news/fmp-soros-fund-management-has-also-invested-in-bitcoin",
"author" : "Davit Kirakosyan",
"site" : "Financial Modeling Prep"
}, {
"title" : "Allogene Therapeutics Shares Plunged 45% Following FDA’s Hold on AlloCAR T",
"date" : "2021-10-08 13:06:00",
"content" : "<p><a href='https://financialmodelingprep.com/financial-summary/ALLO'>Allogene Therapeutics, Inc. (NASDAQ:ALLO) </a>shares dropped more than 45% on Friday following the U.S. Food and Drug Administration’s (FDA) halt on the company’s AlloCAR T clinical trials after the detection of AlloCAR cells with chromosomal abnormality in a single patient treated with ALLO-501A. </p>
<p>Rafael Amado, Executive Vice President of Research and Development and Chief Medical Officer of Allogene, said that they will work closely with the FDA to determine the next steps for advancing ALLO-501A. As the company investigates the issue, the analysts at Oppenheimer think that there will be delayed development timelines for key programs including ALLO-501A and ALLO-715, estimating the holds to range from 3 to 6 months.</p>
<p>Following this announcement, the analysts lowered their price target on the company’s shares to $40 from $44, while maintaining their outperform rating.</p>
",
"tickers" : "NASDAQ:ALLO",
"image" : "https://cdn.financialmodelingprep.com/images/fmp-1633712793569.jpg",
"link" : "https://financialmodelingprep.com/market-news/fmp-allogene-therapeutics-shares-plunged-45-following-fda’s-hold-on-allocar-t",
"author" : "Davit Kirakosyan",
"site" : "Financial Modeling Prep"
}, ...
],
"pageable" : {
"sort" : {
"sorted" : true,
"unsorted" : false,
"empty" : false
},
"pageSize" : 5,
"pageNumber" : 0,
"offset" : 0,
"paged" : true,
"unpaged" : false
},
"totalPages" : 30,
"totalElements" : 150,
"last" : false,
"number" : 0,
"size" : 5,
"numberOfElements" : 5,
"sort" : {
"sorted" : true,
"unsorted" : false,
"empty" : false
},
"first" : true,
"empty" : false
}
URL url = new URL("");
try (BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream(), "UTF-8"))) {
for (String line; (line = reader.readLine()) != null;) {
System.out.println(line);
}
}
set_time_limit(0);
$url_info = "";
$channel = curl_init();
curl_setopt($channel, CURLOPT_AUTOREFERER, TRUE);
curl_setopt($channel, CURLOPT_HEADER, 0);
curl_setopt($channel, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($channel, CURLOPT_URL, $url_info);
curl_setopt($channel, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($channel, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
curl_setopt($channel, CURLOPT_TIMEOUT, 0);
curl_setopt($channel, CURLOPT_CONNECTTIMEOUT, 0);
curl_setopt($channel, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($channel, CURLOPT_SSL_VERIFYPEER, FALSE);
$output = curl_exec($channel);
if (curl_error($channel)) {
return 'error:' . curl_error($channel);
} else {
$outputJSON = json_decode($output);
var_dump($outputJSON);
}
const https = require('https')
const options = {
hostname: 'financialmodelingprep.com',
port: 443,
path: '',
method: 'GET'
}
const req = https.request(options, (res) => {
res.on('data', (d) => {
process.stdout.write(d)
})
})
req.on('error', (error) => {
console.error(error)
})
req.end()
#!/usr/bin/env python
try:
# For Python 3.0 and later
from urllib.request import urlopen
except ImportError:
# Fall back to Python 2's urllib2
from urllib2 import urlopen
import certifi
import json
def get_jsonparsed_data(url):
"""
Receive the content of ``url``, parse it as JSON and return the object.
Parameters
----------
url : str
Returns
-------
dict
"""
response = urlopen(url, cafile=certifi.where())
data = response.read().decode("utf-8")
return json.loads(data)
url = ("")
print(get_jsonparsed_data(url))
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
)
func main() {
url := ""
response, err := http.Get(url)
if err != nil {
log.Fatal(err)
}
defer response.Body.Close()
responseData, err := ioutil.ReadAll(response.Body)
if err != nil {
log.Fatal(err)
}
responseString := string(responseData)
fmt.Println(responseString)
}
require 'net/http'
require 'uri'
uri = URI.parse("")
request = Net::HTTP::Get.new(uri)
request["Upgrade-Insecure-Requests"] = "1"
req_options = {
use_ssl: uri.scheme == "https",
}
response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
http.request(request)
end
# response.code
# response.body
using (var httpClient = new HttpClient())
{
using (var request = new HttpRequestMessage(new HttpMethod("GET"), ""))
{
request.Headers.TryAddWithoutValidation("Upgrade-Insecure-Requests", "1");
var response = await httpClient.SendAsync(request);
}
}
require(httr)
headers = c(
`Upgrade-Insecure-Requests` = '1',
)
params = list(
`datatype` = 'json'
)
res <- httr::GET(url = 'https://financialmodelingprep.com/api/v3/fmp/articles?page=0&size=5', httr::add_headers(.headers=headers), query = params)
version: 2
requests:
curl_converter:
request:
url: 'https://financialmodelingprep.com/api/v3/fmp/articles?page=0&size=5'
method: GET
headers:
-
name: Upgrade-Insecure-Requests
value: '1'
-
queryString:
-
name: datatype
value: json
extern crate reqwest;
use reqwest::headers::*;
fn main() -> Result<(), reqwest::Error> {
let mut headers = HeaderMap::new();
headers.insert(UPGRADE_INSECURE_REQUESTS, "1".parse().unwrap());
let res = reqwest::Client::new()
.get("")
.headers(headers)
.send()?
.text()?;
println!("{}", res);
Ok(())
}
import PlaygroundSupport
import Foundation
let url = URL(string: "")
var request = URLRequest(url: url!)
request.addValue("application/json", forHTTPHeaderField: "Accept")
let task = URLSession.shared.dataTask(with: url!) { data, response, error in
guard error == nil else {
print(error!)
return
}
guard let data = data else {
print("Data is empty")
return
}
let json = try! JSONSerialization.jsonObject(with: data, options: [])
print(json)
}
task.resume()
PlaygroundPage.current.needsIndefiniteExecution = true
import scala.io.Source.fromURL
val json = fromURL("").mkString
print(json)