A traffic flow estimation apparatus comprising: a hardware processor; and a memory, wherein the memory includes a storage unit that stores lane information of a target area whose traffic flow is to be estimated, and the hardware processor is configured to perform: acquiring moving object data that includes a plurality of images and position information and speed information, the plurality of images being captured at a plurality of different timings by a first moving object that is in motion in the target area and including a second moving object around the first moving object, the position information and speed information being of the first moving object at the timings; identifying a lane in which the first moving object is in motion based on the lane information stored in the storage unit and the position information of the first moving object included in the acquired moving object data; calculating, based on the images included in the moving object data, information indicative of a change over time of positions of the second moving object in the images; detecting a positional relationship of the second moving object with respect to the first moving object from the images included in the moving object data to estimate a lane in which the second moving object is in motion based on the positional relationship and the estimated lane in which the first moving object is in motion; and estimating a traffic flow for each lane in the target area based on the speed information of the first moving object included in the moving object data, the information indicative of a change over time of positions of the second moving object, and the estimated lanes in which the first moving object and the second moving object are in motion, wherein estimating the lane in which the second moving object is in motion includes calculating an inclination of a moving direction of the second moving object based on a change in in-image coordinates of the second moving object included in the plurality of images and estimating the lane in which the second moving object is in motion based on the inclination. a hardware processor; and a memory, wherein the memory includes a storage unit that stores lane information of a target area whose traffic flow is to be estimated, and the hardware processor is configured to perform: acquiring moving object data that includes a plurality of images and position information and speed information, the plurality of images being captured at a plurality of different timings by a first moving object that is in motion in the target area and including a second moving object around the first moving object, the position information and speed information being of the first moving object at the timings; identifying a lane in which the first moving object is in motion based on the lane information stored in the storage unit and the position information of the first moving object included in the acquired moving object data; calculating, based on the images included in the moving object data, information indicative of a change over time of positions of the second moving object in the images; detecting a positional relationship of the second moving object with respect to the first moving object from the images included in the moving object data to estimate a lane in which the second moving object is in motion based on the positional relationship and the estimated lane in which the first moving object is in motion; and estimating a traffic flow for each lane in the target area based on the speed information of the first moving object included in the moving object data, the information indicative of a change over time of positions of the second moving object, and the estimated lanes in which the first moving object and the second moving object are in motion, acquiring moving object data that includes a plurality of images and position information and speed information, the plurality of images being captured at a plurality of different timings by a first moving object that is in motion in the target area and including a second moving object around the first moving object, the position information and speed information being of the first moving object at the timings; identifying a lane in which the first moving object is in motion based on the lane information stored in the storage unit and the position information of the first moving object included in the acquired moving object data; calculating, based on the images included in the moving object data, information indicative of a change over time of positions of the second moving object in the images; detecting a positional relationship of the second moving object with respect to the first moving object from the images included in the moving object data to estimate a lane in which the second moving object is in motion based on the positional relationship and the estimated lane in which the first moving object is in motion; and estimating a traffic flow for each lane in the target area based on the speed information of the first moving object included in the moving object data, the information indicative of a change over time of positions of the second moving object, and the estimated lanes in which the first moving object and the second moving object are in motion,