---
agentTools:
  projectIndex: https://docs.addevent.com/llms.txt
---

# Search calendars

Search for calendars you've previously created. Returns a search result object that contains a `calendar` property that contains an array of up to `page_size` calendars. If no calendars match the query, the resulting array will be empty.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "version": "v2.14.0",
    "title": "Calendar and Event API",
    "contact": {
      "name": "AddEvent Inc",
      "email": "support@addevent.com"
    }
  },
  "servers": [
    {
      "url": "https://api.addevent.com/calevent/v2"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/calendars": {
      "get": {
        "operationId": "search-calendars",
        "summary": "Search calendars",
        "tags": [
          "Calendars"
        ],
        "description": "Search for calendars you've previously created. Returns a search result object that contains a `calendar` property that contains an array of up to `page_size` calendars. If no calendars match the query, the resulting array will be empty.",
        "parameters": [
          {
            "$ref": "#/components/parameters/calendar-ids"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/page-size"
          },
          {
            "$ref": "#/components/parameters/calendar-sort"
          },
          {
            "$ref": "#/components/parameters/sort-order"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200-calendar-search"
          },
          "400": {
            "$ref": "#/components/responses/400-invalid-query-parameters"
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "page": {
        "name": "page",
        "in": "query",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "default": 1
        },
        "description": "Page number of the search results. The first page of results is `page=1`."
      },
      "page-size": {
        "name": "page_size",
        "in": "query",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 20,
          "default": 10
        },
        "description": "A limit on the number of objects to be returned. `page_size` must be between 1 and 20, and the default is 10."
      },
      "sort-order": {
        "name": "sort_order",
        "in": "query",
        "schema": {
          "type": "string",
          "enum": [
            "asc",
            "desc"
          ],
          "default": "desc"
        },
        "description": "The order of the returned search results, sorted by the property specified in `sort_by`. Allowed values are `asc` or `desc`. If `sort_order` is provided, then `sort_by` must also be provided."
      },
      "calendar-sort": {
        "name": "sort_by",
        "in": "query",
        "schema": {
          "type": "string",
          "enum": [
            "created",
            "title"
          ],
          "default": "created"
        },
        "description": "The calendar property to sort by. Allowed values are `created`, or `title`. If `sort_order` is provided, then `sort_by` must also be provided."
      },
      "calendar-ids": {
        "name": "calendar_ids",
        "in": "query",
        "style": "form",
        "explode": false,
        "schema": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^\\S+$"
          }
        },
        "description": "Comma-separated list of calendar IDs. Limits search results to those specific calendars."
      }
    },
    "schemas": {
      "pagination": {
        "type": "object",
        "properties": {
          "current_page": {
            "type": "integer",
            "description": "Page number of the current page of search results."
          },
          "next_page": {
            "type": "integer",
            "description": "Page number of the next page of search results."
          },
          "previous_page": {
            "type": "integer",
            "description": "Page number of the previous page of search results."
          },
          "total_items": {
            "type": "integer",
            "description": "The total number of objects in the search results."
          },
          "total_pages": {
            "type": "integer",
            "description": "The total number of pages of search results."
          },
          "page_size": {
            "type": "integer",
            "description": "The number of search results per page"
          }
        },
        "description": "Meta data about the search results and paging."
      },
      "links": {
        "type": "object",
        "properties": {
          "next_page_url": {
            "type": "string",
            "description": "Link to the next page of search results."
          },
          "previous_page_url": {
            "type": "string",
            "description": "Link to the previous page of search results."
          }
        },
        "description": "Links to additional search results."
      },
      "calendar": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the calendar."
          },
          "unique_key": {
            "type": "string",
            "description": "A public identifier for the calendar that is used for sharing the calendar."
          },
          "title": {
            "type": "string",
            "description": "The calendar's title."
          },
          "timezone": {
            "type": "string",
            "description": "The default timezone for events on the calendar."
          },
          "weekday_begin": {
            "type": "string",
            "description": "Day of the week that the calendar begins on. Values are `sunday` or `monday`."
          },
          "is_default_calendar": {
            "type": "boolean",
            "description": "Whether the calendar is the default calendar on the account."
          },
          "description": {
            "type": "string",
            "description": "The calendar's description. This appears on the calendar landing page."
          },
          "internal_name": {
            "type": "string",
            "description": "An internal name for the calendar. This will not be displayed publicly."
          },
          "calendar_color": {
            "type": "integer",
            "description": "The color of the calendar which appears in the dashboard. Values are between `1` and `20` and correspond to the colors on the calendar's palette."
          },
          "palette_id": {
            "type": "string",
            "description": "The ID of the custom color palette that is associated with the calendar. The value `default` indicates that the standard AddEvent palette is being used."
          },
          "landing_page_template_id": {
            "type": "string",
            "description": "The ID of the custom calendar landing page template that is associated with the calendar. The value `default` indicates that the standard AddEvent template is being used."
          },
          "embeddable_calendar_template_id": {
            "type": "string",
            "description": "The ID of the custom embeddable calendar template that is associated with the calendar. The value `default` indicates that the standard AddEvent template is being used."
          },
          "stats": {
            "$ref": "#/components/schemas/calendar-stats"
          },
          "custom_data": {
            "type": "object",
            "description": "Arbitary key-value pairs that can be attached to a calendar. Useful for storing additional structured data on an object, for example, storing external IDs to link a calendar to another system or linking to custom images for each calendar."
          },
          "link_long": {
            "type": "string",
            "description": "The public URL to the calendar landing page. Used for sharing the calendar."
          },
          "link_short": {
            "type": "string",
            "description": "The public short URL to the calendar landing page. Used for sharing the calendar."
          },
          "created": {
            "type": "string",
            "description": "Time at which the calendar was created."
          },
          "modified": {
            "type": "string",
            "description": "Time at which the calendar was last updated."
          }
        }
      },
      "calendar-stats": {
        "type": "object",
        "properties": {
          "subscriber_active_count": {
            "type": "integer",
            "description": "The number of active subscribers on the calendar. An active subscriber means that the calendar feed has synced within the last 30 days."
          },
          "subscribers_all_count": {
            "type": "integer",
            "description": "The total number of subscribers on the calendar. This includes all active subscribers, as well as inactive subscribers (which means that the calendar feed has not synced within the last 30 days), and calendar subscribers who were manually blocked by the calendar owner."
          },
          "events_count": {
            "type": "integer",
            "description": "The total number of events on the calendar."
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "APIkey",
        "description": "Your API key can be found on your AddEvent account page - https://dashboard.addevent.com/account/settings"
      }
    },
    "responses": {
      "200-calendar-search": {
        "description": "Ok",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "pagination": {
                  "$ref": "#/components/schemas/pagination"
                },
                "links": {
                  "$ref": "#/components/schemas/links"
                },
                "calendars": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/calendar"
                  }
                }
              }
            },
            "examples": {
              "Search results": {
                "$ref": "#/components/examples/calendar-search"
              }
            }
          }
        }
      },
      "400-invalid-query-parameters": {
        "description": "Bad request",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error_id": {
                  "type": "string",
                  "description": "A UUID which can be used to troubleshoot the error."
                },
                "error_message": {
                  "type": "string",
                  "description": "Additional information about the error."
                },
                "property_validation_errors": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "reason": {
                        "type": "string"
                      }
                    },
                    "description": "An array of invalid parameter names, and the associated reason that the property is invalid."
                  }
                }
              }
            },
            "examples": {
              "Invalid query parameters": {
                "$ref": "#/components/examples/invalid-query-parameters"
              }
            }
          }
        }
      }
    },
    "examples": {
      "invalid-query-parameters": {
        "value": {
          "error_message": "Attribute Validation Error",
          "invalid_param_responses": [
            {
              "name": "sort_by",
              "reason": "Invalid sorting field provided"
            }
          ],
          "error_id": "1-655f6e3c-2597d3171a91c593213d3e40"
        }
      },
      "calendar-all": {
        "value": {
          "id": 1701121309493871,
          "unique_key": "1d493871",
          "title": "Calendar title",
          "internal_name": "",
          "description": "",
          "is_default_calendar": true,
          "timezone": "America/Los_Angeles",
          "weekday_begin": "sunday",
          "calendar_color": 1,
          "palette_id": "default",
          "landing_page_template_id": "default",
          "embeddable_calendar_template_id": "default",
          "stats": {
            "subscribers_active_count": 25,
            "subscribers_all_count": 32,
            "events_count": 12
          },
          "created": "2023-08-20 21:41:48",
          "modified": "2023-11-27 21:43:17",
          "link_long": "https://www.addevent.dev/calendar/1d493871",
          "link_short": "https://cal.ae/usgdhaw",
          "custom_data": {}
        }
      },
      "calendar-search": {
        "value": {
          "pagination": {
            "current_page": 1,
            "next_page": 1,
            "previous_page": 1,
            "total_items": 1,
            "total_pages": 1,
            "page_size": 10
          },
          "links": {
            "next_page_url": "https://api.addevent.com/calevent/v2/calendars&page=1",
            "previous_page_url": "https://api.addevent.com/calevent/v2/calendars&page=1"
          },
          "calendars": [
            {
              "$ref": "#/components/examples/calendar-all/value"
            }
          ]
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 103,
      "1": 165,
      "2": 2,
      "3": 119,
      "4": 10,
      "5": 212,
      "6": 106,
      "7": 0,
      "8": 55,
      "9": 83,
      "10": 79,
      "11": 76
    }
  }
}
```