{"id":36571750,"url":"https://github.com/marcortola/food-data-central","last_synced_at":"2026-01-12T07:18:26.948Z","repository":{"id":43822665,"uuid":"264422136","full_name":"marcortola/food-data-central","owner":"marcortola","description":"PHP library for the FoodData Central FDC API (USDA nutrient database)","archived":false,"fork":false,"pushed_at":"2023-02-27T12:47:52.000Z","size":48,"stargazers_count":4,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-08T15:39:17.588Z","etag":null,"topics":["fdc","food-data","food-data-central","nutrient-database","usda","usda-nutrient-database"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marcortola.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-05-16T11:29:43.000Z","updated_at":"2021-07-10T19:44:49.000Z","dependencies_parsed_at":"2022-09-21T01:01:22.649Z","dependency_job_id":"dbdbc45d-7ae3-4237-aec5-b491fd425783","html_url":"https://github.com/marcortola/food-data-central","commit_stats":{"total_commits":15,"total_committers":1,"mean_commits":15.0,"dds":0.0,"last_synced_commit":"36f674aea7af63a2a9ffb946d107fde4e9a541fb"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/marcortola/food-data-central","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcortola%2Ffood-data-central","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcortola%2Ffood-data-central/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcortola%2Ffood-data-central/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcortola%2Ffood-data-central/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcortola","download_url":"https://codeload.github.com/marcortola/food-data-central/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcortola%2Ffood-data-central/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28336485,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fdc","food-data","food-data-central","nutrient-database","usda","usda-nutrient-database"],"created_at":"2026-01-12T07:18:26.324Z","updated_at":"2026-01-12T07:18:26.943Z","avatar_url":"https://github.com/marcortola.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Community API client for the Food Data Central USDA nutrient database\n\n[![Latest Version](https://img.shields.io/github/release/marcortola/food-data-central.svg?style=flat-square)](https://github.com/marcortola/food-data-central/releases)\n[![Build Status](https://img.shields.io/travis/marcortola/food-data-central.svg?style=flat-square)](https://travis-ci.org/marcortola/food-data-central)\n\nInstallation\n------------\n\n1. [Install Composer](https://getcomposer.org/download/)\n2. Execute:\n\n```\n$ composer require marcortola/food-data-central\n```\n\nThis wrapper doesn't bundle the HTTP client so you are free to use your preferred one. You can inject it in the FoodDataCentralClient constructor or let the wrapper discover it. If you don't know what I am talking about, the fast solution is to require these packages:\n\n```\n$ composer require php-http/curl-client nyholm/psr7 php-http/message\n```\n\nUsage\n------------\n```php\n$foodDataCentralClient = FoodDataCentralClient::create('your_api_key');\n\n// Find food by FDC ID.\n$foodItem = $foodDataCentralClient-\u003efood()-\u003efood(781125);\n\n// Find food nutrients. See the FoodItem interface for more nutrient finders.\n$calcium = $foodDataCentralClient-\u003efood()-\u003efood(781125)-\u003egetCalcium();\n\n```\nRead the Food Data Central API documentation [here](https://fdc.nal.usda.gov/api-spec/fdc_api.html).\n\nLicense\n------------\n\nLicensed under the MIT License. See [License File](LICENSE) for more information about it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcortola%2Ffood-data-central","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcortola%2Ffood-data-central","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcortola%2Ffood-data-central/lists"}