<p>If you like to get pathways and corresponding genes as simple table format in a plain text file, use <a href="https://www.biostars.org/p/108669/" rel="nofollow noreferrer">GeneSCF</a> 'prepare_database' module. This can be simple solution.</p>

<p><strong>FTP vs API</strong>:</p>

<p>The differences I see is,</p>

<ul>
<li><p>quick access to the updated content via FTP. With that I assume using <a href="https://www.bioinformatics.jp/en/keggftp.html" rel="nofollow noreferrer">FTP version</a> you will have access to weekly database updates. Also bulk download is possible and more convenient via FTP subscription. </p></li>
<li><p>But <a href="https://www.kegg.jp/kegg/rest/" rel="nofollow noreferrer">KEGG REST API</a> updates once in month or two months or a year (not a recently updated contents).</p></li>
</ul>

CC BY-SA 4.0
2018-06-14T14:32:46.360Z
Thanks for your reply, and welcome to the site! That's the kind of information I use but not what I was asking about. But GeneSCF assumes it can access the **whole** KEGG database via API. Could you confirm it?
llrs
CC BY-SA 4.0
2018-06-14T14:38:26.983Z
It uses KEGG REST (https://www.kegg.jp/kegg/rest/keggapi.html) to access data only for specified organism. It never stores or reterives whole KEGG database. Check out [GeneSCF publication] (https://bmcbioinformatics.biomedcentral.com/articles/10.1186/s12859-016-1250-z) for complete details of workflow.
EagleEye
CC BY-SA 4.0
2018-06-14T14:43:54.240Z
I've read the relevant parts of it and it didn't answer my question.
llrs
CC BY-SA 4.0
2018-06-14T14:47:58.413Z
Sorry if that did not answer your question. I thought I answered "**PS: I couldn't find how to download which genes are in which pathways but it might be I didn't expend enough time with the queries.**" this part. Good luck.
EagleEye
CC BY-SA 4.0
2018-06-14T14:55:36.843Z
Oh, that got already answered in the other answer. Thanks, and my apologies
llrs
CC BY-SA 4.0
2018-06-14T15:06:36.040Z
So, the API data is not updated at the same time that the FTP files. That's interesting: Is there any written documentation about this to read more about it?
llrs
CC BY-SA 4.0
2018-06-14T15:15:38.913Z
You click those links I provided. You will get an idea about what I mentioned. There is no direct statement but if you compare those two pages, that's the information I get.
EagleEye
CC BY-SA 4.0
2018-06-14T15:29:29.817Z
I must miss the point, I can only confirm the weekly updated KEGG FTP (on Tuesday JST) , not the update frequency of the KEGG REST API data. Anyway, thanks for your patience (I won't bother you more).
llrs
CC BY-SA 4.0
2018-06-14T14:01:37.717Z
2018-06-14T15:38:16.390Z
2018-06-14T15:38:16.390Z
EagleEye
<p>We implemented <a href="https://github.com/bio2bel/kegg" rel="nofollow noreferrer">Bio2BEL KEGG</a> package to download the KEGG database via its RESTful API</p>

CC BY-SA 4.0
2018-06-21T18:45:40.367Z
Welcome to the site Daniel. Thanks for sharing! I was reading the ComPath article precisely now. But I was not asking if it is possible to download data, but if it is possible to download *all* the database via the API, which apparently it is possible.
llrs
CC BY-SA 4.0
2018-06-21T18:35:11.780Z
2018-06-21T18:44:44.060Z
2018-06-21T18:44:44.060Z
ddomingo
<p>I found the way to download the <a href="http://rest.kegg.jp/link/pathway/hsa" rel="nofollow noreferrer">genes and pathways</a> thanks to this answer using <a href="https://support.bioconductor.org/p/109871/#109959" rel="nofollow noreferrer">KEGGREST</a>. </p>

<p>It seems that the <a href="https://www.kegg.jp/kegg/rest/keggapi.html" rel="nofollow noreferrer">API</a> allows to fully download the database because it allows to download info, list, find, get, conv, link, ddi.</p>

<p>In fact in the message of 2011-05-21 it mentions that the API includes more options to download the KGML files that previously where only possible to get via the FTP site.</p>

CC BY-SA 4.0
2018-06-13T08:25:47.883Z
2018-06-13T08:25:47.883Z
llrs
<p>I was reading the KEGG <a href="https://www.kegg.jp/kegg/docs/plea.html" rel="noreferrer">plea</a> and I found that it doesn't forbid using the KEGG API. Then, what is in the FTP server <a href="https://www.bioinformatics.jp/docs/subscription_personal.pdf" rel="noreferrer">license for personal use/academic use</a> that it is not covered by the API?</p>

<p>Or I could download all the database via the API?</p>

<p>PS: I couldn't find how to download which genes are in which pathways but it might be I didn't expend enough time with the queries.</p>

<database><kegg>
KEGG FTP vs KEGG API
# KEGG FTP vs KEGG API

(Asked by: username_0 on 2018-06-01)

I was reading the KEGG [plea](https://www.kegg.jp/kegg/docs/plea.html) and I found that it doesn't forbid using the KEGG API. Then, what is in the FTP server [license for personal use/academic use](https://www.bioinformatics.jp/docs/subscription_personal.pdf) that it is not covered by the API?

Or I could download all the database via the API?

PS: I couldn't find how to download which genes are in which pathways but it might be I didn't expend enough time with the queries.

**Tags:** database, kegg

---

## 3 answers

### Answer by username_0 on 2018-06-13. Score: 2 | Accepted answer

I found the way to download the [genes and pathways](http://rest.kegg.jp/link/pathway/hsa) thanks to this answer using [KEGGREST](https://support.bioconductor.org/p/109871/#109959).

It seems that the [API](https://www.kegg.jp/kegg/rest/keggapi.html) allows to fully download the database because it allows to download info, list, find, get, conv, link, ddi.

In fact in the message of 2011-05-21 it mentions that the API includes more options to download the KGML files that previously where only possible to get via the FTP site.


---

### Answer by username_1 on 2018-06-14. Score: 1

If you like to get pathways and corresponding genes as simple table format in a plain text file, use [GeneSCF](https://www.biostars.org/p/108669/) 'prepare\_database' module. This can be simple solution.

**FTP vs API**:

The differences I see is,

* quick access to the updated content via FTP. With that I assume using [FTP version](https://www.bioinformatics.jp/en/keggftp.html) you will have access to weekly database updates. Also bulk download is possible and more convenient via FTP subscription.
* But [KEGG REST API](https://www.kegg.jp/kegg/rest/) updates once in month or two months or a year (not a recently updated contents).

> **Comments:**
> **username_0**: Thanks for your reply, and welcome to the site! That's the kind of information I use but not what I was asking about. But GeneSCF assumes it can access the **whole** KEGG database via API. Could you confirm it?  
> **username_1**: It uses KEGG REST (https://www.kegg.jp/kegg/rest/keggapi.html) to access data only for specified organism. It never stores or reterives whole KEGG database. Check out [GeneSCF publication] (https://bmcbioinformatics.biomedcentral.com/articles/10.1186/s12859-016-1250-z) for complete details of workflow.  
> **username_0**: I've read the relevant parts of it and it didn't answer my question.  
> **username_1**: Sorry if that did not answer your question. I thought I answered "**PS: I couldn't find how to download which genes are in which pathways but it might be I didn't expend enough time with the queries.**" this part. Good luck.  
> **username_0**: Oh, that got already answered in the other answer. Thanks, and my apologies  
> **username_0**: So, the API data is not updated at the same time that the FTP files. That's interesting: Is there any written documentation about this to read more about it?  
> **username_1**: You click those links I provided. You will get an idea about what I mentioned. There is no direct statement but if you compare those two pages, that's the information I get.  
> **username_0**: I must miss the point, I can only confirm the weekly updated KEGG FTP (on Tuesday JST) , not the update frequency of the KEGG REST API data. Anyway, thanks for your patience (I won't bother you more).  

---

### Answer by username_2 on 2018-06-21. Score: -1

We implemented [Bio2BEL KEGG](https://github.com/bio2bel/kegg) package to download the KEGG database via its RESTful API

> **Comments:**
> **username_0**: Welcome to the site Daniel. Thanks for sharing! I was reading the ComPath article precisely now. But I was not asking if it is possible to download data, but if it is possible to download *all* the database via the API, which apparently it is possible.  

---

