Is it generally known that the record was not found? For example, people enter the name of the city, and then if the name is not found, can you give them alternatives? If so, then I would return 200 pages containing a new request box, etc.
If this is a web service, then 404 is fine, if all you want your api to return in such cases is "not found". But if you want your api to additionally return other information, then 200 (plus an error code without success and other information) is the way to go.
source share