{"openapi":"3.1.0","info":{"title":"Open Measures","description":"**Open Measures Public API**\n\nFree public access includes 39 queries per day for historical data (6+ months old). Need real-time data or higher query limits? Contact us [here](https://openmeasures.io/demo) to upgrade to Pro or Enterprise.\n\nDocumentation:\n\n- [Google Colab Notebook](https://colab.research.google.com/drive/1kDyRIC0NBOj4Egn_VdK837QBNqDERRi_)\n\n- [GitBook Docs](https://docs.openmeasures.io/docs/guides/public-api)\n\n","contact":{"name":"Open Measures","email":"info@openmeasures.io"},"version":"0.0.1","x-logo":{"url":"https://gitlab.com/openmeasures/backends/smat-be/-/raw/master/openmeasures-logo.png"}},"paths":{"/content":{"get":{"summary":"Content","description":"Return the content from a source. Use this to search for posts.","operationId":"content_content_get","parameters":[{"name":"term","in":"query","required":true,"schema":{"type":"string","description":"The search query, where the type of query corresponds to the value set for the `querytype` parameter.","title":"Term"},"description":"The search query, where the type of query corresponds to the value set for the `querytype` parameter."},{"name":"querytype","in":"query","required":false,"schema":{"$ref":"#/components/schemas/QueryType","description":"The type of query to run.\n\n`boolean_content` searches over only the text field of the posts and comments, and accepts boolean operators like AND, OR, and NOT. `query_string` searches over specified fields, such as a user or channel, using a Lucene query string.","default":"boolean_content"},"description":"The type of query to run.\n\n`boolean_content` searches over only the text field of the posts and comments, and accepts boolean operators like AND, OR, and NOT. `query_string` searches over specified fields, such as a user or channel, using a Lucene query string."},{"name":"site","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Site","description":"Source to search.","default":"telegram"},"description":"Source to search."},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date"}],"description":"Content posted on or after the specified start datetime.","default":"2025-11-19T20:49:35.578517","title":"Since"},"description":"Content posted on or after the specified start datetime."},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date"}],"description":"Content posted before the specified end datetime.","default":"2026-05-19T20:49:35.578517","title":"Until"},"description":"Content posted before the specified end datetime."},{"name":"sortdesc","in":"query","required":false,"schema":{"type":"boolean","description":"By default, sorts the returned documents from newest to oldest `created_at` date.","default":false,"title":"Sortdesc"},"description":"By default, sorts the returned documents from newest to oldest `created_at` date."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Number of results to return. Max of 10,000 per query.","default":10,"title":"Limit"},"description":"Number of results to return. Max of 10,000 per query."},{"name":"esquery","in":"query","required":false,"schema":{"type":"boolean","description":"Use the `querytype` parameter instead.","default":false,"title":"Esquery"},"description":"Use the `querytype` parameter instead."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/timeseries":{"get":{"summary":"Timeseries","description":"Retrieve a time series.","operationId":"timeseries_timeseries_get","parameters":[{"name":"term","in":"query","required":true,"schema":{"type":"string","description":"The search query, where the type of query corresponds to the value set for the `querytype` parameter.","title":"Term"},"description":"The search query, where the type of query corresponds to the value set for the `querytype` parameter."},{"name":"querytype","in":"query","required":false,"schema":{"$ref":"#/components/schemas/QueryType","description":"The type of query to run.\n\n`boolean_content` searches over only the text field of the posts and comments, and accepts boolean operators like AND, OR, and NOT. `query_string` searches over specified fields, such as a user or channel, using a Lucene query string.","default":"boolean_content"},"description":"The type of query to run.\n\n`boolean_content` searches over only the text field of the posts and comments, and accepts boolean operators like AND, OR, and NOT. `query_string` searches over specified fields, such as a user or channel, using a Lucene query string."},{"name":"site","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Site","description":"Source to search.","default":"telegram"},"description":"Source to search."},{"name":"interval","in":"query","required":false,"schema":{"type":"string","description":"The time interval for aggregating data points.","default":"day","title":"Interval"},"description":"The time interval for aggregating data points."},{"name":"changepoint","in":"query","required":false,"schema":{"type":"boolean","description":"Performs changepoint detection on the time series data.","default":false,"title":"Changepoint"},"description":"Performs changepoint detection on the time series data."},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date"}],"description":"Content posted on or after the specified start datetime.","default":"2025-11-19T20:49:35.578517","title":"Since"},"description":"Content posted on or after the specified start datetime."},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date"}],"description":"Content posted before the specified end datetime.","default":"2026-05-19T20:49:35.578517","title":"Until"},"description":"Content posted before the specified end datetime."},{"name":"esquery","in":"query","required":false,"schema":{"type":"boolean","description":"Use the `querytype` parameter instead.","default":false,"title":"Esquery"},"description":"Use the `querytype` parameter instead."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/activity":{"get":{"summary":"Activity","description":"Aggregate over a particular field on a single site. Use this for finding notable users, channels, and more.","operationId":"activity_activity_get","parameters":[{"name":"term","in":"query","required":true,"schema":{"type":"string","description":"The search query, where the type of query corresponds to the value set for the `querytype` parameter.","title":"Term"},"description":"The search query, where the type of query corresponds to the value set for the `querytype` parameter."},{"name":"querytype","in":"query","required":false,"schema":{"$ref":"#/components/schemas/QueryType","description":"The type of query to run.\n\n`boolean_content` searches over only the text field of the posts and comments, and accepts boolean operators like AND, OR, and NOT. `query_string` searches over specified fields, such as a user or channel, using a Lucene query string.","default":"boolean_content"},"description":"The type of query to run.\n\n`boolean_content` searches over only the text field of the posts and comments, and accepts boolean operators like AND, OR, and NOT. `query_string` searches over specified fields, such as a user or channel, using a Lucene query string."},{"name":"site","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Site","description":"Source to search.","default":"telegram"},"description":"Source to search."},{"name":"agg_by","in":"query","required":false,"schema":{"type":"string","description":"The field to aggregate by. If not provided, the default field will be used.","title":"Agg By"},"description":"The field to aggregate by. If not provided, the default field will be used."},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date"}],"description":"Content posted on or after the specified start datetime.","default":"2025-11-19T20:49:35.578517","title":"Since"},"description":"Content posted on or after the specified start datetime."},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date"}],"description":"Content posted before the specified end datetime.","default":"2026-05-19T20:49:35.578517","title":"Until"},"description":"Content posted before the specified end datetime."},{"name":"esquery","in":"query","required":false,"schema":{"type":"boolean","description":"Use the `querytype` parameter instead.","default":false,"title":"Esquery"},"description":"Use the `querytype` parameter instead."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"QueryType":{"type":"string","enum":["content","boolean_content","query_string"],"title":"QueryType","description":"QueryType enumerator."},"Site":{"type":"string","enum":["4chan","8kun","bitchute_comment","bitchute_video","bluesky","fediverse","gab","gettr","kiwifarms","lbry_comment","lbry_video","mewe","minds","ok","parler","poal","rumble_comment","rumble_video","rutube_comment","rutube_video","telegram","tiktok_comment","tiktok_video","truth_social","vk","whatsapp","win","wimkin"],"title":"Site","description":"Site enumerator."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}