Heterocyclic carboxylic acids or their salts or derivatives are prepared by reacting heterocyclic compounds of aromatic character which contain at least two nitrogen atoms in the ring and also at least one hydrogen atom linked to a ring carbon atom, with carbon dioxide at elevated temperature and in the presence of acid-binding substances. Salts of mono- or poly-basic acids are formed which may be converted into the free acids or derivatives thereof. Suitable starting materials include imidazole, pyrazole, 1,2,4-triazole, 1,2,3-triazole, pyrazine, pyrimidine, pyridazine, triazines, tetrazines and substitution products, e.g. alkyl substitution products thereof. The monocarboxylic acids or their salts or derivatives are suitable substitution products. When these are used a migration of the original carboxyl group may occur as well as carboxylation. The preferred acidbinding substances are the alkali metal carbonates particularly potassium carbonate. The carbonates of magnesium, calcium and monovalent thallium are also suitable. Instead of carbonates, oxides, hydroxides, bicarbonates, formates or oxalates may be used. The acidbinding agents should preferably be anhydrous. The quantity used is at least that theoretically necessary for the mono- or di-carboxylic acid salt, but is advantageously 10-100 per cent or more in excess. Temperatures are generally above 150 DEG C., usually optionally 200-350 DEG C. Different products may be formed at different temperatures from the same starting materials. The initial products may sometimes undergo partial decarboxylation. The process is suitably carried out under pressure, advantageously with excess carbon dioxide. The carbon dioxide may be diluted by inert gases, e.g. nitrogen. The reaction may also be carried out without pressure, e.g. by passing the vapour of the heterocyclic starting material together with CO2 over heated potassium carbonate, or by allowing CO2 to act on a heated mixture of the heterocyclic compound and K2CO3. Catalysts may be present, advantageously zinc, cadmium, lead, mercury or iron or their compounds such as the oxides or salts with inorganic or organic acids. The amount of catalyst may vary within wide limits, e.g. 0-15 per cent, preferably 0.5 to 5 per cent by weight, referred to the reaction mixture. Inert fillers may be added to the reaction mixture, e.g. sand, finely-divided carbon, kieselguhr, bentonite, metal powders or turnings and inert salts, e.g. sodium sulphate, potassium sulphate and calcium carbonate. Organic solvents or diluents, such as pyridine, dioxan, tetrahydrofuran, benzene, toluene, xylene, and high boiling petrols may also be present. The free acids may be obtained by acidifying an aqueous solution of the reaction mixture after filtration and if desired treatment with active carbon or other decolorizing agent, to a suitable pH, e.g. with HCl, H2SO4 or other strong acid. It is often advantageous to carry out this acidification with CO2 since the potassium is thus recovered as carbonate or bicarbonate and can be used again for the reaction. In some cases the low solubility of the potassium salts in saturated potassium carbonate solution may be utilized in isolating the products. In addition, the crude reacton product may be worked up directly into derivatives of the carboxylic acids formed, e.g. into their chlorides or esters, by known methods. In examples the following are prepared by heating carbon dioxide under pressure with a mixture of the starting material and the salt(s) etc.; HCl is used as the acid in working up the products: (1) monopotassium imidazole - 4,5 - dicarboxylate and the free acid from imidazole in the presence of potassium carbonate and cadmium fluoride; (2) monopotassium imidazole-4,5-dicarboxylate from imidazole in the presence of potassium carbonate; (3) pyrazole-3,5-dicarboxylic acid from pyrazole in the presence of potassium carbonate and cadmium chloride; (5) pyrazine-2,5-dicarboxylic acid from pyrazine in the presence of potassium carbonate and cadmium carbonate; (6) monopotassium imidazole-4,5-dicarboxylate from imidazole in the presence of potassium carbonate and benzene or dioxan; (7) monopotassium 1,2,4-triazole-3,5-dicarboxylate and 1,2,4-triazole monocarboxylic acid from 1,2,4-triazole in the presence of potassium carbonate; (8) 1,2,4 - triazole - carboxylic acid from 1,2,4 - triazole in the presence of sodium carbonate; (9) dipotassium and monopotassium 1,2,4-triazole-3,5-dicarboxylate from 1,2,4-triazole in the presence of potassium carbonate; (10) pyrazole-4-carboxylic acid from pyrazole in the presence of potassium carbonate and cadmium fluoride; (11) monopotassium 2-methyl - imidazole - 4,5 - dicarboxylate from 2-methylimidazole in the presence of potassium carbonate and cadmium fluoride; (12) monopotassium 2-propylimidazole-4,5-dicarboxylate from 2-propylimidazole in the presence of potassium carbonate; (13) indazole-3-carboxylic acid from indazole in the presence of potassium carbonate; (14) 3-amino-1,2,4-triazole-5-carboxylic acid from 3-amino-1,2,4-triazole in the presence of potassium carbonate and cadmium fluoride; (15) monopotassium imidazole-4,5-dicarboxylate from imidazole hydrochloride in the presence of potassium carbonate and cadmium fluoride; (16) monopotassium 1,2,4-triazole-3,5-dicarboxylate from 1,2,4-triazole-monohydrochloride in the presence of potassium carbonate and cadmium fluoride; (17) monopotassium imidazole-4,5-dicarboxylate from imidazole in the presence of anhydrous caustic potash and cadmium fluoride; in Example (4) monopotassium imidazole-4,5-dicarboxylate is obtained by heating a mixture of imidazole, potassium carbonate and K2CdCl2F2 in a stream of carbon dioxide at atmospheric pressure and working up the mixture with HCl.