
Dietary fiber per serving and per 100 g, split into soluble and insoluble, for ~200 common foods.
FiberUp Fiber Database API is a free Food & Drink API that requires no API key, is served over HTTPS and supports CORS, so it can be called from the browser.
Download fiber data for 198 common foods as CSV or JSON, or read it from a JSON API with no key. Per serving, per 100 g, soluble and insoluble. CC BY 4.0.
Details from fiberup.app.

Unified API suite · now live
Geocode an address, validate an email, track a flight or pull stock data with one account, one dashboard and one API key.
The FiberUp Fiber Database API is provided by FiberUp (fiberup.app). Download fiber data for 198 common foods as CSV or JSON, or read it from a JSON API with no key. Per serving, per 100 g, soluble and insoluble. CC BY 4.0.
Yes. The FiberUp Fiber Database API is listed in the Food & Drink category of the public-apis directory, which only includes APIs that are free or have a free tier. Check its documentation for rate limits and paid plans.
No. The FiberUp Fiber Database API requires no authentication, so you can start making requests without signing up.
Yes. The FiberUp Fiber Database API supports CORS, so front-end JavaScript can call it directly.
Yes. The FiberUp Fiber Database API is served over HTTPS, so it's safe to use in production.