Nearly 4000 US oil and gas companies may have received more than $4 billion in total from a federal programme meant to help small businesses stay afloat and retain jobs in the current market downturn, government data show.

The US Small Business Administration released information earlier this week about businesses that have received loans through the President Donald Trump administration's Paycheck Protection Program unveiled earlier this year.

The plan was intended to help small businesses financially, although critics have questioned whether funds are going to companies that actually need them, or if the funding will be used to keep workers employed.

Entities attached to celebrities including rapper Kanye West and film actor Reese Witherspoon have received funds, according to reports.

Oil and gas companies receiving funds include Llog Exploration, which received between $2 million and $5 million, and W&T Offshore, which received between $5 million and $10 million. Onshore-focused Mach Resources, led by SandRidge Energy founder and Chesapeake Energy co-founder Tom Ward, also received up to $5 million.

The data does not include information on loans under $150,000.

Upstream compiled a database of companies classified as oil and gas extraction players and services providers and found that, of the $520 billion authorised by the federal government for small business loans, as much as $4.66 billion were received by 3938 players in the sector. The companies estimate the funding helped them keep 166,771 jobs.

The database is searchable below.