What's the difference between EDirect and E-utilities?

If you have reviewed our Insider’s Guide Overview, you know that E-utilities is an API that lets you search and retrieve data from NCBI databases (like PubMed). E-utilities allows you to query these databases by creating structured URLs. The response that you get to your query depends on how you construct the URL.

EDirect is a software package, developed by NCBI, which includes set of tools that make it easier to use E-utilities. Rather than creating each query by hand, EDirect has the E-utilities URL creation rules built into a series of commands. You execute an EDirect command, and EDirect creates an E-utilities URL, queries the server, and shows you the response. For example:

  • The esearch EDirect command uses the ESearch E-utilities utility.
  • The efetch EDirect command uses the EFetch E-utilities utility.
  • The einfo EDirect command uses the EInfo E-utilities utility.

And so on. It is important to remember that EDirect and E-utilities are different things, though they are related:

  • E-utilities is an API that can be used to access PubMed and other NCBI data.
  • EDirect is a set of tools that allow you to more easily use the E-utilities API in a Unix environment.

It can be helpful to visualize the relationship like this:

A diagram showing the conceptual relationship between Unix, EDirect, E-utilities and PubMed data: E-utilities is an API enabling access to PubMed data; EDirect is a tool that facilitates the use of E-utilities in a Unix enviornment

Reading from the bottom up:

  • Your goal is to access PubMed data.
  • You can use the E-utilities API as a channel to access that data.
  • You can use EDirect as a tool to facilitate the use of E-utilities, but only if…
  • …you are working in a Unix environment.

If you are working in an environment other than Unix, you can still use the E-utilities API. However, since the EDirect software only works in Unix, if you are in a different environment, you will need to use different tools.