# Http Source

**URL:** https://forum.kx.com/t/http-source/11380
**Category:** Community Support
**Tags:** kdb-and-q
**Created:** [November 26, 2016, 1:50pm UTC](https://forum.kx.com/t/http-source/11380 "2016-11-26T13:50:00Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![hoffmanroni1](https://avatars.discourse-cdn.com/v4/letter/h/8dc957/32.png) [@hoffmanroni1](https://forum.kx.com/u/hoffmanroni1)
#### Post date: [November 26, 2016, 1:50pm UTC](https://forum.kx.com/t/http-source/11380/1 "2016-11-26T13:50:00Z")

</div>

Is there a way to pull the source text from a website directly into q? &nbsp;

Havent seen it on the reference site.

Thanks

---

<div class="post-metadata">

### Author: ![Nick10](https://avatars.discourse-cdn.com/v4/letter/n/e68b1a/32.png) [@Nick10](https://forum.kx.com/u/Nick10)
#### Post date: [November 26, 2016, 3:29pm UTC](https://forum.kx.com/t/http-source/11380/2 "2016-11-26T15:29:00Z")

</div>

```
as of 2016.05.12, version 3.4 added:.Q.hg, http get. e.g.

to get historical prices of FD plc:

q)("DFFFFJ";1#",") 0:3_.Q.hg `$":[http://www.google.com/finance/historical?q=LON%3AFDP&output=csv]("http://www.google.com/finance/historical?q=LON%3AFDP&output=csv")"
Date Open High Low Close Volume
----------------------------------------------
2016.11.25 2123 2123 2100 2103 21
2016.11.24 2114.6 2114.6 2113.8 2113.8 0
2016.11.23 2125 2125 2106.75 2124 156
2016.11.22 2125 2125 2100 2125 193
2016.11.21 2124 2125 2100 2124 3089
..

```

---

<div class="post-metadata">

### Author: ![hoffmanroni1](https://avatars.discourse-cdn.com/v4/letter/h/8dc957/32.png) [@hoffmanroni1](https://forum.kx.com/u/hoffmanroni1)
#### Post date: [November 26, 2016, 6:08pm UTC](https://forum.kx.com/t/http-source/11380/3 "2016-11-26T18:08:00Z")

</div>

Perfect, that helps thanks Nick

---

<div class="post-metadata">

### Author: ![neethakdb](https://avatars.discourse-cdn.com/v4/letter/n/9fc29f/32.png) [@neethakdb](https://forum.kx.com/u/neethakdb)
#### Post date: [June 9, 2017, 10:51am UTC](https://forum.kx.com/t/http-source/11380/4 "2017-06-09T10:51:00Z")

</div>

Hi Nick,

trying to get data from website to q ,but not successful.

for example, using below :

```
("DFFFFJ";1#",") 0:3_.Q.hg `$":[http://www.google.com/<wbr>finance/historical?q=LON%<wbr>3AFDP&amp;output=csv</wbr></wbr>]("http://www.google.com/finance/historical?q=LON%3AFDP&output=csv")"

gives '.Q.hg output on console.

any help will be appreciated.

Thanks

Neetha

```

---

<div class="post-metadata">

### Author: ![sieber](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@sieber](https://forum.kx.com/u/sieber)
#### Post date: [June 9, 2017, 11:09am UTC](https://forum.kx.com/t/http-source/11380/5 "2017-06-09T11:09:00Z")

</div>

On Friday, June 9, 2017 at 11:56:04 AM UTC+2, Neetha wrote:

> Hi Nick,
> 
> trying to get data from website to q ,but not successful.
> 
> for example, using below :
> 
> (“DFFFFJ”;1#“,”) 0:3\_.Q.hg `$“:http://www.google.com/finance/historical?q=LON%3AFDP&output=csv”
> 
> gives '.Q.hg output on console.
> 
> any help will be appreciated.
> 
> Thanks
> 
> Neetha
> 
> >

Hi, you are probably using an older kdb version. You can download the newest version from [kx.com](http://kx.com)

Markus

---

<div class="post-metadata">

### Author: ![VA1](https://avatars.discourse-cdn.com/v4/letter/v/7bcc69/32.png) [@VA1](https://forum.kx.com/u/VA1)
#### Post date: [June 9, 2017, 2:01pm UTC](https://forum.kx.com/t/http-source/11380/6 "2017-06-09T14:01:00Z")

</div>

Hi guys,&nbsp;

Is there any way I could come to a website like this:&nbsp;[https://www.instituteforsupplymanagement.org/ismreport/mfgrob.cfm?SSO=1](https://www.instituteforsupplymanagement.org/ismreport/mfgrob.cfm?SSO=1) and pull out first 5 rows from the “MANUFACTURING AT A GLANCE”&nbsp;table on that website?&nbsp;

Or from &nbsp;WallStreet Journal website&nbsp;

Regards, VA

---

<div class="post-metadata">

### Author: ![neethakdb](https://avatars.discourse-cdn.com/v4/letter/n/9fc29f/32.png) [@neethakdb](https://forum.kx.com/u/neethakdb)
#### Post date: [June 9, 2017, 3:02pm UTC](https://forum.kx.com/t/http-source/11380/7 "2017-06-09T15:02:00Z")

</div>

Hi Marcus,

Thanks for immediate response, you’re right, mine is older version 3.3 and upgraded to version 3.5 just now and&nbsp;

got below display and output.

[root@oracle ~]# q -p 5000

KDB+ 3.5 2017.05.02 Copyright (C) 1993-2017 Kx Systems

l32/ 1()core 1010MB root oracle 127.0.0.1 NONEXPIRE &nbsp;

Welcome to kdb+ 32bit edition

q)(“DFFFFJ”;1#“,”) 0:3\_.Q.hg `$“:[http://www.google.com/finance/historical?q=LON%3AFDP&output=csv](http://www.google.com/finance/historical?q=LON%3AFDP&output=csv)”

Date &nbsp; &nbsp; &nbsp; Open High &nbsp; &nbsp;Low &nbsp; &nbsp; Close &nbsp; Volume

* * *

2017.06.08 3124 3130.24 2932.23 3044 &nbsp; &nbsp;9541 &nbsp;

2017.06.07 3100 3150 &nbsp; &nbsp;3076 &nbsp; &nbsp;3082 &nbsp; &nbsp;8051 &nbsp;

2017.06.06 3156 3200 &nbsp; &nbsp;2878 &nbsp; &nbsp;3125 &nbsp; &nbsp;2766 &nbsp;

2017.06.05 3124 3135 &nbsp; &nbsp;3100 &nbsp; &nbsp;3101 &nbsp; &nbsp;2970 &nbsp;

2017.06.02 3127 3135 &nbsp; &nbsp;3100 &nbsp; &nbsp;3102 &nbsp; &nbsp;585 &nbsp;&nbsp;

2017.06.01 3149 3149 &nbsp; &nbsp;3100 &nbsp; &nbsp;3100 &nbsp; &nbsp;6347 &nbsp;

2017.05.31 3160 3175.5 &nbsp;3101 &nbsp; &nbsp;3103 &nbsp; &nbsp;792 &nbsp;&nbsp;

2017.05.30 3050 3180 &nbsp; &nbsp;3024.4 &nbsp;3135 &nbsp; &nbsp;4643 &nbsp;

2017.05.26 3050 3123 &nbsp; &nbsp;3029.5 &nbsp;3123 &nbsp; &nbsp;4757 &nbsp;

2017.05.25 2996 3017 &nbsp; &nbsp;2953 &nbsp; &nbsp;3000 &nbsp; &nbsp;7901 &nbsp;

2017.05.24 2990 3049 &nbsp; &nbsp;2961.8 &nbsp;3002 &nbsp; &nbsp;3274 &nbsp;

2017.05.23 2810 2983.3 &nbsp;2810 &nbsp; &nbsp;2949.37 20170&nbsp;

2017.05.22 2724 2802 &nbsp; &nbsp;2701 &nbsp; &nbsp;2802 &nbsp; &nbsp;3412 &nbsp;

2017.05.19 2555 2700 &nbsp; &nbsp;2535 &nbsp; &nbsp;2597.63 15742&nbsp;

2017.05.18 2510 2543.25 2485 &nbsp; &nbsp;2522 &nbsp; &nbsp;1710 &nbsp;

2017.05.17 2550 2550 &nbsp; &nbsp;2490 &nbsp; &nbsp;2490 &nbsp; &nbsp;5302 &nbsp;

2017.05.16 2560 2570.3 &nbsp;2540 &nbsp; &nbsp;2540 &nbsp; &nbsp;6554 &nbsp;

2017.05.15 2502 2560 &nbsp; &nbsp;2502 &nbsp; &nbsp;2560 &nbsp; &nbsp;2455 &nbsp;

2017.05.12 2560 2560 &nbsp; &nbsp;2501 &nbsp; &nbsp;2559 &nbsp; &nbsp;682 &nbsp;&nbsp;

2017.05.11 2571 2600 &nbsp; &nbsp;2550 &nbsp; &nbsp;2569 &nbsp; &nbsp;2768 &nbsp;

..

q)

Thanks a lot.

Regards

Neetha
