In a major trading deal demonstrating its eager search for new industrial markets, Japan, signed a $20 billion, eight-year trade agreement since World War II.

Each nation is to buy a $10 billion worth of goods from the other. Japan will sell heavy equipment, entire industrial plants, construction material and equipment, and technology to China. In return, it will buy oil and coal.

Negotiated in a series of meetings over the past six months, the agreement was approved at a ceremony in Peking by a delegation of Japanese businessmen and Chinese government officials.

Their communique stipulated that the agreement must result in equal benefits for each country and that the exact prices of goods sold will be determined later.

The agreement is regarded by analysts here as an important milestone in the increasingly close Japan-China relationship that has grown up since diplomatic relations were resumed in 1972. Although the two governments are still quibbling over terms of a new peace and friendship treaty, the trade [WORD ILLEGIBLE] signed yesterday is of more importance in terms of immediate economic benefits.

It gives Japan a foothold in a major industrial market at a time when its own heavy industries are running far below capacity and when it fears many of its exports are going to be gradually shut out of western markets by protectionist forces in both the United States and Europe.

For the Chinese, economists here believe the agreement represents a major move by the new Peking Leadership to build a new industrial base from scratch. Its willingness to go abroad for the essentials is regarded as evidence of a new pragmatism.

In this case, China wanted to act fast, specifying that virtually all of the plants, machinery and technical know-how are to be imported during the first five years of the eight-year agreement. Although the exact purchases are not yet known, one major item is expected to be a large new steel plant to be erected near Shanghai.

The sale of heavy construction equipment and whole industrial plants is expected to give a big shot in the arm to Japan's steel industry, which is operating at about 70 percent of capacity, partly because of fierce resistance to exports to the United States.

To gain the new market in China, Japan had to give ground. It does not especially need the large amounts of coking coal China is selling because the steel furnaces that use coal are already running only part time.

Moreover, the oil being bought from China is an inferior, extremely waxy type that will require expensive new facilities to refine. Early in the negotiations, Japan had protested that its oil sources in the Middle East and Indonesia are plentiful for the near future.

China insisted it could not buy the industrial goods if it could not sell Japan the oil and coal and Japan acceded. The Japanese went a step further and offered a financial deal to permit China, which has severe foreign exchange problems, to defer payment over a period of years.

For Japan's part, the negotiations were handled by a private committee of businessmen, headed by Yoshihiro Inayama, president of Nippon Steel Corp. The Japanese government official sat on the sidelines, nominally offering its support when the deal was almost complete.

Observers here explained that the Japanese government was actually enthusiastic about the trade agreement but did not want to negotiate it, preferring that private industry be held liable for the trade contracts involved. It was signed by Inayama and China's vice foreign trade minister, Liu Hsi-wen.

China initially asked for the most favorable possible financing terms to pay for the Japanese products. By late yesterday, it appeared that Japan had agreed to the principle of deferred payments and was prepared to loan China some of the money to make those payments. Officials said the interest would be no lower than 7.5 percent.

Japan's trade with China has been growing swiftly in the past five years and picked up remarkably late in 1977 as the new government in Peking made decisions to buy abroad. Japan's exports to China amounted to about $2 billion last year and that level will be either maintained or increased in the foreseeable future, experts agree. In addition to that normal trade, the new agreement will add $10 billion in the next five years, doubling the total export value.

Details of the agreement released here yesterday show that Japan will export $7 billion to $8 billion plants and technology and $2 billion or $3 billion in construction materials and equipment during the first five years.

In the same period, Japan will buy 330 million barrels of crude oil, between 3.3 million and 8.9 million tons of coal for electricity-generating plants, and 37.1 million barrels of coking coal for steel-making plants.

The agreement calls for representatives of both countries to meet annually to work for the last three years of the agreement are to be determined in 1981.