NOVELTY - Pyrolysis of a feed stream comprising hydrocarbons (M1) involves: (a) the feed stream is fed to pyrolysis reactor operated at temperature sufficient to obtain pyrolysis of at least part of the hydrocarbons, thus producing first gas (pyrolysis gas) and first residue (pyrolysis residue); (b) at least part of the pyrolysis residue is fed to a gasification oven in which the pyrolysis residue is contacted with a gaseous reaction medium, where the oven is operated at temperature higher than the temperature in the step (a), thus producing second gas (coke gas) and second residue (coke residue).    USE - For pyrolysis of a feed stream comprising hydrocarbons originates at least in part from olive seeds, oranges and/or grape skins (claimed). Also used for converting a feed comprising hydrocarbons, such as biomass, into a gaseous product comprising synthesis gas.    ADVANTAGE - The method has high energy conversion efficiency i.e. up to 40-50% energy is converted into work or electricity, high yield of synthesis gas. The high temperatures used in the method which temperatures are generally considered to be undesirable because of high energy losses, were very suitable to increase the yield and/or quality of produced synthesis gas. The method overcomes the prior art method, that only little purification is needed before it can be used in combustion engines, gas engines, or gas turbines.    DETAILED DESCRIPTION - Pyrolysis of a feed stream comprising hydrocarbons (M1) involves: (a) the feed stream is fed to a pyrolysis reactor, which is operated at a temperature sufficient to obtain pyrolysis of at least part of the hydrocarbons, which temperature is at least 400 degrees C to obtain pyrolysis of at least part of the hydrocarbon, thus producing a first gas (pyrolysis gas) and a first residue (pyrolysis residue) which may be solid and/or liquid; (b) at least part of the pyrolysis residue is fed to a gasification oven in which the pyrolysis residue is contacted with a gaseous reaction medium, where the oven is operated at a temperature higher than the temperature in the step (a) and which temperature at least 800 degrees C, thus producing a second gas (coke gas) and a second residue (coke residue), which may be solid and/or liquid. An INDEPENDENT CLAIM is included for apparatus for processing feeds containing hydrocarbons comprising pyrolysis reactor having a gas exit and a solid exit, where the gas exit is connected to at least one piece of equipment for increasing the temperature of the gas and increasing the amount of synthesis gas, while decreasing the amount of hydrocarbon, the exit of which equipment is connected to a quencher, and the solid exit is connected to a gasification reactor having a gas exit, a gas entrance and a gas exit, where the gas exit is connected to at least one piece of equipment for increasing the temperature of the gas and increasing the amount of synthesis gas, while decreasing the amount of hydrocarbon, the exit of which equipment is connected to the quencher.