fatsecret Natural Language Processing API

Turn a free-text meal description into matched foods and nutrition

Operations 1

POST /natural-language-processing/v1 Parse a free-text meal description #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/fatsecret-natural-language-processing-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

fatsecret-natural-language-processing-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: fatsecret Natural Language Processing API
  description: The fatsecret Natural Language Processing method accepts a free-text description of what a user has eaten — "for breakfast I had a bowl of cereal, a banana, and a cappuccino" — estimates the serving sizes and weights, and matches each item against fatsecret's verified nutrition database for the requested region and language.
  version: '1.0'
  contact:
    name: fatsecret Platform
    url: https://platform.fatsecret.com/platform-api
  x-provenance:
    generated: '2026-08-12'
    method: generated
    source: https://platform.fatsecret.com/docs/v1/natural.language.processing
    note: Authored from fatsecret's own published method documentation, which specifies the HTTP verb, endpoint, every request parameter and the response fields. fatsecret publishes no machine-readable contract for this method; nothing here is inferred beyond what that page states.
servers:
- url: https://platform.fatsecret.com/rest
  description: REST endpoint for URL-based and method-based integration
security:
- oauth2: []
- oauth1: []
tags:
- name: Natural Language Processing
  description: Turn a free-text meal description into matched foods and nutrition
paths:
  /natural-language-processing/v1:
    post:
      tags:
      - Natural Language Processing
      summary: Parse a free-text meal description
      description: Accepts a natural-language description of what a user has eaten, which may contain multiple items, and returns the matched foods with suggested servings and nutritional content.
      operationId: processNaturalLanguageMeal
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NaturalLanguageRequest'
      responses:
        '200':
          description: Foods matched from the description
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FoodResponse'
        '400':
          description: Invalid request — see the fatsecret error code catalog
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Invalid or expired token (error code 13) or invalid signature (error code 8)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Missing scope (error code 14) or invalid IP address detected (error code 21)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Application request limit reached (error code 11)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    FoodResponse:
      type: object
      properties:
        food_response:
          type: array
          items:
            $ref: '#/components/schemas/MatchedFood'
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
              description: fatsecret error code — see errors/fatsecret-error-codes.yml
            message:
              type: string
    NaturalLanguageRequest:
      type: object
      required:
      - user_input
      properties:
        user_input:
          type: string
          maxLength: 1000
          description: A description of what a user has eaten. May contain multiple items. Limited to 1000 characters.
          example: for breakfast I had a bowl of cereal, a banana, and a cappuccino
        include_food_data:
          type: boolean
          description: Include full food data inline in the response.
        eaten_foods:
          type: array
          description: Previously consumed foods, provided to assist with more accurate matching.
          items:
            $ref: '#/components/schemas/EatenFood'
        region:
          type: string
          description: Filter results by region. Defaults to US.
          default: US
          example: FR
        language:
          type: string
          description: Return results in the specified language. Only used when region is specified.
          example: fr
    EatenFood:
      type: object
      required:
      - food_id
      - food_name
      properties:
        food_id:
          type: integer
          format: int64
        food_name:
          type: string
        food_brand:
          type: string
        serving_description:
          type: string
        serving_size:
          type: string
    MatchedFood:
      type: object
      properties:
        food_id:
          type: integer
          format: int64
        food_entry_name:
          type: string
        eaten:
          type: object
          description: Nutritional content of the portion described.
          properties:
            total_nutritional_content:
              type: object
              description: Calories, macronutrients and micronutrients for the portion.
        suggested_serving:
          type: object
          description: Serving fatsecret suggests for the described portion.
        food:
          type: object
          description: Complete food record, returned when include_food_data is true.
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://oauth.fatsecret.com/connect/token
          scopes:
            basic: Basic access to food and recipe data
            premier: Premier access including image recognition and NLP
    oauth1:
      type: http
      scheme: oauth
      description: OAuth 1.0a request signing