Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

edgarquery

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

edgarquery

Downloads various SEC EDGAR files by CIK or ticker. companyfactsshow displays company facts in your browser

  • 0.0.80
  • Source
  • PyPI
  • Socket score

Maintainers
1

EDGARquery

Table of Contents

  • Installation
pip install edgarquery
  • License edgarquery is distributed under the terms of the MIT license.

-[Usage]

edgarquery

EDGAR query is a set of commands for finding, collecting, and visualizing SEC EDGAR data based on CIK or ticker symbol. The possibly most useful command is edgarcompanyfactsshow that collects the company facts for a company, parses, tabulates, and plots each fact, displaying the data in your browser. Others are the edgarlatest10K and edgarlatestsubmission commands that also display in your browsar. edgarlatestsubmissions(note the s on the end) retrieves a list of the latest submissions for a ticker while edgarsubmissions retrieves a list of submissions for some year.

required environmental variable

While EDGAR doesn't require an API key, it does require a proper
HTTP user agent. https://www.sec.gov/os/accessing-edgar-data
The commands that access SEC data require this env variable to be set.

EQEMAIL - required by the SEC to download some of the files with curl.
and used as the user-agent in the url request by the scripts.

These commands retrieve various data from SEC EDGAR. They use a
CIK or Central Index Key or ticker symbol to identify entities
such as companies or insiders - company officers or large stock holders.

Use edgartickerstocsv and edgarcikperson to find CIKs by name
or ticker and then use that CIK or ticker to gather the data of interest.
To display facts for a company aggregated by the SEC, invoke

Usage


##
## edgarquery
##
usage: edgarquery [-h] [--cik CIK] [--ticker TICKER] [--cy CY]
[--frame FRAME] [--units UNITS] [--fact FACT]
[--directory DIRECTORY] [--file FILE] [--companyconcept]
[--companyfacts] [--xbrlframes]
[--companyfactsarchivezip] [--submissionszip]
[--financialstatementandnotesdataset]

query SEC EDGAR site for a ticker or cik NOTE thæt EQEMAIL env variable is
required and must contain a valid User-Agent such as your email address

options:
-h, --help show this help message and exit
--cik CIK 10-digit Central Index Key
--ticker TICKER company stock ticker
--cy CY calendar year e.g. CY2023, CY2023Q1, CY2023Q4I
--frame FRAME reporting frame e.g us-gaap, ifrs-full, dei, srt
--units UNITS USD or shares
--fact FACT fact to collect e.g AccountsPayableCurrent, USD-per-
shares
--directory DIRECTORY
directory to store the output
--file FILE file in which to store the output argument allowed for
each query type if --directory is not provided, it
should be the full path
--companyconcept returns all the XBRL disclosures from a single company
--cik required --frame - default us-gaap --fact -
default USD-per-shares
--companyfacts aggregates one fact for each reporting entity that is
last filed that most closely fits the calendrical
period requested --cik required
--xbrlframes returns all the company concepts data for a CIK --cy
required
--companyfactsarchivezip
returns daily companyfacts index in a zip file
--submissionszip returns daily index of submissions in a zip file
--financialstatementandnotesdataset
returns zip file with financial statement and notes
summaries --cy required


##
## edgarcompanyfactsshow
##
usage: edgarcompanyfactsshow [-h] [--cik CIK] [--ticker TICKER]
[--directory DIRECTORY]

parse EDGAR company facts for a ticker or cik and display them in a browser

options:
-h, --help show this help message and exit
--cik CIK Centralized Index Key for the company
--ticker TICKER Ticker for the company
--directory DIRECTORY
where to store the html file to display


##
## edgarlatestsubmissions
##
usage: edgarlatestsubmissions [-h] [--cik CIK] [--ticker TICKER]
[--directory DIRECTORY] [--file FILE]
[--show]

find the most recent submissions for a ticker or cik

options:
-h, --help show this help message and exit
--cik CIK 10-digit Central Index Key
--ticker TICKER company ticker symbol
--directory DIRECTORY
directory to store the output
--file FILE where to store the output
--show show the 10-K stored in directory to your browser


##
## edgarlatestsubmission
##
usage: edgarlatestsubmission [-h] [--cik CIK] [--ticker TICKER]
[--submission {4,144,10-Q,8-K,13F-HR,3,SD,PX14A6G,DEFA14A,ARS,DEF 14A,SC 13G/A,10-K,S-3ASR,424B5,FWP,PRE 14A,UPLOAD,CORRESP,SC 13G,424B2,IRANNOTICE,S-8,3/A,5,EFFECT,POS AM,424B3,S-4,S-8 POS,N-CSR,N-CSRS}]
[--link] [--directory DIRECTORY] [--show]

find the most recent submission for a ticker or cik for some common
submissƣons.

options:
-h, --help show this help message and exit
--cik CIK 10-digit Central Index Key
--ticker TICKER company ticker symbol
--submission {4,144,10-Q,8-K,13F-HR,3,SD,PX14A6G,DEFA14A,ARS,DEF 14A,SC 13G/A,10-K,S-3ASR,424B5,FWP,PRE 14A,UPLOAD,CORRESP,SC 13G,424B2,IRANNOTICE,S-8,3/A,5,EFFECT,POS AM,424B3,S-4,S-8 POS,N-CSR,N-CSRS}
submission name (N-CSR for mutual fund)
--link return the url for the latest X-K
--directory DIRECTORY
directory to store the output
--show show the X-K stored in directory to your browser


##
## edgarlatest10K
##
usage: edgarlatest10K [-h] [--cik CIK] [--ticker TICKER] [--link]
[--directory DIRECTORY] [--show]

find the most recent 10-K for ticker or cik

options:
-h, --help show this help message and exit
--cik CIK 10-digit Central Index Key
--ticker TICKER company ticker symbol
--link return the url for the latest 10-K
--directory DIRECTORY
directory to store the output
--show show the 10-K stored in directory to your browser


##
## edgarsubmissions
##
usage: edgarsubmissions [-h] [--cik CIK] [--ticker TICKER]
[--year {2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024}]
[--file FILE] [--directory DIRECTORY] [--show]

find the most recent submissions for ticker or cik

options:
-h, --help show this help message and exit
--cik CIK 10-digit Central Index Key
--ticker TICKER company ticker symbol
--year {2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024}
year to search for submissions if not current year
--file FILE store the output in this file
--directory DIRECTORY
store the output in this directory
--show show the 10-K stored in directory to your browser


##
## edgarcikperson
##
usage: cikperson [-h] [--cikpersondb CIKPERSONDB] [--file FILE]

extract CIK and person names from form345 zip files

options:
-h, --help show this help message and exit
--cikpersondb CIKPERSONDB
full path to the sqlite3 database - default in memory
--file FILE where to store the output - default stdout


##
## edgarcompanyconcepttocsv
##
usage: edgarcompanyconcepttocsv [-h] --file FILE [--directory DIRECTORY]

Parse an SEC EDGAR companyconcepts json file after it has been altered to deal
with its multipart character and generate a csv file from its contents

options:
-h, --help show this help message and exit
--file FILE json file to process
--directory DIRECTORY
where to deposit the fileѕ


##
## edgarcompanyfactstocsv
##
usage: edgarcompanyfactstocsv [-h] --file FILE [--directory DIRECTORY]

Parse an SEC EDGAR companyfacts json file after it has been altered to deal
with its multipart character and generate CSV files from its content. I think
that the SEC fixed the multi-json bug

options:
-h, --help show this help message and exit
--file FILE json file to process
--directory DIRECTORY
where to deposit the csv fileѕ


##
## edgarcompanyfactsziptocsv
##
usage: edgarcompanyfactsziptocsv [-h] --zipfile ZIPFILE
[--directory DIRECTORY] [--files FILES]

Extract one or more json files from an SEC EDGAR companyfacts.zip file and
convert to CSV

options:
-h, --help show this help message and exit
--zipfile ZIPFILE submissions.zip file to process. Іt can be downloadæd
with edgarquery.query
--directory DIRECTORY
where to deposit the output
--files FILES comma separated(no spaces) content file(s) to process
a subset of the files in the zip file


##
## edgarsubmissionsziptocsv
##
usage: edgarsubmissionsziptocsv [-h] [--zipfile ZIPFILE]
[--directory DIRECTORY] [--files FILES]

Extract one or more json files from an SEC EDGAR submissions.zip file and
convert to CSV

options:
-h, --help show this help message and exit
--zipfile ZIPFILE submissions.zip file to process - required
--directory DIRECTORY
where to deposit the output
--files FILES comma separated(no spaces) content file(s) to process
a subset of the files in the zip file


##
## edgartickerstocsv
##
usage: edgartickerstocsv [-h] [--directory DIRECTORY]

collect EDGAR companyticker json files and convert them to csv

options:
-h, --help show this help message and exit
--directory DIRECTORY
where to deposit the fileѕ


##
## edgarxbrlframestocsv
##
usage: edgarxbrlframestocsv [-h] --file FILE [--directory DIRECTORY]

Parse an SEC EDGAR xbrlframes json file after it has been altered to deal with
its multipart character and generate a csv file from its contents

options:
-h, --help show this help message and exit
--file FILE xbrl frames json file to process
--directory DIRECTORY
where to deposit the output

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc