NCBI Datasets API


NCBI Datasets API

### NCBI Datasets is a resource that lets you easily gather data from NCBI. The Datasets API is still in alpha, and we’re updating it often to add new functionality, iron out bugs and enhance usability. For some larger downloads, you may want to download a [dehydrated bag](, and retrieve the individual data files at a later time. # noqa: E501

The version of the OpenAPI document: v1 Generated by:


Bases: io.IOBase


Returns a dictionary of the response headers.

getheader(name, default=None)

Returns a given response header.

class, pools_size=4, maxsize=None)

Bases: object

request(method, url, query_params=None, headers=None, body=None, post_params=None, _preload_content=True, _request_timeout=None)

Perform requests.

  • method – http request method

  • url – http request url

  • query_params – query parameters in the url

  • headers – http request headers

  • body – request json body, for application/json

  • post_params – request post parameters, application/x-www-form-urlencoded and multipart/form-data

  • _preload_content – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

GET(url, headers=None, query_params=None, _preload_content=True, _request_timeout=None)
HEAD(url, headers=None, query_params=None, _preload_content=True, _request_timeout=None)
OPTIONS(url, headers=None, query_params=None, post_params=None, body=None, _preload_content=True, _request_timeout=None)
DELETE(url, headers=None, query_params=None, body=None, _preload_content=True, _request_timeout=None)
POST(url, headers=None, query_params=None, post_params=None, body=None, _preload_content=True, _request_timeout=None)
PUT(url, headers=None, query_params=None, post_params=None, body=None, _preload_content=True, _request_timeout=None)
PATCH(url, headers=None, query_params=None, post_params=None, body=None, _preload_content=True, _request_timeout=None)
Generated October 22, 2021