Coda Formulas API

Formulas can be great for performing one-off computations, or used with tables and other formulas to compute a single value. With this API, you can discover formulas in a doc and obtain computed results.

Operations 2

GET /docs/{docId}/formulas List formulas #
GET /docs/{docId}/formulas/{formulaIdOrName} Get a formula #

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/coda-formulas-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

coda-formulas-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 1.5.0
  title: Coda Formulas API
  license:
    name: Coda Developer Terms
    url: https://coda.io/trust/developer
  description: '# Introduction


    The Coda API is a RESTful API that lets you programmatically interact with Coda docs:


    * List and search Coda docs

    * Create new docs and copy existing ones

    * Share and publish docs

    * Discover pages, tables, formulas, and controls

    * Read, insert, upsert, update, and delete rows


    If you plan to integrate Coda with an AI tool, you may also want to consider using the

    Coda MCP server.'
  termsOfService: https://coda.io/trust/tos
  contact:
    name: API Support
    url: https://coda.io
    email: help+api@coda.io
  x-logo:
    url: https://cdn.coda.io/external/img/apilogo.png
    backgroundColor: transparent
    altText: Coda API
    href: '#'
servers:
- url: https://coda.io/apis/v1
  description: Coda API (v1)
security:
- Bearer: []
tags:
- name: Formulas
  description: Formulas can be great for performing one-off computations, or used with tables and other formulas to compute a single value. With this API, you can discover formulas in a doc and obtain computed results.
paths:
  /docs/{docId}/formulas:
    get:
      summary: List formulas
      description: Returns a list of named formulas in a Coda doc.
      operationId: listFormulas
      tags:
      - Formulas
      parameters:
      - $ref: '#/components/parameters/docId'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/pageToken'
      - $ref: '#/components/parameters/sortBy'
      responses:
        '200':
          description: List of formulas that have names in a doc.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FormulaList'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/TooManyRequestsError'
      x-codeSamples:
      - label: Python 3.13
        lang: python
        source: 'import requests


          headers = {''Authorization'': ''Bearer <your API token>''}

          uri = f''https://coda.io/apis/v1/docs/<doc ID>/formulas''

          res = requests.get(uri, headers=headers).json()


          print(f''This doc\''s formulas are: {", ".join(i["name"] for i in res["items"])}'')

          # => This doc''s formulas are: Total Duration, Time Now

          '
      - label: Shell
        lang: shell
        source: "curl -s -H 'Authorization: Bearer <your API token>' \\\n  'https://coda.io/apis/v1/docs/<doc ID>/formulas' |\n  jq '.items | map(.name) | join(\", \")'\n# => \"Total Duration, Time Now\"\n"
      - label: Google Apps Script
        lang: javascript
        source: '// Import the CodaAPI library via Resource->Libraries...:

          // 15IQuWOk8MqT50FDWomh57UqWGH23gjsWVWYFms3ton6L-UHmefYHS9Vl

          CodaAPI.authenticate(''<your API token>'');

          var formulas = CodaAPI.listFormulas(''<doc ID>'').items;

          var names = formulas.map(function(formula) { return formula.name; });

          Logger.log(''This doc\''s formulas are: '' + names.join('', ''));

          // => This doc''s formulas are: Total Duration, Time Now

          '
  /docs/{docId}/formulas/{formulaIdOrName}:
    get:
      summary: Get a formula
      description: Returns info on a formula.
      operationId: getFormula
      tags:
      - Formulas
      parameters:
      - $ref: '#/components/parameters/docId'
      - $ref: '#/components/parameters/formulaIdOrName'
      responses:
        '200':
          description: Details about a formula.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Formula'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/TooManyRequestsError'
      x-codeSamples:
      - label: Python 3.13
        lang: python
        source: 'import requests


          headers = {''Authorization'': ''Bearer <your API token>''}

          uri = f''https://coda.io/apis/v1/docs/<doc ID>/formulas/<formula ID>''

          res = requests.get(uri, headers=headers).json()


          print(f''It will take {res["value"]} hours to complete everything'')

          # => It will take 3 hours to complete everything

          '
      - label: Shell
        lang: shell
        source: "curl -s -H 'Authorization: Bearer <your API token>' \\\n  'https://coda.io/apis/v1/docs/<doc ID>/formulas/<formula ID>' |\n  jq '\"It will take \" + (.value | tostring) + \" hours to complete everything\"'\n# => \"It will take 3 hours to complete everything\"\n"
      - label: Google Apps Script
        lang: javascript
        source: '// Import the CodaAPI library via Resource->Libraries...:

          // 15IQuWOk8MqT50FDWomh57UqWGH23gjsWVWYFms3ton6L-UHmefYHS9Vl

          CodaAPI.authenticate(''<your API token>'');

          var formula = CodaAPI.getFormula(''<doc ID>'', ''<formula ID>'');

          Logger.log(''It will take '' + formula.value + '' hours to complete everything'');

          // => It will take 3 hours to complete everything

          '
components:
  schemas:
    FormulaList:
      x-schema-name: FormulaList
      description: List of formulas.
      type: object
      required:
      - items
      additionalProperties: false
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/FormulaReference'
        href:
          type: string
          format: url
          description: API link to these results
          example: https://coda.io/apis/v1/docs/AbCDeFGH/formulas?limit=20
        nextPageToken:
          $ref: '#/components/schemas/nextPageToken'
        nextPageLink:
          allOf:
          - $ref: '#/components/schemas/nextPageLink'
          - type: string
            example: https://coda.io/apis/v1/docs/AbCDeFGH/formulas?pageToken=eyJsaW1pd
    Formula:
      x-schema-name: Formula
      description: Details about a formula.
      type: object
      required:
      - id
      - type
      - href
      - name
      - value
      additionalProperties: false
      properties:
        id:
          type: string
          description: ID of the formula.
          example: f-fgHijkLm
        type:
          type: string
          description: The type of this resource.
          enum:
          - formula
          x-tsType: Type.Formula
        href:
          type: string
          format: url
          description: API link to the formula.
          example: https://coda.io/apis/v1/docs/AbCDeFGH/formulas/f-fgHijkLm
        name:
          type: string
          description: Name of the formula.
          example: Sum of expenses
        parent:
          $ref: '#/components/schemas/PageReference'
        value:
          $ref: '#/components/schemas/Value'
    ScalarValue:
      x-schema-name: ScalarValue
      description: A Coda result or entity expressed as a primitive type.
      oneOf:
      - type: string
        example: $12.34
      - type: number
        example: 12.34
      - type: boolean
        example: true
    nextPageLink:
      description: If specified, a link that can be used to fetch the next page of results.
      type: string
      format: url
    SortBy:
      x-schema-name: SortBy
      description: Determines how the objects returned are sorted
      type: string
      enum:
      - name
      x-tsEnumNames:
      - Name
    Value:
      x-schema-name: Value
      description: A Coda result or entity expressed as a primitive type, or array of primitive types.
      additionalProperties: false
      oneOf:
      - $ref: '#/components/schemas/ScalarValue'
      - type: array
        items:
          oneOf:
          - $ref: '#/components/schemas/ScalarValue'
          - type: array
            items:
              $ref: '#/components/schemas/ScalarValue'
    FormulaReference:
      x-schema-name: FormulaReference
      description: Reference to a formula.
      type: object
      required:
      - id
      - type
      - href
      - name
      additionalProperties: false
      properties:
        id:
          type: string
          description: ID of the formula.
          example: f-fgHijkLm
        type:
          type: string
          description: The type of this resource.
          enum:
          - formula
          x-tsType: Type.Formula
        href:
          type: string
          format: url
          description: API link to the formula.
          example: https://coda.io/apis/v1/docs/AbCDeFGH/formulas/f-fgHijkLm
        name:
          type: string
          description: Name of the formula.
          example: Sum of expenses
        parent:
          $ref: '#/components/schemas/PageReference'
    PageReference:
      x-schema-name: PageReference
      description: Reference to a page.
      type: object
      required:
      - id
      - type
      - browserLink
      - href
      - name
      additionalProperties: false
      properties:
        id:
          type: string
          description: ID of the page.
          example: canvas-IjkLmnO
        type:
          type: string
          description: The type of this resource.
          enum:
          - page
          x-tsType: Type.Page
        href:
          type: string
          format: url
          description: API link to the page.
          example: https://coda.io/apis/v1/docs/AbCDeFGH/pages/canvas-IjkLmnO
        browserLink:
          type: string
          format: url
          description: Browser-friendly link to the page.
          example: https://coda.io/d/_dAbCDeFGH/Launch-Status_sumnO
        name:
          type: string
          description: Name of the page.
          example: Launch Status
    nextPageToken:
      description: If specified, an opaque token used to fetch the next page of results.
      type: string
      example: eyJsaW1pd
  responses:
    ForbiddenError:
      description: The API token does not grant access to this resource.
      content:
        application/json:
          schema:
            description: An HTTP error resulting from an unsuccessful request.
            required:
            - statusCode
            - statusMessage
            - message
            additionalProperties: false
            properties:
              statusCode:
                type: number
                description: HTTP status code of the error.
                example: 403
              statusMessage:
                type: string
                description: HTTP status message of the error.
                example: Forbidden
              message:
                type: string
                description: Any additional context on the error, or the same as `statusMessage` otherwise.
                example: Forbidden
    NotFoundError:
      description: The resource could not be located with the current API token.
      content:
        application/json:
          schema:
            description: An HTTP error resulting from an unsuccessful request.
            required:
            - statusCode
            - statusMessage
            - message
            additionalProperties: false
            properties:
              statusCode:
                type: number
                description: HTTP status code of the error.
                example: 404
              statusMessage:
                type: string
                description: HTTP status message of the error.
                example: Not Found
              message:
                type: string
                description: Any additional context on the error, or the same as `statusMessage` otherwise.
                example: Not Found
    UnauthorizedError:
      description: The API token is invalid or has expired.
      content:
        application/json:
          schema:
            description: An HTTP error resulting from an unsuccessful request.
            required:
            - statusCode
            - statusMessage
            - message
            additionalProperties: false
            properties:
              statusCode:
                type: number
                description: HTTP status code of the error.
                example: 401
              statusMessage:
                type: string
                description: HTTP status message of the error.
                example: Unauthorized
              message:
                type: string
                description: Any additional context on the error, or the same as `statusMessage` otherwise.
                example: Unauthorized
    TooManyRequestsError:
      description: The client has sent too many requests.
      content:
        application/json:
          schema:
            description: An HTTP error resulting from an unsuccessful request.
            required:
            - statusCode
            - statusMessage
            - message
            additionalProperties: false
            properties:
              statusCode:
                type: number
                description: HTTP status code of the error.
                example: 429
              statusMessage:
                type: string
                description: HTTP status message of the error.
                example: Too Many Requests
              message:
                type: string
                description: Any additional context on the error, or the same as `statusMessage` otherwise.
                example: Too Many Requests
  parameters:
    limit:
      name: limit
      description: Maximum number of results to return in this query.
      in: query
      example: 10
      schema:
        type: integer
        minimum: 1
        default: 25
    pageToken:
      name: pageToken
      description: An opaque token used to fetch the next page of results.
      in: query
      example: eyJsaW1pd
      schema:
        type: string
    formulaIdOrName:
      name: formulaIdOrName
      description: ID or name of the formula. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it.
      x-sdk-description: ID or name of the formula. Names are discouraged because they're easily prone to being changed by users.
      in: path
      required: true
      example: f-fgHijkLm
      schema:
        type: string
    docId:
      name: docId
      description: ID of the doc.
      in: path
      required: true
      example: AbCDeFGH
      schema:
        type: string
    sortBy:
      name: sortBy
      description: Determines how to sort the given objects.
      in: query
      example: name
      schema:
        $ref: '#/components/schemas/SortBy'
  securitySchemes:
    Bearer:
      description: "The Coda API can be accessed using an API token, which can be obtained from [*My account*](https://coda.io/account)\nin Coda. This token should be specified by setting a header as follows.\n\n```Authorization: Bearer <api_token>```\n\nKeep your token safe, as anyone who gets access to it can access your account. Once a token is created\nit cannot be viewed or modified, so don't lose it.\n\nIf you're logged into Coda, you can also query the API directly using your browser. Note that only GET\nendpoints are supported; for anything else, you'll have to use Bearer authentication.\n\n### Restricting token authorization\n\nBy default, bearer tokens created for the Coda API can perform any action that the user who created the token\ncan perform. However, Coda API bearer tokens can also be created with restrictions. These restrictions\ncan limit what objects can be operated on and the types of operations that can be performed.\n\n#### Operation types\n\nThe table below describes the types of authorization restrictions that can be placed on a Coda API token.\n<table>\n  <tr><th>Restriction</th><th>Description</th><th>Allowed HTTP Methods</th></tr>\n  <tr>\n    <td>Read access</td>\n    <td>Allows access to API methods that read the state of an object</td>\n    <td>GET</td>\n  </tr>\n  <tr>\n    <td>Write access</td>\n    <td>Allows access to API methods that write the state of an object</td>\n    <td>POST, PUT, DELETE</td>\n  </tr>\n  <tr>\n    <td>Read and write access</td>\n    <td>Allows access to all methods for an object</td>\n    <td>All</td>\n  </tr>\n</table>\n\n#### Object types\n\nCoda API tokens can be restricted to the following types of objects.\n\n* Documents: Restricts access to only allow API calls for `/docs/${DOC_ID}`\n* Tables: Restricts access to only allow API calls for `/docs/${DOC_ID}/tables/${TABLE_ID}`\n\n#### Special cases\n\nThere are a few special case methods that violate the above restrictions.\n\n* `/whoami`: This method can be called by all Coda API tokens.\n* `/resolveBrowserLink`: This method can be called by all Coda API tokens, but will only return a result\nif the token has access (read or write) to the object referenced by the URL.\n\n#### Feedback\n\nThis feature is under development and we'd love to hear your feedback and bug reports. Please\nvisit us at the [Developers Central](https://connect.superhuman.com/c/developers-central) forum within\nthe Coda Community.\n"
      type: http
      scheme: bearer
      bearerFormat: UUID
x-tagGroups:
- name: Folders
  tags:
  - Folders
- name: Docs
  tags:
  - Docs
  - Permissions
  - Publishing
- name: Doc Structure
  tags:
  - Pages
  - Automations
- name: Tables and Views
  tags:
  - Tables
  - Columns
  - Rows
- name: Formulas & Controls
  tags:
  - Formulas
  - Controls
- name: Miscellaneous
  tags:
  - Account
  - Analytics
  - Miscellaneous