{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "Meltwater API Schemas", "description": "JSON Schema definitions extracted from the Meltwater API OpenAPI specification", "definitions": { "DocModTag": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" } } }, "DocumentTagsPayload": { "type": "object", "required": [ "document_ids", "tags" ], "properties": { "document_ids": { "type": "array", "minItems": 1, "maxItems": 100, "items": { "type": "string" } }, "tags": { "type": "array", "minItems": 1, "items": { "$ref": "#/components/schemas/DocModTag" } } } }, "MWAPIError": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/MWAPIErrorDetails" } } } }, "RateLimitedError": { "description": "RateLimitedError", "example": { "message": "Service Overloaded", "errors": {} }, "allOf": [ { "$ref": "#/components/schemas/Errors" }, { "required": [ "message" ], "type": "object", "properties": { "message": { "type": "string" } }, "description": "RateLimitedError" } ] }, "SingleSearchRequest": { "required": [ "search" ], "type": "object", "properties": { "search": { "$ref": "#/components/schemas/SearchRequestV2" } }, "title": "Search Resource", "description": "Search Resource", "additionalProperties": false }, "SearchRequestV2": { "required": [ "name", "query" ], "type": "object", "properties": { "name": { "type": "string", "description": "The name associated with this search", "example": "Electric cars" }, "query": { "$ref": "#/components/schemas/Query" }, "id": { "type": "integer", "example": 1024, "description": "Identifier" } }, "title": "Search", "example": { "query": { "type": "boolean", "filter_set": null, "case_sensitivity": false, "boolean": "Tesla OR (Volvo NEAR electric)" }, "name": "Electric cars" }, "description": "Search", "additionalProperties": false }, "Query": { "description": "Query associated with a search", "oneOf": [ { "$ref": "#/components/schemas/BooleanQuery" }, { "$ref": "#/components/schemas/KeywordQuery" }, { "$ref": "#/components/schemas/CombinedQuery" } ], "discriminator": { "propertyName": "type", "mapping": { "boolean": "#/components/schemas/BooleanQuery", "keyword": "#/components/schemas/KeywordQuery", "combined": "#/components/schemas/CombinedQuery" } } }, "BooleanQuery": { "required": [ "case_sensitivity", "boolean" ], "type": "object", "properties": { "filter_set": { "$ref": "#/components/schemas/FilterSet" }, "case_sensitivity": { "type": "string", "description": "The case sensitivity for this query", "enum": [ "yes", "no", "hybrid" ] }, "boolean": { "type": "string", "description": "The boolean query string" } } }, "FilterSet": { "description": "The optional Filter Set to apply to this search", "oneOf": [ { "$ref": "#/components/schemas/SavedFilterSet" }, { "$ref": "#/components/schemas/EmbeddedFilterSet" } ], "discriminator": { "propertyName": "type", "mapping": { "saved": "#/components/schemas/SavedFilterSet", "embedded": "#/components/schemas/EmbeddedFilterSet" } } }, "SavedFilterSet": { "required": [ "id" ], "type": "object", "properties": { "id": { "type": "integer", "description": "ID number for the Saved Filter Set", "format": "int64" }, "name": { "type": "string", "description": "Name of the Saved Filter Set, is optional when referencing one" }, "subtype": { "type": "string", "description": "Type of Saved Filter Set, may be CUSTOM for user-created or QUICKPICK for meltwater-created, is optional when referencing one", "enum": [ "custom", "quickpick" ] } } }, "EmbeddedFilterSet": { "type": "object" }, "KeywordQuery": { "required": [ "case_sensitivity" ], "type": "object", "properties": { "filter_set": { "$ref": "#/components/schemas/FilterSet" }, "case_sensitivity": { "type": "string", "description": "The case sensitivity for this query", "enum": [ "yes", "no", "hybrid" ] }, "not_keywords": { "type": "array", "items": { "type": "string" }, "description": "None of these keywords should match" }, "any_keywords": { "type": "array", "items": { "type": "string" }, "description": "At least one of these keywords must match" }, "all_keywords": { "type": "array", "items": { "type": "string" }, "description": "All of these keywords must match" } } }, "CombinedQuery": { "type": "object", "properties": { "filter_set": { "$ref": "#/components/schemas/FilterSet" }, "not_searches": { "type": "array", "items": { "type": "integer", "format": "int64" }, "description": "None of these searches should match" }, "any_searches": { "type": "array", "items": { "type": "integer", "format": "int64" }, "description": "At least one of these searches must match" }, "all_searches": { "type": "array", "items": { "type": "integer", "format": "int64" }, "description": "All of these searches must match" } } }, "Errors": { "required": [ "type" ], "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/ErrorDetails" }, "description": "List of problems with the request" }, "type": { "type": "string", "enum": [ "NotFound", "ServiceUnavailable", "Unauthorized", "ValidationFailed" ] } }, "description": "Errors", "discriminator": { "propertyName": "type" } }, "ErrorDetails": { "required": [ "type", "title", "details" ], "type": "object", "properties": { "type": { "type": "string", "description": "Category of error" }, "title": { "type": "string", "description": "Title of error" }, "details": { "type": "string", "description": "Details about the error" } } }, "SingleSearch": { "required": [ "search" ], "type": "object", "properties": { "search": { "$ref": "#/components/schemas/SearchV2" } }, "title": "Search Resource", "description": "Search Resource", "additionalProperties": false }, "SearchV2": { "required": [ "id", "name" ], "type": "object", "properties": { "updated": { "type": "string", "format": "date-time", "example": "2020-08-23T08:25:56.000Z", "description": "UTC date time (in ISO-8601 format) when the search was last updated" }, "id": { "type": "integer", "format": "int64", "example": 1024, "description": "Identifier" }, "name": { "type": "string", "example": "Electric cars", "description": "Search name" }, "query": { "$ref": "#/components/schemas/Query" } }, "title": "Search", "example": { "updated": "2020-08-23T08:25:56.000Z", "query": { "type": "boolean", "filter_set": null, "case_sensitivity": false, "boolean": "Tesla OR (Volvo NEAR electric)" }, "name": "Electric cars", "id": 1999 }, "description": "Search", "additionalProperties": false }, "Unit": { "type": "object" }, "SearchListResponse": { "type": "object", "properties": { "searches": { "type": "array", "items": { "$ref": "#/components/schemas/SearchV2" } } }, "title": "Search List Response", "required": [ "searches" ], "description": "Search List Response", "additionalProperties": false }, "CompanyList": { "type": "object", "properties": { "companies": { "type": "array", "items": { "$ref": "#/components/schemas/Company" } } }, "title": "Company List", "items": { "$ref": "#/components/schemas/Company" }, "description": "Company List" }, "Company": { "required": [ "name", "id" ], "type": "object", "properties": { "name": { "type": "string", "description": "Company name", "example": "Meltwater" }, "id": { "type": "string", "description": "Company unique identifier", "example": "61d07a1eb6b501051b5af3d7" } }, "title": "Company", "example": { "name": "Meltwater", "id": "61d07a1eb6b501051b5af3d7" }, "description": "Company", "additionalProperties": false }, "WorkspaceList": { "type": "object", "properties": { "count": { "type": "integer" }, "workspaces": { "type": "array", "items": { "$ref": "#/components/schemas/Workspace" } } }, "title": "Workspace List", "items": { "$ref": "#/components/schemas/Workspace" }, "description": "Workspace List" }, "Workspace": { "required": [ "id", "name", "description", "created_at" ], "type": "object", "properties": { "name": { "type": "string", "description": "Workspace name", "example": "My Workspace" }, "id": { "type": "string", "description": "Unique workspace identifier", "example": "61d07a1eb6b501051b5af3d7" }, "description": { "type": "string", "description": "Workspace description", "example": "This is a super cool workspace" }, "created_at": { "title": "An ISO8601 date-time.", "type": "string", "description": "An ISO8601 date-time, including timezone offset.\n\nThe timezone offset is an offset in minutes from UTC.", "format": "date-time" } }, "title": "Workspace", "example": { "name": "My Workspace", "id": "61d07a1eb6b501051b5af3d7" }, "description": "Company", "additionalProperties": false }, "TokenList": { "type": "object", "properties": { "count": { "type": "integer" }, "tokens": { "type": "array", "items": { "$ref": "#/components/schemas/Token" } } }, "title": "Token List", "description": "Token List" }, "Token": { "required": [ "id", "label", "created_at", "created_by" ], "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "description": "Unique token identifier", "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }, "label": { "type": "string", "description": "Token label", "example": "My API Token" }, "created_at": { "title": "An ISO8601 date-time.", "type": "string", "description": "An ISO8601 date-time, including timezone offset.\n\nThe timezone offset is an offset in minutes from UTC.", "format": "date-time" }, "created_by": { "type": "string", "description": "Name of the user who created the token", "example": "Alex Morgan" } }, "title": "Token", "example": { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "label": "My API Token", "created_at": "2024-01-15T10:30:00Z", "created_by": "Alex Morgan" }, "description": "Token", "additionalProperties": false }, "TagList": { "type": "object", "properties": { "tags": { "type": "array", "items": { "$ref": "#/components/schemas/Tag" } } }, "title": "Tag List", "items": { "$ref": "#/components/schemas/Tag" }, "description": "Tag List" }, "Tag": { "required": [ "id", "name" ], "type": "object", "properties": { "id": { "type": "integer", "description": "Tag id", "example": 12345 }, "name": { "type": "string", "description": "Tag name", "example": "My Custom Tag" } }, "title": "Tag", "example": { "id": 12345, "name": "My Custom Tag" }, "description": "Tag", "additionalProperties": false }, "SearchCountResponse": { "required": [ "count" ], "type": "object", "properties": { "count": { "$ref": "#/components/schemas/Count" } }, "title": "Search Count", "description": "Number of results for the search", "additionalProperties": false }, "Count": { "required": [ "total" ], "type": "object", "properties": { "total": { "type": "integer", "description": "Total count", "format": "int64", "example": 901382 } }, "description": "Number of results for the search", "title": "Count", "additionalProperties": false }, "FilterSetList": { "type": "object", "properties": { "filter_sets": { "type": "array", "items": { "$ref": "#/components/schemas/FilterSet" } } } }, "CustomCategoriesList": { "type": "object", "properties": { "count": { "type": "integer", "description": "Total count", "format": "int64", "example": 12 }, "custom_categories": { "type": "array", "items": { "$ref": "#/components/schemas/CustomCategory" } } } }, "CustomCategory": { "type": "object", "properties": { "id": { "type": "integer", "description": "Custom category id", "format": "int64", "example": 11234 }, "name": { "type": "string", "description": "Name of the custom category", "example": "My Custom Category" }, "type": { "type": "string", "description": "Type of the category, can be `include` or `exclude`", "example": "include" } } }, "ValidationFailed": { "required": [ "errors", "message" ], "type": "object", "properties": { "message": { "type": "string", "description": "A message describing, in brief, the problem." }, "errors": { "type": "object", "additionalProperties": { "uniqueItems": true, "type": "array", "items": { "type": "string", "description": "A description of the problem encountered on this field." } }, "description": "A breakdown of each problem encountered, by field." } }, "example": { "message": "Validation Failed", "errors": { "start": [ "'foo' is not a valid ISO 8601 local timestamp" ], "end": [ "Missing required parameter" ] } } }, "SummaryResponse": { "required": [ "sentiment", "time_series", "top_countries", "top_languages", "unique_authors", "volume" ], "type": "object", "properties": { "unique_authors": { "type": "integer", "format": "int64" }, "top_countries": { "type": "array", "items": { "$ref": "#/components/schemas/CountryStats" } }, "sentiment": { "$ref": "#/components/schemas/Sentiments" }, "top_languages": { "type": "array", "items": { "$ref": "#/components/schemas/LanguageStats" } }, "time_series": { "type": "array", "items": { "$ref": "#/components/schemas/Day" } }, "volume": { "$ref": "#/components/schemas/Volume" } }, "description": "SummaryResponse" }, "Volume": { "required": [ "document_count" ], "type": "object", "properties": { "document_count": { "type": "integer", "format": "int64" }, "per_day": { "type": "integer", "format": "int64" }, "per_hour": { "type": "integer", "format": "int64" } }, "description": "Volume" }, "CountryStats": { "required": [ "country_code", "document_count", "percentage" ], "type": "object", "properties": { "country_code": { "type": "string" }, "document_count": { "type": "integer", "format": "int64" }, "percentage": { "type": "number", "format": "double" } }, "description": "CountryStats" }, "TopSharedResponse": { "required": [ "document_count", "results" ], "type": "object", "properties": { "document_count": { "type": "integer", "format": "int64" }, "results": { "type": "array", "items": { "$ref": "#/components/schemas/Document" } } }, "description": "TopSharedResponse" }, "Twitter": { "type": "object", "properties": { "followers": { "type": "integer", "format": "int64" }, "following": { "type": "integer", "format": "int64" }, "external_id": { "type": "string" } }, "description": "Twitter" }, "NotFound": { "required": [ "errors", "message" ], "type": "object", "properties": { "message": { "type": "string", "description": "A message describing, in brief, the problem." }, "errors": { "type": "object", "additionalProperties": { "uniqueItems": true, "type": "array", "items": { "type": "string", "description": "A description of the problem encountered on this field." } }, "description": "A breakdown of each problem encountered, by field." } }, "example": { "message": "Not Found", "errors": { ":searchId": [ "A Saved Search with that ID could not be found" ] } } }, "SentimentStats": { "required": [ "document_count", "percentage" ], "type": "object", "properties": { "document_count": { "type": "integer", "format": "int64" }, "percentage": { "type": "number", "format": "double" } }, "description": "SentimentStats" }, "Entity": { "required": [ "document_count", "entity", "type", "percentage" ], "type": "object", "properties": { "entity": { "type": "string" }, "type": { "type": "string" }, "document_count": { "type": "integer", "format": "int64" }, "percentage": { "type": "number", "format": "double" } }, "description": "Entity" }, "Day": { "required": [ "date", "document_count", "hours" ], "type": "object", "properties": { "date": { "title": "An ISO8601 date, excluding time and timezone/offset.", "type": "string", "description": "An ISO8601 date, excluding time and timezone/offset.\n\nThe year, month and day formatted according to ISO8601. The date\nrepresents the local date at the timezone given in the `tz` parameter.", "format": "date" }, "document_count": { "type": "integer", "format": "int64" }, "hours": { "type": "array", "items": { "$ref": "#/components/schemas/Hour" } } }, "description": "Day" }, "LanguageStats": { "required": [ "document_count", "language_code", "percentage" ], "type": "object", "properties": { "language_code": { "type": "string" }, "document_count": { "type": "integer", "format": "int64" }, "percentage": { "type": "number", "format": "double" } }, "description": "LanguageStats" }, "AnalyticsTag": { "required": [ "document_count", "percentage", "tag" ], "type": "object", "properties": { "tag": { "type": "string" }, "document_count": { "type": "integer", "format": "int64" }, "percentage": { "type": "number", "format": "double" } }, "description": "Tag" }, "AnalyticsServiceUnavailable": { "description": "ServiceUnavailable", "example": { "message": "Service Unavailable", "errors": {} }, "allOf": [ { "$ref": "#/components/schemas/Errors" }, { "type": "object", "properties": { "message": { "type": "string" } }, "description": "ServiceUnavailable" } ] }, "Hour": { "required": [ "document_count", "timestamp" ], "type": "object", "properties": { "timestamp": { "title": "An ISO8601 date-time.", "type": "string", "description": "An ISO8601 date-time, including timezone offset.\n\nThe timezone offset is an offset in minutes from UTC.", "format": "date-time" }, "document_count": { "type": "integer", "format": "int64" } }, "description": "Hour" }, "Result": { "required": [ "author", "document_count" ], "type": "object", "properties": { "author": { "$ref": "#/components/schemas/Author" }, "document_count": { "type": "integer", "format": "int64" } }, "description": "Result" }, "Document": { "required": [ "author", "shares" ], "type": "object", "properties": { "author": { "$ref": "#/components/schemas/Author" }, "url": { "type": "string" }, "country_code": { "type": "string" }, "shares": { "$ref": "#/components/schemas/Shares" }, "language_code": { "type": "string" }, "external_id": { "type": "string" }, "created_at": { "title": "An ISO8601 date-time.", "type": "string", "description": "An ISO8601 date-time, including timezone offset.\n\nThe timezone offset is an offset in minutes from UTC.", "format": "date-time" } }, "description": "Document" }, "Author": { "type": "object", "properties": { "username": { "type": "string" }, "display_name": { "type": "string" }, "twitter": { "$ref": "#/components/schemas/Twitter" }, "avatar_url": { "type": "string" }, "authority": { "type": "integer", "format": "int64" } }, "description": "Author" }, "Shares": { "type": "object", "properties": { "retweets": { "type": "integer", "format": "int64" }, "likes": { "type": "integer", "format": "int64" } }, "description": "Shares" }, "Keyphrase": { "required": [ "document_count", "keyphrase", "percentage" ], "type": "object", "properties": { "keyphrase": { "type": "string" }, "document_count": { "type": "integer", "format": "int64" }, "percentage": { "type": "number", "format": "double" } }, "description": "Keyphrase" }, "Link": { "required": [ "document_count", "link", "percentage" ], "type": "object", "properties": { "link": { "type": "string" }, "document_count": { "type": "integer", "format": "int64" }, "percentage": { "type": "number", "format": "double" } }, "description": "Link" }, "Mention": { "required": [ "document_count", "mention", "percentage" ], "type": "object", "properties": { "mention": { "type": "string" }, "document_count": { "type": "integer", "format": "int64" }, "percentage": { "type": "number", "format": "double" } }, "description": "Mention" }, "Topic": { "required": [ "document_count", "topic", "sub_topics", "percentage" ], "type": "object", "properties": { "topic": { "type": "string" }, "sub_topics": { "type": "object", "items": { "$ref": "#/components/schemas/Topic" } }, "document_count": { "type": "integer", "format": "int64" }, "percentage": { "type": "number", "format": "double" } }, "description": "Topic" }, "TopTagsResponse": { "required": [ "document_count", "tags" ], "type": "object", "properties": { "document_count": { "type": "integer", "format": "int64" }, "tags": { "type": "array", "items": { "$ref": "#/components/schemas/AnalyticsTag" } } }, "description": "TopTagsResponse" }, "TopMentionsResponse": { "required": [ "document_count", "tags" ], "type": "object", "properties": { "document_count": { "type": "integer", "format": "int64" }, "mentions": { "type": "array", "items": { "$ref": "#/components/schemas/Mention" } } }, "description": "TopMentionsResponse" }, "TopTopicsResponse": { "required": [ "document_count", "topics" ], "type": "object", "properties": { "document_count": { "type": "integer", "format": "int64" }, "mentions": { "type": "array", "items": { "$ref": "#/components/schemas/Topic" } } }, "description": "TopTopicsResponse" }, "TopSharedLinksResponse": { "required": [ "document_count", "links" ], "type": "object", "properties": { "document_count": { "type": "integer", "format": "int64" }, "links": { "type": "array", "items": { "$ref": "#/components/schemas/Link" } } }, "description": "TopKeyphrasesResponse" }, "TopKeyphrasesResponse": { "required": [ "document_count", "keyphrases" ], "type": "object", "properties": { "document_count": { "type": "integer", "format": "int64" }, "keyphrases": { "type": "array", "items": { "$ref": "#/components/schemas/Keyphrase" } } }, "description": "TopKeyphrasesResponse" }, "Unauthorized": { "required": [ "message" ], "type": "object", "properties": { "message": { "type": "string", "description": "A message describing, in brief, the problem." } }, "example": { "message": "Unauthorized" } }, "Sentiments": { "required": [ "negative", "neutral", "positive", "unknown" ], "type": "object", "properties": { "positive": { "$ref": "#/components/schemas/SentimentStats" }, "negative": { "$ref": "#/components/schemas/SentimentStats" }, "neutral": { "$ref": "#/components/schemas/SentimentStats" }, "unknown": { "$ref": "#/components/schemas/SentimentStats" } }, "description": "Sentiments" }, "TopEntitiesResponse": { "required": [ "document_count", "entities" ], "type": "object", "properties": { "document_count": { "type": "integer", "format": "int64" }, "entities": { "type": "array", "items": { "$ref": "#/components/schemas/Entity" } } }, "description": "TopEntitiesResponse" }, "TopSourcesResponse": { "required": [ "document_count", "sources" ], "type": "object", "properties": { "document_count": { "type": "integer", "format": "int64" }, "sources": { "type": "array", "items": { "$ref": "#/components/schemas/Result" } } }, "description": "TopSourcesResponse" }, "CustomAnalyticsRequest": { "required": [ "start_date", "end_date", "tz" ], "type": "object", "properties": { "start_date": { "type": "string", "format": "datetime", "example": "2024-03-25T00:00:00", "description": "Start date (UTC) in ISO 8601 Local standard.\nE.g. \"2024-03-25T00:00:00\"" }, "end_date": { "type": "string", "format": "datetime", "example": "2024-03-30T00:00:00", "description": "End date (UTC) in ISO 8601 Local standard.\nE.g. \"2024-03-30T00:00:00\"" }, "tz": { "type": "string", "example": "UTC" }, "languages": { "type": "array", "example": [ "en" ], "description": "The languages of documents to include in the query.\n\nA primary language subtag from the IANA language tag registry, 'zh-Hant',\n'zh-Hans' or 'zz'.\n\nIn addition to two and three letter primary subtags from the\n[IANA language tag registry](https://www.w3.org/International/articles/language-tags/#language),\nthe following special language codes are also supported:\n\n * `zh-Hans` - for Simplified Chinese\n * `zh-Hant` - for Traditional Chinese\n * `zz` - for unknown language\n\nThis restricts the documents queried to include only those in a\nparticular language.\n\nIf multiple languages are specified, documents in any of those languages\nwill be included in the results." }, "countries": { "type": "array", "example": [ "gb" ], "description": "The origin countries of documents to include in the query.\n\nThe two-letter ISO 3166-1 Alpha-2 country code, or 'ZZ'.\n\nBesides the two letter [ISO 3166-1 Alpha-2 country code](https://www.iso.org/obp/ui/#search/code/)\nof a country, 'ZZ' may be used to indicate 'Unknown country of origin'.\n\nThis restricts the documents queried to include only those that\noriginated from a particular country.\n\nIf multiple countries are specified, documents that originated from any\nof those countries will be included in results.\n\nDocuments that originated in some countries may be restricted from your\nqueries automatically, based on your jurisdiction and entitlements." }, "sources": { "type": "array", "example": [ "x" ], "description": "The origin sources of documents to include in the query. This restrictsthe documents queried to include only those that originated from these selected sources.\n\nIf multiple sources are selected, documents from any of those sources will be included in the results.\n\n*Available values*: forums, blogs, douyin, sina_weibo, twitch, facebook, wechat, news, pinterest,x, instagram, little_red_book, bilibili, youku, kakotalk, broadcast and linevoom." }, "sentiments": { "type": "array", "example": [ "positive" ], "description": "The overall sentiment of the document to filter on.\n\nIf multiple sentiments are specified, documents that match any of the sentiments will be included in the results.\n\n*Available values*: positive, negative and neutral." }, "analytic": { "$ref": "#/components/schemas/CustomAnalyticsRequestAnalytic" }, "keywords": { "type": "array", "example": [ "USA", "UK" ], "description": "List of keywords to filter documents by." }, "emojis": { "type": "array", "example": [ "\ud83d\ude00", "\ud83d\ude22" ], "description": "List of emojis to filter documents by." }, "custom_categories": { "type": "array", "example": [ "1234", "5678" ], "description": "List of custom category IDs to filter documents by." }, "filter_set": { "type": "string", "example": "\"4321\"", "description": "ID of a filter set to apply." }, "author_lists": { "type": "array", "example": [ "1111", "2222" ], "description": "List of author list IDs to filter documents by." } } }, "CustomAnalyticsRequestAnalytic": { "required": [ "type" ], "type": "object", "properties": { "type": { "type": "string", "example": "top_terms", "description": "The type of analytic to query with.", "enum": [ "document_count", "top_terms", "count_unique", "date_histogram", "measure_statistics" ] }, "dimension": { "type": "string", "example": "language", "description": "The dimension to use in a `top_terms` or `count_unique` analytic type. Use the `GET v3/analytics/custom/catalog` endpoint to see what dimensions are available." }, "limit": { "type": "number", "example": 10, "default": 10, "maximum": 100, "minimum": 1, "description": "The limit to the number of terms to return in a `top_terms` analytic type." }, "measures": { "type": "array", "example": [ "views", "estimated_views" ], "description": "The measures to use in a `measures_statistics` analytic type. Use the `GET v3/analytics/custom/catalog` endpoint to see what measures are available." }, "granularity": { "type": "string", "example": "day", "description": "The granularity to use in a `date_histogram` analytic type.", "enum": [ "hour", "day", "week", "month" ] }, "analysis": { "$ref": "#/components/schemas/CustomAnalyticsRequestAnalytic" } } }, "CustomAnalyticsResponse": { "type": "object", "properties": { "start_date": { "type": "string", "format": "datetime", "example": "2024-03-25T00:00:00", "description": "Start date used in the request" }, "end_date": { "type": "string", "format": "datetime", "example": "2024-03-30T00:00:00", "description": "End date used in the request" }, "tz": { "type": "string", "example": "UTC", "description": "Timezone used in the request" }, "languages": { "type": "array", "example": [ "en" ], "description": "Language filters used in the request" }, "countries": { "type": "array", "example": [ "gb" ], "description": "Country filters used in the request" }, "sources": { "type": "array", "example": [ "x" ], "description": "Source filters used in the request" }, "sentiments": { "type": "array", "example": [ "positive" ], "description": "Sentiment filters used in the request" }, "search_id": { "type": "number", "example": 12393, "description": "Saved Search ID used in the request" }, "analytic": { "$ref": "#/components/schemas/CustomAnalyticsRequestAnalytic" }, "results": { "type": "object", "properties": { "document_count": { "type": "number", "example": 12000, "description": "Total number of documents that matched the search and filters" }, "analysis": { "oneOf": [ { "type": "array", "items": { "type": "object", "properties": { "document_count": { "type": "number", "example": 12345, "description": "Number of documents that are contained in either the `date_histogram` or `top_terms` bucket" }, "percentage": { "type": "number", "example": 30.0, "description": "Percentage of documents compared to the parent bucket. If the analysis has no parent, then the percentage is calculated from the total document count." }, "key": { "type": "string", "example": "EN" }, "label": { "type": "string", "example": "English", "description": "Some dimensions will include extra enriched information when used in a `top_terms` analytic type" }, "change": { "type": "number", "example": 357, "description": "Change in number of documents from the previous date histogram timeseries bucket" }, "analysis": { "type": "object", "description": "Any nested analysis is contained in the buckets of the parent analysis", "additionalProperties": {} } }, "additionalProperties": {} } }, { "type": "number", "example": 12345, "description": "For analytic types (eg. `count_unique`) that don't involve buckets or statistic breakdowns, only the result is returned." } ] } } } }, "example": { "start_date": "2024-01-01T00:00:00", "end_date": "2024-01-10T00:00:00", "tz": "UTC", "analysis": { "type": "document_count" }, "results": { "document_count": 123456 } } }, "CustomAnalyticsCatalogResponse": { "type": "object", "properties": { "dimensions": { "type": "array", "items": { "type": "string" }, "description": "All dimensions able to be used in `top_terms` and `count_unique` analytics" }, "measures": { "type": "array", "items": { "type": "string" }, "description": "All measures able to be used in `measure_statistics` analytics" }, "types": { "type": "array", "items": { "type": "string" }, "description": "All analytic types that can be used" } }, "example": { "dimensions": [ "keyphrase", "language" ], "measures": [ "engagement", "views" ], "types": [ "document_count", "top_terms", "date_histogram", "measure_statistics", "count_unique" ] } }, "ServiceUnavailable": { "type": "object", "title": "Service Unavailable", "properties": { "errors": { "type": "array", "items": { "type": "object", "title": "Error object", "required": [ "type", "details", "title" ], "properties": { "type": { "type": "string", "example": "VALIDATION", "description": "Category of error" }, "title": { "type": "string", "example": "Validation error for field: type", "description": "Title of error" }, "details": { "type": "string", "example": "This field cannot be updated", "description": "Details about the error" } }, "additionalProperties": false }, "description": "List of problems with the request" } }, "example": { "errors": [ { "type": "SEARCH", "title": "Service unavailable", "details": "Temporarily unable to handle the request, try again later" } ] }, "description": "Service Unavailable" }, "SearchId": { "type": "integer" }, "SearchDetails": { "type": "object", "title": "Search details", "required": [ "name", "id" ], "properties": { "name": { "type": "string", "example": "Elections", "description": "Search name" }, "id": { "type": "integer", "example": 123, "description": "Search id" } }, "additionalProperties": false }, "CustomCategoriesDetails": { "type": "object", "title": "Custom categories details", "required": [ "name", "id", "type" ], "properties": { "name": { "type": "string", "example": "My Category", "description": "Category name" }, "id": { "type": "integer", "example": 321, "description": "Category ID" }, "type": { "type": "string", "example": "include", "description": "Category type" } }, "additionalProperties": false }, "CustomCategoriesRequestDetails": { "type": "object", "title": "Custom categories details", "required": [ "ids" ], "properties": { "ids": { "type": "array", "items": { "type": "integer" }, "description": "List of custom category ids" }, "filter": { "type": "boolean", "description": "Whether to include selected custom categories as filters" } } }, "CustomCategoriesResponseDetails": { "type": "object", "title": "Custom categories details", "properties": { "ids": { "type": "array", "items": { "$ref": "#/components/schemas/CustomCategoriesDetails" } }, "filter": { "type": "boolean", "description": "Whether to include selected custom categories as filters" } } }, "RecurringExportResult": { "type": "object", "title": "Recurring export", "required": [ "searches", "company_name", "id" ], "properties": { "window_weekday": { "type": "integer", "description": "An integer representation of what day of the week the export window starts. Integer values are: Monday=1, Tuesday=2, Wednesday=3, Thursday=4, Friday=5, Saturday=6, Sunday=7 Defaults to 1", "default": 1 }, "window_time_unit": { "type": "string", "enum": [ "DAY", "WEEK", "MONTH" ], "description": "Window Time Unit. The time unit the export window represents. Defaults to \"DAY\"", "default": "DAY" }, "window_time": { "type": "string", "description": "Window Time. The time of day the export window begins. Defaults to \"00:00:00\"", "default": "00:00:00" }, "window_size": { "type": "integer", "description": "Window size. The number of 'window_time_unit's the export window covers. Defaults to 1", "default": 1 }, "window_monthday": { "type": "integer", "description": "An integer representation of what day of the month the export window starts. Integer values 1-28 represent the day of the month e.g. 1 represents 1st, 2 represents the 2nd, etc. Integer value 0 represents the last day of the month. Defaults to 1", "default": 1 }, "sample": { "$ref": "#/components/schemas/SampleConfiguration" }, "template": { "$ref": "#/components/schemas/TemplateConfiguration" }, "updated_at": { "type": "string", "description": "The datetime the export was last updated" }, "timezone": { "type": "string", "description": "Timezone for window_time field. Must be a valid timezone in the IANA database. Defaults to \"Etc/UTC\"", "default": "Etc/UTC" }, "tags": { "type": "array", "items": { "$ref": "#/components/schemas/Tag" }, "description": "List of tag names used for the export" }, "status_reason": { "type": "string", "description": "Optional explanation for current status" }, "status": { "type": "string", "enum": [ "PENDING", "ACTIVE", "CANCELLED" ], "description": "Current status of the recurring export" }, "searches": { "type": "array", "items": { "$ref": "#/components/schemas/SearchDetails" }, "description": "List of searches used for the export" }, "next_run_date": { "type": "string", "description": "Next Run Date - the datetime on which your export refresh will start." }, "inserted_at": { "type": "string", "description": "The datetime the export was created" }, "id": { "type": "integer", "description": "ID of the export" }, "data_url": { "type": "string", "description": "The URL at which the export data can be retrieved" }, "company_name": { "type": "string", "description": "Company the export belongs to" }, "format": { "type": "string", "description": "The selected output format for the export", "enum": [ "JSON", "CSV" ] }, "custom_categories": { "$ref": "#/components/schemas/CustomCategoriesResponseDetails" } } }, "RecurringExportResponse": { "type": "object", "title": "Recurring export Response", "required": [ "recurring_export" ], "properties": { "recurring_export": { "$ref": "#/components/schemas/RecurringExportResult" } }, "description": "Recurring export Response", "additionalProperties": false }, "RecurringExportShowResult": { "type": "object", "title": "Recurring export", "required": [ "searches", "company_name", "id" ], "properties": { "window_weekday": { "type": "integer", "description": "An integer representation of what day of the week the export window starts. Integer values are: Monday=1, Tuesday=2, Wednesday=3, Thursday=4, Friday=5, Saturday=6, Sunday=7 Defaults to 1", "default": 1 }, "window_time_unit": { "type": "string", "enum": [ "DAY", "WEEK", "MONTH" ], "description": "Window Time Unit. The time unit the export window represents. Defaults to \"DAY\"", "default": "DAY" }, "window_time": { "type": "string", "description": "Window Time. The time of day the export window begins. Defaults to \"00:00:00\"", "default": "00:00:00" }, "window_size": { "type": "integer", "description": "Window size. The number of 'window_time_unit's the export window covers. Defaults to 1", "default": 1 }, "window_monthday": { "type": "integer", "description": "An integer representation of what day of the month the export window starts. Integer values 1-28 represent the day of the month e.g. 1 represents 1st, 2 represents the 2nd, etc. Integer value 0 represents the last day of the month. Defaults to 1", "default": 1 }, "sample": { "$ref": "#/components/schemas/SampleConfiguration" }, "template": { "$ref": "#/components/schemas/TemplateConfiguration" }, "updated_at": { "type": "string", "description": "The datetime the export was last updated" }, "timezone": { "type": "string", "description": "Timezone for window_time field. Must be a valid timezone in the IANA database. Defaults to \"Etc/UTC\"", "default": "Etc/UTC" }, "tags": { "type": "array", "items": { "$ref": "#/components/schemas/Tag" }, "description": "List of tag names used for the export" }, "status_reason": { "type": "string", "description": "Optional explanation for current status" }, "status": { "type": "string", "enum": [ "PENDING", "ACTIVE", "CANCELLED" ], "description": "Current status of the recurring export" }, "searches": { "type": "array", "items": { "$ref": "#/components/schemas/SearchDetails" }, "description": "List of searches used for the export" }, "next_run_date": { "type": "string", "description": "Next Run Date - the datetime on which your export refresh will start." }, "inserted_at": { "type": "string", "description": "The datetime the export was created" }, "id": { "type": "integer", "description": "ID of the export" }, "data_url": { "type": "string", "description": "The URL at which the export data can be retrieved" }, "company_name": { "type": "string", "description": "Company the export belongs to" }, "format": { "type": "string", "description": "The selected output format for the export", "enum": [ "JSON", "CSV" ] }, "custom_categories": { "$ref": "#/components/schemas/CustomCategoriesResponseDetails" }, "previous_runs": { "type": "array", "items": { "$ref": "#/components/schemas/RecurringExportPreviousRuns" }, "description": "List of previous runs for the recurring export" } } }, "RecurringExportShowResponse": { "type": "object", "title": "Recurring export Response", "required": [ "recurring_export" ], "properties": { "recurring_export": { "$ref": "#/components/schemas/RecurringExportShowResult" } }, "description": "Recurring export Response", "additionalProperties": false }, "RecurringExportPreviousRuns": { "type": "object", "title": "Recurring export previous runs", "properties": { "status": { "type": "string", "enum": [ "PENDING", "FINISHED", "CANCELLED", "EXPIRED" ] }, "start_date": { "type": "string", "format": "datetime", "example": "2020-03-25T00:00:00.000000Z", "description": "Start date of the export run (UTC) in ISO 8601 format" }, "end_date": { "type": "string", "format": "datetime", "example": "2020-03-29T23:59:59.000000Z", "description": "End date of the export run (UTC) in ISO 8601 format" }, "inserted_at": { "type": "string", "description": "The datetime the run was created", "example": "2020-03-25T00:00:00.000000" }, "updated_at": { "type": "string", "description": "The datetime the export was last updated", "example": "2020-03-25T00:00:00.000000" } }, "description": "Recurring export previous runs", "additionalProperties": false }, "RecurringExportRequest": { "type": "object", "title": "Recurring export request", "properties": { "recurring_export": { "$ref": "#/components/schemas/RecurringExport" } }, "description": "POST body for creating a recurring export" }, "RecurringExportListResponse": { "type": "object", "title": "Recurring export list response", "required": [ "recurring_exports" ], "properties": { "recurring_exports": { "$ref": "#/components/schemas/RecurringExportList" } }, "description": "Recurring export list response", "additionalProperties": false }, "RecurringExportList": { "type": "array", "title": "Results", "items": { "$ref": "#/components/schemas/RecurringExportResult" }, "description": "A collection of recurring export results" }, "RecurringExport": { "type": "object", "title": "Recurring export", "required": [ "search_ids" ], "properties": { "window_weekday": { "type": "integer", "description": "An integer representation of what day of the week the export window starts. Integer values are: Monday=1, Tuesday=2, Wednesday=3, Thursday=4, Friday=5, Saturday=6, Sunday=7 Defaults to 1", "default": 1 }, "window_time_unit": { "type": "string", "enum": [ "DAY", "WEEK", "MONTH" ], "description": "Window Time Unit. The time unit the export window represents. Defaults to \"DAY\"", "default": "DAY" }, "window_time": { "type": "string", "description": "Window Time. The time of day the export window begins. Defaults to \"00:00:00\"", "default": "00:00:00" }, "window_size": { "type": "integer", "description": "Window size. The number of 'window_time_unit's the export window covers Defaults to 1", "default": 1 }, "window_monthday": { "type": "integer", "description": "An integer representation of what day of the month the export window starts. Integer values 1-28 represent the day of the month e.g. 1 represents 1st, 2 represents the 2nd, etc. Integer value 0 represents the last day of the month. Defaults to 1", "default": 1 }, "timezone": { "type": "string", "description": "Timezone for window_time field. Must be a valid timezone in the IANA database. Defaults to \"Etc/UTC\"", "default": "Etc/UTC" }, "tags": { "type": "array", "items": { "$ref": "#/components/schemas/Tag" }, "example": [ "tag" ], "description": "List of tag names" }, "search_ids": { "type": "array", "items": { "$ref": "#/components/schemas/SearchId" }, "example": [ 123 ], "description": "List of search ids" }, "template": { "$ref": "#/components/schemas/TemplateConfiguration" }, "sample": { "$ref": "#/components/schemas/SampleConfiguration" }, "format": { "type": "string", "description": "The selected output format for the export", "enum": [ "JSON", "CSV" ] }, "custom_categories": { "$ref": "#/components/schemas/CustomCategoriesRequestDetails" } }, "example": { "window_time_unit": "DAY", "window_time": "00:00:00", "window_size": 1, "timezone": "Etc/UTC", "tags": [ "tag" ], "search_ids": [ 123 ], "sample": { "count": 1200, "percentage": 25.0 }, "template": { "name": "legacy" }, "format": "JSON", "custom_categories": { "ids": [ 123 ], "filter": true } }, "description": "A recurring export" }, "OneTimeExportResult": { "type": "object", "title": "One-time export", "required": [ "end_date", "start_date", "searches", "company_name", "id" ], "properties": { "updated_at": { "type": "string", "description": "The datetime the export was last updated", "example": "2020-03-25T00:00:00.000000" }, "tags": { "type": "array", "items": { "$ref": "#/components/schemas/Tag" }, "description": "List of tag names used for the export" }, "status_reason": { "type": "string", "description": "Optional explanation for current status" }, "status": { "type": "string", "enum": [ "PENDING", "FINISHED", "CANCELLED", "EXPIRED" ], "description": "Current status of the one-time export" }, "start_date": { "type": "string", "format": "datetime", "example": "2020-03-25T00:00:00.000000Z", "description": "Start date of the export (UTC) in ISO 8601 format" }, "searches": { "type": "array", "items": { "$ref": "#/components/schemas/SearchDetails" }, "description": "List of searches used for the export" }, "template": { "$ref": "#/components/schemas/TemplateConfiguration" }, "sample": { "$ref": "#/components/schemas/SampleConfiguration" }, "inserted_at": { "type": "string", "description": "The datetime the export was created", "example": "2020-03-25T00:00:00.000000" }, "id": { "type": "integer", "description": "ID of the export" }, "end_date": { "type": "string", "format": "datetime", "example": "2020-03-29T23:59:59.000000Z", "description": "End date of the export (UTC) in ISO 8601 format" }, "data_url": { "type": "string", "description": "The URL at which the export data can be retrieved", "example": "https://downloads.exports.meltwater.com/v1/one-time/12345?data_key=abcdef0123456789" }, "company_name": { "type": "string", "description": "Company the export belongs to" }, "format": { "type": "string", "description": "The selected output format for the export", "enum": [ "JSON", "CSV" ] }, "custom_categories": { "$ref": "#/components/schemas/CustomCategoriesResponseDetails" } } }, "OneTimeExportResponse": { "type": "object", "title": "One-time export Response", "required": [ "onetime_export" ], "properties": { "onetime_export": { "$ref": "#/components/schemas/OneTimeExportResult" } }, "description": "One-time export Response", "additionalProperties": false }, "OneTimeExportRequest": { "type": "object", "title": "One-time export request", "properties": { "onetime_export": { "$ref": "#/components/schemas/OneTimeExport" } }, "description": "POST body for creating a one-time export" }, "OneTimeExportListResponse": { "type": "object", "title": "One-time export list response", "required": [ "onetime_exports" ], "properties": { "onetime_exports": { "$ref": "#/components/schemas/OneTimeExportList" } }, "description": "One-time export list response", "additionalProperties": false }, "OneTimeExportList": { "type": "array", "title": "Results", "items": { "$ref": "#/components/schemas/OneTimeExportResult" }, "description": "A collection of one-time export results" }, "OneTimeExport": { "type": "object", "title": "One-time export", "required": [ "end_date", "start_date", "search_ids" ], "properties": { "tags": { "type": "array", "items": { "$ref": "#/components/schemas/Tag" }, "example": [ "tag" ], "description": "List of tag names" }, "start_date": { "type": "string", "format": "datetime", "example": "2020-03-25T00:00:00Z", "description": "Start date (UTC) in ISO 8601 standard.\nE.g. \"2020-03-25T00:00:00Z\"" }, "search_ids": { "type": "array", "items": { "$ref": "#/components/schemas/SearchId" }, "example": [ 123 ], "description": "List of search ids" }, "end_date": { "type": "string", "format": "datetime", "example": "2020-03-29T23:59:59Z", "description": "End date (UTC) in ISO 8601 standard.\nE.g. \"2020-03-29T23:59:59Z\"" }, "template": { "$ref": "#/components/schemas/TemplateConfiguration" }, "sample": { "$ref": "#/components/schemas/SampleConfiguration" }, "format": { "type": "string", "description": "The selected output format for the export", "enum": [ "JSON", "CSV" ] }, "custom_categories": { "$ref": "#/components/schemas/CustomCategoriesRequestDetails" } }, "example": { "tags": [ "tag" ], "start_date": "2020-03-25T00:00:00Z", "search_ids": [ 123 ], "end_date": "2020-03-29T23:59:59Z", "template": { "name": "legacy" }, "sample": { "count": 10000, "percentage": 10.0 }, "format": "CSV", "custom_categories": { "ids": [ 123 ], "filter": true } }, "description": "A one-time export" }, "TemplateConfiguration": { "type": "object", "title": "Template Configuration", "properties": { "name": { "type": "string", "example": "legacy", "description": "The name of the template being requested" } } }, "SearchRequest": { "required": [ "tz" ], "type": "object", "properties": { "countries": { "type": "array", "example": [ "gb", "us" ], "items": { "type": "string" } }, "end": { "type": "string", "example": "2021-09-28T00:00:00" }, "languages": { "type": "array", "example": [ "en", "fr" ], "items": { "type": "string" } }, "page": { "maximum": 10, "type": "integer", "example": 1 }, "page_size": { "maximum": 100, "minimum": 0, "type": "integer", "example": 10 }, "sentiments": { "type": "array", "example": [ "positive", "negative" ], "items": { "type": "string" } }, "sort_by": { "type": "string", "example": "date", "enum": [ "date", "country", "sentiment", "language", "title", "reach", "relevance", "engagement", "social_echo", "prominence", "views" ] }, "sort_order": { "type": "string", "example": "desc", "enum": [ "asc", "desc" ] }, "sources": { "type": "array", "example": [ "x", "news", "broadcast" ], "items": { "type": "string" } }, "start": { "type": "string", "example": "2021-09-27T00:00:00" }, "template": { "$ref": "#/components/schemas/TemplateConfiguration" }, "tz": { "type": "string", "example": "Europe/London" }, "keywords": { "type": "array", "example": [ "USA", "UK" ], "description": "List of keywords to filter documents by." }, "emojis": { "type": "array", "example": [ "\ud83d\ude00", "\ud83d\ude22" ], "description": "List of emojis to filter documents by." }, "custom_categories": { "type": "array", "example": [ "1234", "5678" ], "description": "List of custom category IDs to filter documents by." }, "filter_set": { "type": "string", "example": "\"4321\"", "description": "ID of a filter set to apply." }, "author_lists": { "type": "array", "example": [ "1111", "2222" ], "description": "List of author list IDs to filter documents by." } } }, "SearchResponse": { "required": [ "tz" ], "type": "object", "properties": { "countries": { "type": "array", "example": [ "gb", "us" ], "items": { "type": "string" } }, "end": { "type": "string", "example": "2021-09-28T00:00:00" }, "languages": { "type": "array", "example": [ "en", "fr" ], "items": { "type": "string" } }, "page": { "maximum": 10, "type": "integer", "example": 1 }, "page_size": { "maximum": 100, "minimum": 0, "type": "integer", "example": 10 }, "result": { "$ref": "#/components/schemas/DocumentResponse" }, "search_id": { "type": "integer", "example": 12345 }, "sentiments": { "type": "array", "example": [ "positive", "negative" ], "items": { "type": "string" } }, "sort_by": { "type": "string", "example": "date", "enum": [ "date", "country", "sentiment", "language", "title", "reach", "relevance", "engagement", "social_echo", "prominence", "views" ] }, "sort_order": { "type": "string", "example": "desc", "enum": [ "asc", "desc" ] }, "sources": { "type": "array", "example": [ "x", "news" ], "items": { "type": "string" } }, "start": { "type": "string", "example": "2021-09-27T00:00:00" }, "template": { "$ref": "#/components/schemas/TemplateConfiguration" }, "tz": { "type": "string", "example": "Europe/London" } } }, "DocumentResponse": { "type": "object", "properties": { "document_count": { "type": "integer", "example": 100 }, "documents": { "type": "array", "items": { "type": "object", "example": { "id": "123abc123", "opening_text": "This is a document ..." } } } } }, "SampleConfiguration": { "type": "object", "title": "Sample Configuration", "properties": { "count": { "type": "integer", "example": 1200, "description": "Maximum number of documents for the export, max value 2 million docs" }, "percentage": { "type": "number", "format": "double", "example": 50.0, "description": "Percentage of documents for the export" } } }, "ValidationMetadata": { "type": "object", "title": "Metadata", "required": [ "field" ], "properties": { "validation": { "type": "string", "example": "complexity", "enum": [ "syntax", "complexity", "length", "cast", "inclusion", "required", "content_type" ], "description": "The cause of the validation error" }, "field": { "type": "string", "example": "boolean", "description": "Name of the field that failed its validation checks" } }, "description": "Metadata for the error", "additionalProperties": true }, "UnprocessableEntityCompanyId": { "type": "object", "title": "Invalid company id", "properties": { "errors": { "type": "array", "items": { "type": "object", "title": "Validation error", "required": [ "type", "details", "title" ], "properties": { "type": { "type": "string", "example": "VALIDATION", "description": "Category of error" }, "title": { "type": "string", "example": "Validation error for field: type", "description": "Title of error" }, "meta": { "$ref": "#/components/schemas/ValidationMetadata" }, "details": { "type": "string", "example": "This field cannot be updated", "description": "Details about the error" } }, "additionalProperties": false }, "description": "List of problems with the request" } }, "example": { "errors": [ { "type": "VALIDATION", "title": "Validation error for field: company_id", "meta": { "field": "company_id" }, "details": "Company id is expected to contain alphanumeric characters only" } ] }, "description": "Invalid company id" }, "MissingResourceResponse": { "type": "object", "title": "Unknown resource", "properties": { "errors": { "type": "array", "items": { "type": "object", "title": "Error object", "required": [ "type", "details", "title" ], "properties": { "type": { "type": "string", "example": "VALIDATION", "description": "Category of error" }, "title": { "type": "string", "example": "Validation error for field: type", "description": "Title of error" }, "details": { "type": "string", "example": "This field cannot be updated", "description": "Details about the error" } }, "additionalProperties": false }, "description": "List of problems with the request" } }, "example": { "errors": [ { "type": "SEARCH", "title": "Unknown search", "details": "The search id (123) you provided is unknown" } ] }, "description": "Unknown resource" }, "InvalidPermissionsResponse": { "type": "object", "title": "Invalid Permissions", "properties": { "errors": { "type": "array", "items": { "type": "object", "title": "Error object", "required": [ "type", "details", "title" ], "properties": { "type": { "type": "string", "example": "VALIDATION", "description": "Category of error" }, "title": { "type": "string", "example": "Validation error for field: type", "description": "Title of error" }, "details": { "type": "string", "example": "This field cannot be updated", "description": "Details about the error" } }, "additionalProperties": false }, "description": "List of problems with the request" } }, "example": { "errors": [ { "type": "SEARCH", "title": "Missing company permissions", "details": "You do not have enough permissions to manage searches for the given company" } ] }, "description": "Invalid Permissions" }, "UnauthorizedResponse": { "type": "object", "title": "Unauthorized request", "properties": { "errors": { "type": "array", "items": { "type": "object", "title": "Error object", "required": [ "type", "details", "title" ], "properties": { "type": { "type": "string", "example": "VALIDATION", "description": "Category of error" }, "title": { "type": "string", "example": "Validation error for field: type", "description": "Title of error" }, "details": { "type": "string", "example": "This field cannot be updated", "description": "Details about the error" } }, "additionalProperties": false }, "description": "List of problems with the request" } }, "example": { "errors": [ { "type": "AUTH", "title": "Unauthorized", "details": "Invalid or expired authorization header" } ] }, "description": "Unauthorized request" }, "InternalServerErrorResponse": { "type": "object", "title": "Internal Server error", "properties": { "errors": { "type": "array", "items": { "type": "object", "title": "Error object", "required": [ "type", "details", "title" ], "properties": { "type": { "type": "string", "example": "VALIDATION", "description": "Category of error" }, "title": { "type": "string", "example": "Validation error for field: type", "description": "Title of error" }, "details": { "type": "string", "example": "This field cannot be updated", "description": "Details about the error" } }, "additionalProperties": false }, "description": "List of problems with the request" } }, "example": { "errors": [ { "type": "INTERNAL", "title": "Internal Server error", "details": "Something went wrong behind the scenes..." } ] }, "description": "Internal Server error" }, "TopLocationsResponse": { "required": [ "document_count", "locations" ], "type": "object", "properties": { "document_count": { "type": "integer", "format": "int64" }, "locations": { "type": "array", "items": { "$ref": "#/components/schemas/Location" } } }, "description": "TopLocationsResponse" }, "Location": { "required": [ "document_count", "location_id", "location_name", "percentage" ], "type": "object", "properties": { "location_name": { "type": "string" }, "location_id": { "type": "string" }, "document_count": { "type": "integer", "format": "int64" }, "percentage": { "type": "number", "format": "double" } }, "description": "Location" }, "UsageInternalErrorResponse": { "type": "object", "properties": { "message": { "type": "string" } } }, "UsageCount": { "type": "object", "properties": { "count": { "type": "number" } } }, "DocumentMetricsTimeFrame": { "type": "object", "properties": { "count": { "type": "number" }, "timestamp": { "type": "string" } } }, "MetricsTimeSeries": { "type": "object", "properties": { "count": { "type": "number" }, "metric": { "type": "string", "enum": [ "export_count", "document_count" ] }, "period": { "type": "string", "enum": [ "24hours", "7days", "30days", "12months" ] }, "feature": { "type": "string", "enum": [ "streaming", "exports" ] }, "time_series": { "type": "array", "items": { "$ref": "#/components/schemas/DocumentMetricsTimeFrame" } }, "units": { "type": "string", "enum": [ "hour", "day", "month" ] } } }, "Functions": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/UsageCount" } }, "HttpCallsTimeFrame": { "type": "object", "properties": { "calls": { "$ref": "#/components/schemas/Versions" }, "timestamp": { "type": "string" } } }, "HttpRequestsTimeSeries": { "type": "object", "properties": { "count": { "type": "number" }, "time_series": { "type": "array", "items": { "$ref": "#/components/schemas/HttpCallsTimeFrame" } }, "units": { "type": "string", "enum": [ "hour", "day", "month" ] } } }, "Features": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Functions" } }, "Versions": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Features" } }, "Error": { "type": "object", "properties": { "message": { "type": "string" } } }, "ValidationError": { "type": "object", "properties": { "errors": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "string" } } }, "message": { "type": "string" } } }, "MWAPIErrorDetails": { "type": "object", "properties": { "type": { "type": "string" }, "title": { "type": "string" }, "details": { "type": "string" } } }, "accounts.Response": { "required": [ "accounts", "count" ], "type": "object", "properties": { "accounts": { "type": "array", "items": { "$ref": "#/components/schemas/social_accounts.Connection" } }, "count": { "type": "integer" } } }, "analytics.InsightBreakdownValue": { "required": [ "key", "value" ], "type": "object", "properties": { "key": { "type": "string" }, "key_label": { "type": "string" }, "value": { "type": "number" } } }, "analytics.InsightHeatmapValue": { "required": [ "hour", "value" ], "type": "object", "properties": { "hour": { "type": "integer" }, "value": { "type": "number" } } }, "analytics.InsightNestedBreakdownValue": { "required": [ "key", "subkey", "value" ], "type": "object", "properties": { "key": { "type": "string" }, "subkey": { "type": "string" }, "value": { "type": "number" } } }, "breakdown.AccountNumericMetrics": { "required": [ "daily_values", "id", "name", "source", "username" ], "type": "object", "properties": { "daily_values": { "type": "array", "items": { "$ref": "#/components/schemas/breakdown.DailyValues" } }, "id": { "type": "string" }, "name": { "type": "string" }, "source": { "type": "string" }, "username": { "type": "string" } } }, "breakdown.DailyValues": { "required": [ "date" ], "type": "object", "properties": { "date": { "type": "string" }, "demographics_audience_city": { "$ref": "#/components/schemas/analytics.InsightBreakdownValue" }, "demographics_audience_country": { "$ref": "#/components/schemas/analytics.InsightBreakdownValue" } } }, "breakdown.MetricsResponse": { "required": [ "accounts" ], "type": "object", "properties": { "accounts": { "type": "array", "items": { "$ref": "#/components/schemas/breakdown.AccountNumericMetrics" } } } }, "heatmap.AccountNumericMetrics": { "required": [ "daily_values", "id", "name", "source", "username" ], "type": "object", "properties": { "daily_values": { "type": "array", "items": { "$ref": "#/components/schemas/heatmap.DailyValues" } }, "id": { "type": "string" }, "name": { "type": "string" }, "source": { "type": "string" }, "username": { "type": "string" } } }, "heatmap.DailyValues": { "required": [ "date" ], "type": "object", "properties": { "date": { "type": "string" }, "page_fans_heatmap": { "$ref": "#/components/schemas/analytics.InsightHeatmapValue" } } }, "heatmap.MetricsResponse": { "required": [ "accounts" ], "type": "object", "properties": { "accounts": { "type": "array", "items": { "$ref": "#/components/schemas/heatmap.AccountNumericMetrics" } } } }, "lib.Metric": { "type": "object", "properties": { "description": { "type": "string" }, "metric": { "type": "string" }, "name": { "type": "string" }, "type": { "type": "string" } } }, "lib.SupportedSource": { "type": "object", "properties": { "account_metrics": { "type": "array", "items": { "$ref": "#/components/schemas/lib.Metric" } }, "name": { "type": "string" }, "post_metrics": { "type": "array", "items": { "$ref": "#/components/schemas/lib.Metric" } }, "source": { "type": "string" } } }, "nested_breakdown.AccountNumericMetrics": { "required": [ "daily_values", "id", "name", "source", "username" ], "type": "object", "properties": { "daily_values": { "type": "array", "items": { "$ref": "#/components/schemas/nested_breakdown.DailyValues" } }, "id": { "type": "string" }, "name": { "type": "string" }, "source": { "type": "string" }, "username": { "type": "string" } } }, "nested_breakdown.DailyValues": { "required": [ "date" ], "type": "object", "properties": { "date": { "type": "string" }, "demographics_gender_age": { "$ref": "#/components/schemas/analytics.InsightNestedBreakdownValue" } } }, "nested_breakdown.MetricsResponse": { "required": [ "accounts" ], "type": "object", "properties": { "accounts": { "type": "array", "items": { "$ref": "#/components/schemas/nested_breakdown.AccountNumericMetrics" } } } }, "numeric.AccountNumericMetrics": { "required": [ "daily_values", "id", "name", "source", "username" ], "type": "object", "properties": { "daily_values": { "type": "array", "items": { "$ref": "#/components/schemas/numeric.DailyValues" } }, "id": { "type": "string" }, "name": { "type": "string" }, "source": { "type": "string" }, "username": { "type": "string" } } }, "numeric.DailyValues": { "required": [ "date" ], "type": "object", "properties": { "date": { "type": "string" }, "follower_count": { "type": "integer" }, "impressions": { "type": "integer" }, "page_fan_removes": { "type": "integer" }, "page_fans": { "type": "integer" }, "page_fans_ads": { "type": "integer" }, "page_impressions": { "type": "integer" }, "page_impressions_organic": { "type": "integer" }, "page_impressions_paid": { "type": "integer" }, "page_post_engagements": { "type": "integer" }, "page_vide_views": { "type": "integer" }, "profile_views": { "type": "integer" }, "total_followers_counts": { "type": "integer" }, "website_clicks": { "type": "integer" } } }, "numeric.MetricsResponse": { "required": [ "accounts" ], "type": "object", "properties": { "accounts": { "type": "array", "items": { "$ref": "#/components/schemas/numeric.AccountNumericMetrics" } } } }, "posts.Account": { "required": [ "id", "name", "source", "username" ], "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "source": { "type": "string" }, "username": { "type": "string" } } }, "posts.Post": { "required": [ "account", "content", "created_at", "media_url", "metrics", "post_id", "post_type", "post_subtype", "tags", "url" ], "type": "object", "properties": { "account": { "$ref": "#/components/schemas/posts.Account" }, "content": { "type": "string" }, "created_at": { "type": "string" }, "media_url": { "type": "string" }, "metrics": { "$ref": "#/components/schemas/posts.PostMetrics" }, "post_id": { "type": "string" }, "post_type": { "type": "string" }, "post_subtype": { "type": "string" }, "tags": { "type": "array", "example": [ "My Tag", "My Other Tag" ] }, "url": { "type": "string" } } }, "posts.PostMetrics": { "required": [ "comments_count", "engagement", "engagement_rate", "followers_count_engagement_rate", "impressions", "like_count", "page_fans_engagement_rate", "post_clicks", "post_clicks_unique", "post_engaged_users", "post_impressions", "post_impressions_organic", "post_impressions_organic_unique", "post_impressions_paid", "post_impressions_paid_unique", "post_impressions_unique", "post_reactions_anger_total", "post_reactions_haha_total", "post_reactions_like_total", "post_reactions_love_total", "post_reactions_sorry_total", "post_reactions_wow_total", "post_video_avg_time_watched", "post_video_view_time", "post_video_views", "post_video_views_organic", "post_video_views_paid", "reach", "reactions_count", "saved", "shares_count", "video_views" ], "type": "object", "properties": { "comments_count": { "type": "integer" }, "engagement": { "type": "integer" }, "engagement_rate": { "type": "number" }, "followers_count_engagement_rate": { "type": "number" }, "impressions": { "type": "integer" }, "like_count": { "type": "integer" }, "page_fans_engagement_rate": { "type": "number" }, "post_clicks": { "type": "integer" }, "post_clicks_unique": { "type": "integer" }, "post_engaged_users": { "type": "integer" }, "post_impressions": { "type": "integer" }, "post_impressions_organic": { "type": "integer" }, "post_impressions_organic_unique": { "type": "integer" }, "post_impressions_paid": { "type": "integer" }, "post_impressions_paid_unique": { "type": "integer" }, "post_impressions_unique": { "type": "integer" }, "post_reactions_anger_total": { "type": "integer" }, "post_reactions_haha_total": { "type": "integer" }, "post_reactions_like_total": { "type": "integer" }, "post_reactions_love_total": { "type": "integer" }, "post_reactions_sorry_total": { "type": "integer" }, "post_reactions_wow_total": { "type": "integer" }, "post_video_avg_time_watched": { "type": "integer" }, "post_video_view_time": { "type": "integer" }, "post_video_views": { "type": "integer" }, "post_video_views_organic": { "type": "integer" }, "post_video_views_paid": { "type": "integer" }, "reach": { "type": "integer" }, "reactions_count": { "type": "integer" }, "saved": { "type": "integer" }, "shares_count": { "type": "integer" }, "video_views": { "type": "integer" } } }, "posts.TopPostsResponse": { "required": [ "count", "page", "page_size", "posts" ], "type": "object", "properties": { "count": { "type": "integer" }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "posts": { "type": "array", "items": { "$ref": "#/components/schemas/posts.Post" } } } }, "social_accounts.Connection": { "required": [ "id", "logo", "name", "source", "username" ], "type": "object", "properties": { "id": { "type": "string" }, "logo": { "type": "string" }, "name": { "type": "string" }, "source": { "type": "string" }, "username": { "type": "string" } } }, "supported_metrics.Response": { "type": "object", "properties": { "sources": { "type": "array", "items": { "$ref": "#/components/schemas/lib.SupportedSource" } } } }, "HooksCollection": { "type": "object", "properties": { "hooks": { "type": "array", "items": { "$ref": "#/components/schemas/Hook" } } }, "description": "List all hooks. Delivers all previously generated hooks." }, "Hook": { "type": "object", "properties": { "search_id": { "type": "integer", "format": "int32", "description": "Search id" }, "target_url": { "type": "string", "description": "The URL that results from the search will be posted to" }, "updated": { "type": "string" }, "search_type": { "type": "string", "description": "The type of search the hook is for" }, "hook_id": { "type": "string" }, "template": { "$ref": "#/components/schemas/TemplateConfiguration" }, "version": { "type": "string" }, "status": { "type": "string", "description": "The status of the hook. Can be PENDING, ACTIVE, PAUSED or HALTED" }, "status_reason": { "type": "string", "description": "The reason for current hook status if applicable" } }, "description": "Get an individual hook.\n Retrieves an existing hook." }, "postV2Hooks": { "type": "object", "properties": { "target_url": { "type": "string", "description": "Target URL to send article results" }, "search_id": { "type": "integer", "format": "int32", "description": "Search ID" }, "template": { "$ref": "#/components/schemas/TemplateConfiguration" } }, "required": [ "target_url", "search_id" ], "description": "Creates a hook for one of your predefined searches." }, "ErrorsCollection": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/HookError" } } } }, "HookError": { "type": "object", "properties": { "details": { "type": "string", "description": "Human-readable error message." }, "title": { "type": "string", "description": "Error title" }, "type": { "type": "string", "description": "Error category" }, "meta": { "type": "object", "description": "Additional meta-information to qualify error" } } }, "SingleHook": { "type": "object", "properties": { "hook": { "$ref": "#/components/schemas/Hook" } }, "description": "Get an individual hook.\n Retrieves an existing hook." }, "CreateTagConfig": { "type": "object", "properties": { "name": { "type": "string" } } }, "CreateTagRequest": { "type": "object", "title": "Tag", "example": { "tag": { "name": "new-tag" } }, "properties": { "tag": { "$ref": "#/components/schemas/CreateTagConfig" } } }, "CreateTagResponse": { "type": "object", "title": "Tag", "example": { "tag": { "id": 123, "name": "new-tag" } }, "properties": { "tag": { "$ref": "#/components/schemas/CreateTagResponseConfig" } } }, "CreateTagResponseConfig": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" } } }, "assignment_rules.AssignmentRuleInput": { "type": "object", "properties": { "query": { "$ref": "#/components/schemas/assignment_rules.RuleQueryInput" } } }, "assignment_rules.AssignmentRuleOutput": { "type": "object", "properties": { "created": { "type": "string", "example": "2025-01-01T00:00:00Z" }, "id": { "type": "integer", "example": 1 }, "query": { "type": "object", "additionalProperties": { "type": "string" }, "example": { "boolean": "this is a boolean", "type": "boolean" } }, "updated": { "type": "string", "example": "2025-01-01T00:00:00Z" } } }, "assignment_rules.CreateAssignmentRuleRequestInput": { "type": "object", "properties": { "rule": { "$ref": "#/components/schemas/assignment_rules.AssignmentRuleInput" } } }, "assignment_rules.RuleQueryInput": { "required": [ "case_sensitivity", "type" ], "type": "object", "properties": { "all_keywords": { "type": "array", "example": [ "car" ], "items": { "type": "string" } }, "any_keywords": { "type": "array", "example": [ "boat" ], "items": { "type": "string" } }, "boolean": { "type": "string", "example": "this is a boolean" }, "case_sensitivity": { "type": "string", "example": "yes", "enum": [ "yes", "no", "hybrid" ] }, "not_keywords": { "type": "array", "example": [ "plane" ], "items": { "type": "string" } }, "type": { "type": "string", "example": "boolean", "enum": [ "keyword", "boolean" ] } } }, "assignment_rules.SingleAssignmentRuleResponse": { "type": "object", "properties": { "rule": { "$ref": "#/components/schemas/assignment_rules.AssignmentRuleOutput" } } }, "controllers.ExplorePlusAPIError": { "type": "object", "properties": { "message": { "type": "string" } } }, "controllers.ExplorePlusAPIValidationError": { "type": "object", "properties": { "errors": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "string" } } }, "message": { "type": "string" } } }, "controllers.MWAPIError": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/validation.MWAPIErrorDetails" } } } }, "custom_field_values.CreateCustomFieldValue": { "required": [ "name" ], "type": "object", "properties": { "color": { "type": "string", "example": "#ffffff" }, "name": { "type": "string", "example": "my custom field value" } } }, "custom_field_values.CreateCustomFieldValueRequestInput": { "type": "object", "properties": { "custom_field_value": { "$ref": "#/components/schemas/custom_field_values.CreateCustomFieldValue" } } }, "custom_field_values.CustomFieldValueOutput": { "type": "object", "properties": { "color": { "type": "string", "example": "#ffffff" }, "created": { "type": "string", "example": "2025-01-01T00:00:00Z" }, "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "my custom field value" }, "num_rules": { "type": "integer", "example": 1 }, "rules": { "type": "array", "items": { "$ref": "#/components/schemas/assignment_rules.AssignmentRuleOutput" } }, "updated": { "type": "string", "example": "2025-01-01T00:00:00Z" } } }, "custom_field_values.SingleCustomFieldValueResponse": { "type": "object", "properties": { "custom_field_value": { "$ref": "#/components/schemas/custom_field_values.CustomFieldValueOutput" } } }, "custom_fields.CreateCustomField": { "required": [ "name", "type" ], "type": "object", "properties": { "description": { "type": "string", "example": "this is an example of a description" }, "folder_id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "my custom field" }, "type": { "type": "string", "example": "tag", "enum": [ "tag", "multi_value" ] } } }, "custom_fields.CreateCustomFieldRequestInput": { "type": "object", "properties": { "custom_field": { "$ref": "#/components/schemas/custom_fields.CreateCustomField" } } }, "custom_fields.CustomFieldFolderOutput": { "type": "object", "properties": { "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "my custom field folder" }, "num_custom_fields": { "type": "integer", "example": 1 } } }, "custom_fields.CustomFieldFoldersResponse": { "type": "object", "properties": { "folders": { "type": "array", "items": { "$ref": "#/components/schemas/custom_fields.CustomFieldFolderOutput" } }, "page": { "type": "integer", "example": 1 }, "page_size": { "type": "integer", "example": 10 }, "total": { "type": "integer", "example": 20 } } }, "custom_fields.CustomFieldOutput": { "type": "object", "properties": { "created": { "type": "string", "example": "2025-01-01T00:00:00Z" }, "description": { "type": "string", "example": "this is an example of a description" }, "folder_id": { "type": "integer", "example": 2 }, "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "my custom field" }, "type": { "type": "string", "example": "boolean" }, "updated": { "type": "string", "example": "2025-01-01T00:00:00Z" }, "values": { "type": "array", "items": { "$ref": "#/components/schemas/custom_field_values.CustomFieldValueOutput" } } } }, "custom_fields.MultiCustomFieldsResponse": { "type": "object", "properties": { "custom_fields": { "type": "array", "items": { "$ref": "#/components/schemas/custom_fields.CustomFieldOutput" } }, "page": { "type": "integer", "example": 1 }, "page_size": { "type": "integer", "example": 10 }, "total": { "type": "integer", "example": 20 } } }, "custom_fields.SingleCustomFieldResponse": { "type": "object", "properties": { "custom_field": { "$ref": "#/components/schemas/custom_fields.CustomFieldOutput" } } }, "custom_fields.UpdateCustomField": { "required": [ "description", "name" ], "type": "object", "properties": { "description": { "type": "string", "example": "this is an example of a description" }, "folder_id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "my custom field" } } }, "custom_fields.UpdateCustomFieldRequestInput": { "type": "object", "properties": { "custom_field": { "$ref": "#/components/schemas/custom_fields.UpdateCustomField" } } }, "docmod.DocModTag": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" } } }, "explore_plus.CombinedInput": { "type": "object", "properties": { "id": { "type": "integer", "example": 123456 }, "type": { "type": "string", "example": "SEARCH" } } }, "explore_plus.QueryInput": { "required": [ "type" ], "type": "object", "properties": { "all_keywords": { "type": "array", "example": [ "car" ], "items": { "type": "string" } }, "all_searches": { "type": "array", "items": { "$ref": "#/components/schemas/explore_plus.CombinedInput" } }, "any_keywords": { "type": "array", "example": [ "boat" ], "items": { "type": "string" } }, "any_searches": { "type": "array", "items": { "$ref": "#/components/schemas/explore_plus.CombinedInput" } }, "boolean": { "type": "string", "example": "this is a boolean" }, "case_sensitivity": { "type": "string", "example": "yes" }, "not_keywords": { "type": "array", "example": [ "plane" ], "items": { "type": "string" } }, "not_searches": { "type": "array", "items": { "$ref": "#/components/schemas/explore_plus.CombinedInput" } }, "type": { "type": "string", "example": "boolean", "enum": [ "keyword", "boolean", "combined" ] } } }, "searches.CreateSearch": { "required": [ "name" ], "type": "object", "properties": { "color": { "type": "string", "example": "#ffffff" }, "data_collection": { "type": "boolean", "example": true }, "description": { "type": "string", "example": "this is an example of a description" }, "folder_id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "my search" }, "query": { "$ref": "#/components/schemas/explore_plus.QueryInput" } } }, "searches.CreateSearchRequestInput": { "type": "object", "properties": { "search": { "$ref": "#/components/schemas/searches.CreateSearch" } } }, "searches.MultiSearchResponse": { "type": "object", "properties": { "page": { "type": "integer", "example": 1 }, "page_size": { "type": "integer", "example": 10 }, "searches": { "type": "array", "items": { "$ref": "#/components/schemas/searches.SearchOutput" } }, "total": { "type": "integer", "example": 20 } } }, "searches.SearchFolderOutput": { "type": "object", "properties": { "color": { "type": "string", "example": "#ffffff" }, "created": { "type": "string", "example": "2025-01-01T00:00:00Z" }, "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "my search folder" }, "num_searches": { "type": "integer", "example": 2 }, "parent": { "type": "integer", "example": 1 }, "updated": { "type": "string", "example": "2025-01-01T00:00:00Z" }, "hidden": { "type": "boolean", "example": false } } }, "searches.SearchFoldersResponse": { "type": "object", "properties": { "folders": { "type": "array", "items": { "$ref": "#/components/schemas/searches.SearchFolderOutput" } }, "page": { "type": "integer", "example": 1 }, "page_size": { "type": "integer", "example": 10 }, "total": { "type": "integer", "example": 20 } } }, "searches.SearchOutput": { "type": "object", "properties": { "color": { "type": "string", "example": "#ffffff" }, "created": { "type": "string", "example": "2025-01-01T00:00:00Z" }, "data_collection": { "type": "boolean", "example": false }, "data_collection_updated": { "type": "string", "example": "2025-01-01T00:00:00Z" }, "description": { "type": "string", "example": "this is an example of a description" }, "folder_id": { "type": "integer", "example": 2 }, "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "my search" }, "query": { "type": "object", "additionalProperties": { "type": "string" }, "example": { "boolean": "this is a boolean", "type": "boolean" } }, "updated": { "type": "string", "example": "2025-01-01T00:00:00Z" }, "hidden": { "type": "boolean", "example": false } } }, "searches.SingleSearchResponse": { "type": "object", "properties": { "search": { "$ref": "#/components/schemas/searches.SearchOutput" } } }, "validation.MWAPIErrorDetails": { "type": "object", "properties": { "details": { "type": "string" }, "title": { "type": "string" }, "type": { "type": "string" } } }, "controllers.APIError": { "type": "object", "properties": { "message": { "type": "string" } } }, "controllers.APIValidationError": { "type": "object", "properties": { "errors": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "string" } } }, "message": { "type": "string" } } }, "explore_plus.Analytic": { "type": "object", "properties": { "analysis": { "$ref": "#/components/schemas/explore_plus.Analytic" }, "custom_field_id": { "type": "integer", "example": 123 }, "dimension": { "type": "string", "example": "document_count" }, "granularity": { "type": "string", "example": "hour" }, "limit": { "type": "integer", "example": 10 }, "measures": { "type": "array", "example": [ "engagement" ], "items": { "type": "string" } }, "searches": { "type": "array", "example": [ 123, 456 ], "items": { "type": "integer" } }, "type": { "type": "string", "example": "document_count" } } }, "explore_plus.AnalyticResponse": { "type": "object", "properties": { "analysis": { "type": "array", "items": { "type": "integer" } }, "document_count": { "type": "integer" } } }, "explore_plus.CatalogResponse": { "type": "object", "properties": { "dimensions": { "type": "array", "example": [ "author_age", "author_gender" ], "items": { "type": "string" } }, "measures": { "type": "array", "example": [ "engagement", "estimated_views" ], "items": { "type": "string" } }, "types": { "type": "array", "example": [ "document_count", "top_terms" ], "items": { "type": "string" } } } }, "explore_plus.CustomAnalyticsRequest": { "required": [ "analysis", "end", "searches", "start", "tz" ], "type": "object", "properties": { "analysis": { "$ref": "#/components/schemas/explore_plus.Analytic" }, "end": { "type": "string", "example": "2021-09-28T00:00:00" }, "filters": { "$ref": "#/components/schemas/explore_plus.Filters" }, "searches": { "$ref": "#/components/schemas/explore_plus.IntBreakdown" }, "start": { "type": "string", "example": "2021-09-27T00:00:00" }, "tz": { "type": "string", "example": "Europe/London" } } }, "explore_plus.CustomResponse": { "required": [ "analysis", "end", "searches", "start", "tz" ], "type": "object", "properties": { "analysis": { "$ref": "#/components/schemas/explore_plus.Analytic" }, "end": { "type": "string", "example": "2021-09-28T00:00:00" }, "filters": { "$ref": "#/components/schemas/explore_plus.Filters" }, "result": { "$ref": "#/components/schemas/explore_plus.AnalyticResponse" }, "searches": { "$ref": "#/components/schemas/explore_plus.IntBreakdown" }, "start": { "type": "string", "example": "2021-09-27T00:00:00" }, "tz": { "type": "string", "example": "Europe/London" } } }, "explore_plus.ExplorePlusParameters": { "required": [ "tz" ], "type": "object", "properties": { "doc_ids": { "type": "array", "example": [ "document1", "document2" ], "items": { "type": "string" } }, "end": { "type": "string", "example": "2021-09-28T00:00:00" }, "filters": { "$ref": "#/components/schemas/explore_plus.Filters" }, "page": { "type": "integer", "example": 1 }, "page_size": { "maximum": 1000, "minimum": 0, "type": "integer", "example": 10 }, "searches": { "$ref": "#/components/schemas/explore_plus.IntBreakdown" }, "sort_by": { "type": "string", "example": "date", "enum": [ "date", "reach", "engagement", "social_echo", "relevance", "prominence", "views" ] }, "sort_order": { "type": "string", "example": "desc", "enum": [ "asc", "desc" ] }, "start": { "type": "string", "example": "2021-09-27T00:00:00" }, "template": { "$ref": "#/components/schemas/explore_plus.Template" }, "tz": { "type": "string", "example": "Europe/London" } } }, "explore_plus.Filters": { "type": "object", "properties": { "countries": { "$ref": "#/components/schemas/explore_plus.StringBreakdown" }, "custom_fields": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/explore_plus.IntBreakdown" } }, "languages": { "$ref": "#/components/schemas/explore_plus.StringBreakdown" }, "sentiments": { "$ref": "#/components/schemas/explore_plus.SentimentBreakdown" }, "sources": { "$ref": "#/components/schemas/explore_plus.StringBreakdown" } } }, "explore_plus.IntBreakdown": { "type": "object", "properties": { "all": { "type": "array", "example": [ 123, 456 ], "items": { "type": "integer" } }, "any": { "type": "array", "example": [ 123, 456 ], "items": { "type": "integer" } }, "none": { "type": "array", "example": [ 123, 456 ], "items": { "type": "integer" } } } }, "explore_plus.Response": { "type": "object", "properties": { "count": { "type": "integer" }, "documents": { "type": "array", "items": { "type": "object" } } } }, "explore_plus.SentimentBreakdown": { "type": "object", "properties": { "all": { "type": "array", "example": [ "positive", "negative" ], "items": { "type": "string" } }, "any": { "type": "array", "example": [ "positive", "negative" ], "items": { "type": "string" } }, "none": { "type": "array", "example": [ "positive", "negative" ], "items": { "type": "string" } } } }, "explore_plus.StringBreakdown": { "type": "object", "properties": { "all": { "type": "array", "example": [ "abc", "def" ], "items": { "type": "string" } }, "any": { "type": "array", "example": [ "abc", "def" ], "items": { "type": "string" } }, "none": { "type": "array", "example": [ "abc", "def" ], "items": { "type": "string" } } } }, "explore_plus.Template": { "type": "object", "properties": { "name": { "type": "string", "example": "api.json" } } }, "ByocAttachment": { "required": [ "mime", "type", "url" ], "type": "object", "properties": { "name": { "maxLength": 1000, "minLength": 0, "type": "string", "description": "Name of the attachment", "example": "Attachment Name" }, "url": { "type": "string", "description": "URL of the attachment", "format": "url", "example": "http://example.com" }, "mime": { "maxLength": 1000, "minLength": 0, "type": "string", "description": "MIME type of the attachment", "example": "image/png" }, "altText": { "maxLength": 10000, "minLength": 0, "type": "string", "description": "Alternative text for the attachment", "example": "Alt text for the attachment" }, "type": { "type": "string", "description": "Type of the attachment", "enum": [ "image", "audio", "video" ] }, "thumbnail": { "type": "string", "description": "Thumbnail URL of the attachment", "format": "url", "example": "http://example.com" } }, "description": "List of attachments associated with the document" }, "ByocDocument": { "required": [ "contentType", "originPlatform", "source", "timestamp", "url" ], "type": "object", "properties": { "delete": { "type": "boolean", "description": "Indicates delete action on the document" }, "id": { "maxLength": 1000, "minLength": 0, "type": "string", "description": "Unique identifier for the document", "example": "12345" }, "url": { "type": "string", "description": "URL of the document", "format": "url", "example": "http://example.com" }, "timestamp": { "maximum": 2524608000000, "minimum": 946684800000, "type": "integer", "description": "Timestamp of the document in milliseconds since epoch", "format": "int64", "example": 1748272125000 }, "content": { "$ref": "#/components/schemas/ByocContent" }, "originPlatform": { "type": "string", "description": "Platform where the document originated", "enum": [ "youtube", "podcasts", "facebook", "instagram", "reddit", "sina_weibo", "wechat", "twitter", "linkedin", "pinterest", "twitch", "tiktok", "douyin", "little_red_book", "youku", "bilibili", "threads", "kakaotalk", "linevoom", "discord", "snapchat", "bluesky", "news_publisher", "broadcast", "tender_portal", "reviews", "blogs", "forums", "social_comments", "telegram" ] }, "contentType": { "type": "string", "description": "Type of content in the document", "enum": [ "video", "comment", "repost", "reply", "quoted", "audio", "post", "online_press", "print_press", "tender", "product_review", "voc" ] }, "attachments": { "type": "array", "description": "List of attachments associated with the document", "items": { "$ref": "#/components/schemas/ByocAttachment" } }, "source": { "$ref": "#/components/schemas/ByocSource" }, "user": { "$ref": "#/components/schemas/ByocUser" }, "parent": { "$ref": "#/components/schemas/ByocParent" }, "product": { "$ref": "#/components/schemas/ByocProduct" }, "metrics": { "$ref": "#/components/schemas/ByocMetrics" }, "sentiment": { "type": "string", "description": "Document level sentiment", "enum": [ "positive", "negative", "neutral", "unknown" ] }, "customFields": { "type": "array", "description": "List of Explore+ custom fields", "items": { "$ref": "#/components/schemas/ByocCustomField" }, "maxItems": 100, "minItems": 1 } } }, "ByocMetrics": { "type": "object", "properties": { "views": { "type": "integer", "description": "Number of views", "format": "int32", "example": 100 }, "audience": { "type": "integer", "description": "Audience size", "format": "int32", "example": 50 }, "likes": { "type": "integer", "description": "Likes count", "format": "int32", "example": 50 }, "shares": { "type": "integer", "description": "Shares count", "format": "int32", "example": 50 }, "comments": { "type": "integer", "description": "Comments count", "format": "int32", "example": 50 }, "replies": { "type": "integer", "description": "Replies count", "format": "int32", "example": 50 }, "ave": { "type": "number", "description": "Advertising value equivalency", "format": "float", "example": 4.5 }, "score": { "type": "number", "description": "Score of the document", "format": "float", "example": 3.2 } }, "description": "Metrics associated with the document" }, "ByocImportsDocumentsRequest": { "required": [ "documents" ], "type": "object", "properties": { "documents": { "maxItems": 500, "minItems": 0, "type": "array", "items": { "$ref": "#/components/schemas/ByocDocument" } } } }, "ByocSource": { "required": [ "name", "url" ], "type": "object", "properties": { "name": { "maxLength": 1000, "minLength": 0, "type": "string", "description": "Name of the source", "example": "The Meltwater Times" }, "url": { "type": "string", "description": "URL of the source", "format": "url", "example": "http://example.com" }, "location": { "$ref": "#/components/schemas/Location" } }, "description": "Source details of the document" }, "ByocContent": { "type": "object", "properties": { "title": { "maxLength": 10000, "minLength": 0, "type": "string", "description": "Title of the content", "example": "Example Title" }, "subtitle": { "maxLength": 10000, "minLength": 0, "type": "string", "description": "Subtitle of the content", "example": "Example Subtitle" }, "text": { "type": "string", "description": "Text content", "example": "Example text content" }, "duration": { "type": "integer", "description": "Duration of the content in seconds", "format": "int32", "example": 120 } }, "description": "Content details of the document" }, "ByocCoordinates": { "required": [ "lat", "lon" ], "type": "object", "properties": { "lat": { "type": "number", "description": "Latitude of the location", "format": "float", "example": 52.52 }, "lon": { "type": "number", "description": "Longitude of the location", "format": "float", "example": 13.405 } }, "description": "Coordinates of the location" }, "ByocLocation": { "type": "object", "properties": { "countryCode": { "type": "string", "description": "ISO 3166-1 alpha-2 country code", "example": "DE" }, "locationString": { "maxLength": 1000, "minLength": 0, "type": "string", "description": "Location string", "example": "Berlin, Germany" }, "coordinates": { "$ref": "#/components/schemas/ByocCoordinates" } }, "description": "Location details of the user" }, "ByocParent": { "type": "object", "properties": { "id": { "maxLength": 1000, "minLength": 0, "type": "string", "description": "Unique identifier for the parent document", "example": "parent123" }, "url": { "type": "string", "description": "URL of the parent document", "format": "url", "example": "http://example.com" }, "title": { "maxLength": 10000, "minLength": 0, "type": "string", "description": "Title of the parent document", "example": "Parent Document Title" } }, "description": "Parent document details" }, "ByocProduct": { "required": [ "name" ], "type": "object", "properties": { "name": { "maxLength": 1000, "minLength": 0, "type": "string", "description": "Name of the product", "example": "John Doe" } }, "description": "Product details" }, "ByocUser": { "type": "object", "properties": { "name": { "maxLength": 1000, "minLength": 0, "type": "string", "description": "Name of the user", "example": "John Doe" }, "handle": { "maxLength": 1000, "minLength": 0, "type": "string", "description": "Handle for the user", "example": "johndoe" }, "url": { "type": "string", "description": "URL of the user's profile", "format": "url", "example": "http://example.com" }, "imageUrl": { "type": "string", "description": "URL of the user's profile image", "format": "url", "example": "http://example.com/avatar.png" }, "gender": { "type": "string", "description": "Gender of the user", "enum": [ "m", "f", "n" ] }, "location": { "$ref": "#/components/schemas/ByocLocation" } }, "description": "User / author / speaker / presenter details associated with the document" }, "ByocCustomField": { "type": "object", "required": [ "label", "values" ], "properties": { "label": { "type": "string", "description": "Label of the custom field", "example": "Priority" }, "values": { "type": "array", "maxItems": 100, "minItems": 1, "items": { "type": "string" }, "description": "Values associated with the custom field", "example": [ "High", "Urgent" ] } }, "additionalProperties": false, "description": "Custom fields associated with the document" }, "ByocImportsDocumentsResult": { "type": "object", "properties": { "batchId": { "type": "string" }, "count": { "type": "integer", "format": "int32" } } }, "ByocResultAPIValidationError": { "type": "object", "properties": { "errors": { "type": "array", "items": { "type": "object", "required": [ "type", "details", "title" ], "properties": { "type": { "type": "string", "example": "VALIDATION", "description": "Category of error" }, "title": { "type": "string", "example": "Validation error for field: type", "description": "Title of error" }, "details": { "type": "string", "example": "This field cannot be updated", "description": "Details about the error" } }, "additionalProperties": false }, "description": "List of problems with the request" } }, "example": { "errors": [ { "type": "VALIDATION", "title": "Invalid data", "details": "field: invalid value" } ] }, "description": "Bad Request" }, "ByocResultAPIError": { "type": "object", "properties": { "message": { "type": "string" } } }, "ByocIngestionBatch": { "type": "object", "properties": { "batch_id": { "type": "string" }, "created_at": { "type": "string" }, "import_tags": { "type": "array", "items": { "type": "string" } }, "statistics": { "$ref": "#/components/schemas/ByocIngestionBatchStatistics" }, "status": { "type": "string" } } }, "ByocIngestionBatchStatistics": { "type": "object", "properties": { "documents_indexed": { "type": "integer" }, "documents_sent": { "type": "integer" }, "documents_marked_duplicate": { "type": "integer" }, "subgroups": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/ByocIngestionSubGroup" } } } }, "ByocIngestionSubGroup": { "type": "object", "properties": { "documents_indexed": { "type": "integer" }, "documents_marked_duplicate": { "type": "integer" } } }, "ByocListBatchesResult": { "type": "object", "properties": { "content": { "type": "array", "items": { "$ref": "#/components/schemas/ByocIngestionBatch" } }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "total": { "type": "integer" } } }, "ByocGetBatchesResult": { "type": "object", "properties": { "batch_id": { "type": "string" }, "created_at": { "type": "string" }, "import_tags": { "type": "array", "items": { "type": "string" } }, "statistics": { "$ref": "#/components/schemas/ByocIngestionBatchStatistics" }, "status": { "type": "string" } } }, "ByocGetImportTagsResult": { "type": "object", "properties": { "created_at": { "type": "string" }, "import_tag": { "type": "string" }, "statistics": { "$ref": "#/components/schemas/ByocIngestionBatchStatistics" }, "status": { "type": "string" } } } } }