Command Line Interface

The secedgar project also provides an easy to use command line interface. This helps to easily download filings from EDGAR without writing any code.

In order to use the CLI, make sure you have click installed as a dependency. When installing from PyPi, you can pip install secedgar[cli].

secedgar

Main CLI group.

Args:

ctx (click.core.Context): Click context. user_agent (str): User agent string to pass.

Returns:

None

secedgar [OPTIONS] COMMAND [ARGS]...

Options

-u, --user-agent <user_agent>

Required Value used for HTTP header “User-Agent” for all requests.

daily

Click command for downloading daily filings. Run secedgar daily --help for info.

Args:

ctx (click.core.Context): Click context. date (str): Date to look up daily filings for. Should be in the format YYYYMMDD. directory (str): Directory where files should be saved.

Defaults to current working directory.

secedgar daily [OPTIONS]

Options

-d, --date <date>

Required Date to look up daily filings for. Should be in the format YYYYMMDD.

--directory <directory>

Directory where files will be saved. Defaults to directory from which CLI is being executed.

filing

Click command for downloading filings. Run secedgar filing --help for info.

Args:

ctx (click.core.Context): Click context. lookups (str): Companies and tickers to include in filing download. ftype (str): String of FilingType enum. start (str): Start date for filings in YYYYMMDD format.

Will implicitly default to first available filing.

end (str): End date for filings in YYYYMMDD format.

Will implicitly default to today.

count (int): Number of filings to save per ticker/company. directory (str): Directory where files should be saved.

Defaults to current working directory.

Returns:

None

secedgar filing [OPTIONS]

Options

-l, --lookups <lookups>

Required Companies and tickers to include in filing download.

-t, --ftype <ftype>

Required Choose a filing type. See secedgar.core.FilingType for a full list of available enums. Should be of the form FILING_<filing type>.

-s, --start <start>

Start date for filings. Should be in the format YYYYMMDD. Defaults to first available filing.

-e, --end <end>

End date for filings. Should be in the format YYYYMMDD. Defaults to today.

-n, --count <count>

Number of filings to save. Defaults to all.

--directory <directory>

Directory where files will be saved. Defaults to directory from which CLI is being executed.