{
  "servicePath": "",
  "protocol": "rest",
  "revision": "20260119",
  "discoveryVersion": "v1",
  "icons": {
    "x16": "http://www.google.com/images/icons/product/search-16.gif",
    "x32": "http://www.google.com/images/icons/product/search-32.gif"
  },
  "schemas": {
    "GetTopQueriesResponseItem": {
      "type": "object",
      "id": "GetTopQueriesResponseItem",
      "properties": {
        "value": {
          "format": "double",
          "description": "Search volume scaled between 0-100.",
          "type": "number"
        },
        "title": {
          "description": "Related search queries.",
          "type": "string"
        }
      }
    },
    "ListRegionsResponse": {
      "id": "ListRegionsResponse",
      "description": "A list of RegionalInterest messages.",
      "type": "object",
      "properties": {
        "regions": {
          "description": "A list of RegionalInterest messages.",
          "type": "array",
          "items": {
            "$ref": "RegionalInterest"
          }
        }
      }
    },
    "GraphPoint": {
      "description": "A single point in a time series.",
      "id": "GraphPoint",
      "properties": {
        "date": {
          "description": "The date to which this point pertains to.",
          "type": "string"
        },
        "value": {
          "type": "number",
          "description": "The value of the normalized search volume in this date.",
          "format": "double"
        }
      },
      "type": "object"
    },
    "GetRisingQueriesResponse": {
      "id": "GetRisingQueriesResponse",
      "properties": {
        "item": {
          "type": "array",
          "description": "Rising in searches since the previous adjacent period in time.",
          "items": {
            "$ref": "GetRisingQueriesResponseItem"
          }
        }
      },
      "type": "object"
    },
    "RegionalInterest": {
      "description": "A breakdown of normalized search volume per-term per-region.",
      "properties": {
        "regionName": {
          "description": "A human readable region name.",
          "type": "string"
        },
        "value": {
          "description": "The normalized search volume of the given term in this region.",
          "type": "number",
          "format": "double"
        },
        "regionCode": {
          "type": "string",
          "description": "A two-letter region code."
        }
      },
      "type": "object",
      "id": "RegionalInterest"
    },
    "GetRisingTopicsResponseItem": {
      "type": "object",
      "properties": {
        "value": {
          "type": "number",
          "description": "Percentage of rising searches since the previous time period. for example: 0.35 means 35% rising in searches. If there were close to 0 searches for the term in the previous time range, the value will be Double.MAX_VALUE and considered \"breakout\".",
          "format": "double"
        },
        "title": {
          "description": "Entity name.",
          "type": "string"
        },
        "mid": {
          "type": "string",
          "description": "Entity mid."
        },
        "isBreakout": {
          "description": "Field is set to true whenever there is not enough volume in previous searches to calculate the rising percentage, value will be set to double.MAX_VALUE.",
          "type": "boolean"
        }
      },
      "id": "GetRisingTopicsResponseItem"
    },
    "GraphLine": {
      "properties": {
        "points": {
          "type": "array",
          "description": "The list of date-value points comprising the graph line.",
          "items": {
            "$ref": "GraphPoint"
          }
        },
        "term": {
          "type": "string",
          "description": "The term this graph line pertains to."
        }
      },
      "type": "object",
      "id": "GraphLine",
      "description": "A time series for the given term."
    },
    "TimelinePoint": {
      "id": "TimelinePoint",
      "properties": {
        "date": {
          "description": "Required. The date to which this point pertains to.",
          "type": "string"
        },
        "value": {
          "format": "double",
          "description": "Required. The value of the search volume in this date (unscaled).",
          "type": "number"
        }
      },
      "description": "A single point in a time series.",
      "type": "object"
    },
    "GetRisingTopicsResponse": {
      "properties": {
        "item": {
          "items": {
            "$ref": "GetRisingTopicsResponseItem"
          },
          "description": "Rising in searches since the previous adjacent period in time.",
          "type": "array"
        }
      },
      "id": "GetRisingTopicsResponse",
      "type": "object"
    },
    "Graph": {
      "description": "A Graph is a collection of Graph Lines. Each line corresponds to a single term in the request.",
      "id": "Graph",
      "type": "object",
      "properties": {
        "lines": {
          "description": "A list of graph lines, each corresponding to the search stats of a single term, under the restrictions provided in the query.",
          "type": "array",
          "items": {
            "$ref": "GraphLine"
          }
        }
      }
    },
    "Timelines": {
      "type": "object",
      "description": "Timelines is a list of lines, where each line corresponds to a single term in the request.",
      "id": "Timelines",
      "properties": {
        "lines": {
          "items": {
            "$ref": "Timeline"
          },
          "type": "array",
          "description": "A list of lines, each corresponding to the search stats of a single term, under the restrictions provided in the query."
        }
      }
    },
    "GetGraphAveragesResponse": {
      "id": "GetGraphAveragesResponse",
      "properties": {
        "averages": {
          "description": "Overtime Average messages. It's a term: average search volume mapping.",
          "items": {
            "$ref": "Average"
          },
          "type": "array"
        }
      },
      "type": "object",
      "description": "Overtime Average messages. It's a term: average search volume mapping."
    },
    "Average": {
      "description": "Normalized average search volume for the given term.",
      "properties": {
        "term": {
          "description": "The term this average value pertains to.",
          "type": "string"
        },
        "value": {
          "format": "double",
          "description": "A normalized search volume average of the given term.",
          "type": "number"
        }
      },
      "id": "Average",
      "type": "object"
    },
    "GetTopTopicsResponse": {
      "properties": {
        "item": {
          "description": "Top terms that were searched with requested term.",
          "items": {
            "$ref": "GetTopTopicsResponseItem"
          },
          "type": "array"
        }
      },
      "id": "GetTopTopicsResponse",
      "type": "object"
    },
    "GetTopQueriesResponse": {
      "properties": {
        "item": {
          "type": "array",
          "description": "Top terms that were searched with requested term.",
          "items": {
            "$ref": "GetTopQueriesResponseItem"
          }
        }
      },
      "id": "GetTopQueriesResponse",
      "type": "object"
    },
    "GetTopTopicsResponseItem": {
      "properties": {
        "value": {
          "type": "number",
          "format": "double",
          "description": "Search volume scaled between 0-100."
        },
        "title": {
          "type": "string",
          "description": "Entity name."
        },
        "mid": {
          "description": "Entity mid.",
          "type": "string"
        }
      },
      "id": "GetTopTopicsResponseItem",
      "type": "object"
    },
    "GetRisingQueriesResponseItem": {
      "properties": {
        "title": {
          "description": "Related search queries.",
          "type": "string"
        },
        "value": {
          "description": "Relative growth in searches since the previous time period. For example: 0.35 means 35% rising in searches.",
          "type": "number",
          "format": "double"
        },
        "isBreakout": {
          "type": "boolean",
          "description": "Field is set to true whenever value is above the breakout threshold. Effectively this indicates that searches have risen from ~0."
        }
      },
      "type": "object",
      "id": "GetRisingQueriesResponseItem"
    },
    "Timeline": {
      "properties": {
        "term": {
          "type": "string",
          "description": "Required. The term this line pertains to."
        },
        "points": {
          "items": {
            "$ref": "TimelinePoint"
          },
          "type": "array",
          "description": "The list of date-value points comprising this line."
        }
      },
      "description": "A time series for the given term.",
      "id": "Timeline",
      "type": "object"
    }
  },
  "batchPath": "batch/trends",
  "methods": {
    "getTopQueries": {
      "parameters": {
        "restrictions.category": {
          "location": "query",
          "description": "Please consult with the Trends Explore page for possible legal input here. Defaults to 'All Categories' when empty.",
          "default": "0",
          "type": "string"
        },
        "restrictions.geo": {
          "description": "Please refer to the ISO-3166-2 for the supported values.",
          "location": "query",
          "type": "string"
        },
        "restrictions.property": {
          "description": "The Google property of interest. Options are images/news/froogle(Shopping)/youtube, web is the default.",
          "type": "string",
          "location": "query"
        },
        "restrictions.startDate": {
          "default": "2004-01",
          "type": "string",
          "location": "query",
          "description": "Start date should be a month and a year in the format YYYY-MM e.g. 2010-01. Default value is 2004-01."
        },
        "restrictions.endDate": {
          "type": "string",
          "description": "End date should be a month and a year in the format YYYY-MM e.g. 2010-01. Default value is the current month and year.",
          "location": "query"
        },
        "term": {
          "description": "Term can be either entity (for example /m/0d2p9p), query, or empty string for queryless requests.",
          "location": "query",
          "type": "string",
          "required": true
        }
      },
      "parameterOrder": [
        "term"
      ],
      "path": "trends/v1beta/topQueries",
      "response": {
        "$ref": "GetTopQueriesResponse"
      },
      "description": "Get a list of top queries that were searched along with the requested term, under the given restrictions.",
      "flatPath": "trends/v1beta/topQueries",
      "id": "trends.getTopQueries",
      "httpMethod": "GET"
    },
    "getRisingQueries": {
      "httpMethod": "GET",
      "flatPath": "trends/v1beta/risingQueries",
      "id": "trends.getRisingQueries",
      "parameterOrder": [
        "term"
      ],
      "description": "Get a list of rising queries that were searched along with the requested term, under the given restrictions.",
      "path": "trends/v1beta/risingQueries",
      "parameters": {
        "restrictions.startDate": {
          "description": "Start date should be a month and a year in the format YYYY-MM e.g. 2010-01. Default value is 2004-01.",
          "type": "string",
          "default": "2004-01",
          "location": "query"
        },
        "term": {
          "location": "query",
          "type": "string",
          "description": "Term can be either entity (for example /m/0d2p9p), query, or empty string for queryless requests.",
          "required": true
        },
        "restrictions.category": {
          "default": "0",
          "description": "Please consult with the Trends Explore page for possible legal input here. Defaults to 'All Categories' when empty.",
          "location": "query",
          "type": "string"
        },
        "restrictions.property": {
          "location": "query",
          "description": "The Google property of interest. Options are images/news/froogle(Shopping)/youtube, web is the default.",
          "type": "string"
        },
        "restrictions.geo": {
          "description": "Please refer to the ISO-3166-2 for the supported values.",
          "type": "string",
          "location": "query"
        },
        "restrictions.endDate": {
          "location": "query",
          "description": "End date should be a month and a year in the format YYYY-MM e.g. 2010-01. Default value is the current month and year.",
          "type": "string"
        }
      },
      "response": {
        "$ref": "GetRisingQueriesResponse"
      }
    },
    "getGraph": {
      "path": "trends/v1beta/graph",
      "parameters": {
        "restrictions.startDate": {
          "type": "string",
          "default": "2004-01",
          "description": "Start date should be a month and a year in the format YYYY-MM e.g. 2010-01. Default value is 2004-01.",
          "location": "query"
        },
        "restrictions.endDate": {
          "description": "End date should be a month and a year in the format YYYY-MM e.g. 2010-01. Default value is the current month and year.",
          "location": "query",
          "type": "string"
        },
        "terms": {
          "repeated": true,
          "description": "Search terms the user wishes to compare/explore.",
          "location": "query",
          "type": "string"
        },
        "restrictions.category": {
          "default": "0",
          "description": "Please consult with the Trends Explore page for possible legal input here. Defaults to 'All Categories' when empty.",
          "type": "string",
          "location": "query"
        },
        "restrictions.geo": {
          "description": "Please refer to the ISO-3166-2 for the supported values.",
          "type": "string",
          "location": "query"
        },
        "restrictions.property": {
          "description": "The Google property of interest. Options are images/news/froogle(Shopping)/youtube, web is the default.",
          "type": "string",
          "location": "query"
        }
      },
      "response": {
        "$ref": "Graph"
      },
      "id": "trends.getGraph",
      "httpMethod": "GET",
      "parameterOrder": [],
      "flatPath": "trends/v1beta/graph",
      "description": "Returns a Graph of search volume per time points, normalized. For better insights, one could provide restrictions for time range, geographic region, etc."
    },
    "getTopTopics": {
      "response": {
        "$ref": "GetTopTopicsResponse"
      },
      "path": "trends/v1beta/topTopics",
      "description": "Get a list of top topics that were searched along with the requested term, under the given restrictions.",
      "id": "trends.getTopTopics",
      "parameterOrder": [
        "term"
      ],
      "httpMethod": "GET",
      "parameters": {
        "restrictions.startDate": {
          "type": "string",
          "location": "query",
          "default": "2004-01",
          "description": "Start date should be a month and a year in the format YYYY-MM e.g. 2010-01. Default value is 2004-01."
        },
        "restrictions.geo": {
          "description": "Please refer to the ISO-3166-2 for the supported values.",
          "location": "query",
          "type": "string"
        },
        "restrictions.endDate": {
          "location": "query",
          "description": "End date should be a month and a year in the format YYYY-MM e.g. 2010-01. Default value is the current month and year.",
          "type": "string"
        },
        "restrictions.category": {
          "type": "string",
          "description": "Please consult with the Trends Explore page for possible legal input here. Defaults to 'All Categories' when empty.",
          "default": "0",
          "location": "query"
        },
        "restrictions.property": {
          "description": "The Google property of interest. Options are images/news/froogle(Shopping)/youtube, web is the default.",
          "location": "query",
          "type": "string"
        },
        "term": {
          "type": "string",
          "description": "Term can be either entity (for example /m/0d2p9p), query, or empty string for queryless requests.",
          "required": true,
          "location": "query"
        }
      },
      "flatPath": "trends/v1beta/topTopics"
    },
    "getTimelinesForHealth": {
      "description": "For health research only, fetches a graph of search volumes per time within a set of restrictions. Each term will result in a timeline of search over time. Note the data is sampled and Google can't guarantee the accuracy of the numbers. This service is closed to a subset of Health researchers. The quota provision is individually maintained by the Trends team.",
      "httpMethod": "GET",
      "response": {
        "$ref": "Timelines"
      },
      "id": "trends.getTimelinesForHealth",
      "parameters": {
        "geoRestriction.country": {
          "type": "string",
          "location": "query",
          "description": "Please notice only one field of GeoRestriction should be filled. Country format is ISO-3166-2 (2-letters), e.g. US."
        },
        "timelineResolution": {
          "enum": [
            "day",
            "week",
            "month",
            "year"
          ],
          "enumDescriptions": [
            "",
            "",
            "",
            ""
          ],
          "description": "A value of TimeResolution enum. Week is default.",
          "type": "string",
          "location": "query",
          "default": "week"
        },
        "geoRestriction.dma": {
          "type": "string",
          "description": "Please notice only one field of GeoRestriction should be filled. DMA is nielsen dma id, e.g. 501 (support.google.com/richmedia/answer/2745487).",
          "location": "query"
        },
        "terms": {
          "description": "Required. Search terms the user wishes to explore. Up to 30 queries can be sent. Term format can be either a query or entity (e.g. /m/0d2p9p) and can include ORs using '+' sign. Example: \"/m/0d2p9p + /m/0nd4ffr + awesomeness\" will return a combined timeline of the three terms (which obviously differ from \"/m/0d2p9p, /m/0nd4ffr, awesomeness\" that returns 3 different timelines.)",
          "type": "string",
          "repeated": true,
          "location": "query"
        },
        "geoRestriction.region": {
          "description": "Please notice only one field of GeoRestriction should be filled. Region format is ISO-3166-2 (4-letters), e.g. US-NY (see more examples here: en.wikipedia.org/wiki/ISO_3166-2:US)",
          "type": "string",
          "location": "query"
        },
        "time.endDate": {
          "type": "string",
          "location": "query",
          "description": "End date format YYYY-MM-DD e.g. 2010-08-28, default is today."
        },
        "time.startDate": {
          "default": "2004-01-01",
          "description": "Start date format YYYY-MM-DD e.g. 2015-02-16, default is 2004-01-01.",
          "type": "string",
          "location": "query"
        }
      },
      "parameterOrder": [],
      "flatPath": "trends/v1beta/timelinesForHealth",
      "path": "trends/v1beta/timelinesForHealth"
    },
    "getGraphAverages": {
      "parameters": {
        "restrictions.endDate": {
          "location": "query",
          "type": "string",
          "description": "End date should be a month and a year in the format YYYY-MM e.g. 2010-01. Default value is the current month and year."
        },
        "restrictions.startDate": {
          "location": "query",
          "type": "string",
          "default": "2004-01",
          "description": "Start date should be a month and a year in the format YYYY-MM e.g. 2010-01. Default value is 2004-01."
        },
        "restrictions.geo": {
          "description": "Please refer to the ISO-3166-2 for the supported values.",
          "location": "query",
          "type": "string"
        },
        "terms": {
          "description": "Search terms the user wishes to compare/explore.",
          "location": "query",
          "type": "string",
          "repeated": true
        },
        "restrictions.property": {
          "description": "The Google property of interest. Options are images/news/froogle(Shopping)/youtube, web is the default.",
          "location": "query",
          "type": "string"
        },
        "restrictions.category": {
          "default": "0",
          "location": "query",
          "type": "string",
          "description": "Please consult with the Trends Explore page for possible legal input here. Defaults to 'All Categories' when empty."
        }
      },
      "description": "Returns the averages of normalized search volume for the given terms. For better insights, one could provide restrictions for time range, geographic region, etc.",
      "response": {
        "$ref": "GetGraphAveragesResponse"
      },
      "id": "trends.getGraphAverages",
      "httpMethod": "GET",
      "flatPath": "trends/v1beta/graphAverages",
      "parameterOrder": [],
      "path": "trends/v1beta/graphAverages"
    },
    "getRisingTopics": {
      "path": "trends/v1beta/risingTopics",
      "parameterOrder": [
        "term"
      ],
      "httpMethod": "GET",
      "id": "trends.getRisingTopics",
      "flatPath": "trends/v1beta/risingTopics",
      "response": {
        "$ref": "GetRisingTopicsResponse"
      },
      "description": "Get a list of rising topics that were searched along with the requested term, under the given restrictions.",
      "parameters": {
        "restrictions.geo": {
          "location": "query",
          "description": "Please refer to the ISO-3166-2 for the supported values.",
          "type": "string"
        },
        "restrictions.startDate": {
          "default": "2004-01",
          "type": "string",
          "description": "Start date should be a month and a year in the format YYYY-MM e.g. 2010-01. Default value is 2004-01.",
          "location": "query"
        },
        "restrictions.category": {
          "type": "string",
          "location": "query",
          "description": "Please consult with the Trends Explore page for possible legal input here. Defaults to 'All Categories' when empty.",
          "default": "0"
        },
        "restrictions.endDate": {
          "type": "string",
          "location": "query",
          "description": "End date should be a month and a year in the format YYYY-MM e.g. 2010-01. Default value is the current month and year."
        },
        "term": {
          "description": "Term can be either entity (for example /m/0d2p9p), query, or empty string for queryless requests.",
          "required": true,
          "location": "query",
          "type": "string"
        },
        "restrictions.property": {
          "location": "query",
          "type": "string",
          "description": "The Google property of interest. Options are images/news/froogle(Shopping)/youtube, web is the default."
        }
      }
    }
  },
  "resources": {
    "regions": {
      "methods": {
        "list": {
          "response": {
            "$ref": "ListRegionsResponse"
          },
          "flatPath": "trends/v1beta/regions",
          "parameters": {
            "restrictions.category": {
              "type": "string",
              "default": "0",
              "location": "query",
              "description": "Please consult with the Trends Explore page for possible legal input here. Defaults to 'All Categories' when empty."
            },
            "restrictions.endDate": {
              "type": "string",
              "location": "query",
              "description": "End date should be a month and a year in the format YYYY-MM e.g. 2010-01. Default value is the current month and year."
            },
            "term": {
              "description": "Search terms the user wishes to compare/explore.",
              "required": true,
              "type": "string",
              "location": "query"
            },
            "restrictions.geo": {
              "type": "string",
              "location": "query",
              "description": "Please refer to the ISO-3166-2 for the supported values."
            },
            "restrictions.property": {
              "description": "The Google property of interest. Options are images/news/froogle(Shopping)/youtube, web is the default.",
              "type": "string",
              "location": "query"
            },
            "restrictions.startDate": {
              "location": "query",
              "type": "string",
              "default": "2004-01",
              "description": "Start date should be a month and a year in the format YYYY-MM e.g. 2010-01. Default value is 2004-01."
            }
          },
          "path": "trends/v1beta/regions",
          "parameterOrder": [
            "term"
          ],
          "id": "trends.regions.list",
          "httpMethod": "GET",
          "description": "This would be the data behind the map seen in Regional Interest in http://trends.google.com/trends/explore"
        }
      }
    }
  },
  "name": "trends",
  "mtlsRootUrl": "https://www.mtls.googleapis.com/",
  "description": "The Trends API allows you to build awesome applications and visualizations based on Google Trends data.",
  "rootUrl": "https://www.googleapis.com/",
  "basePath": "",
  "ownerName": "Google",
  "kind": "discovery#restDescription",
  "ownerDomain": "google.com",
  "id": "trends:v1beta",
  "title": "Google Trends Research API",
  "documentationLink": "https://trends.google.com/trends/",
  "baseUrl": "https://www.googleapis.com/",
  "version": "v1beta",
  "canonicalName": "Trends",
  "parameters": {
    "prettyPrint": {
      "location": "query",
      "type": "boolean",
      "default": "true",
      "description": "Returns response with indentations and line breaks."
    },
    "quotaUser": {
      "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.",
      "type": "string",
      "location": "query"
    },
    "callback": {
      "type": "string",
      "description": "JSONP",
      "location": "query"
    },
    "access_token": {
      "location": "query",
      "description": "OAuth access token.",
      "type": "string"
    },
    "uploadType": {
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
      "location": "query",
      "type": "string"
    },
    "fields": {
      "type": "string",
      "location": "query",
      "description": "Selector specifying which fields to include in a partial response."
    },
    "oauth_token": {
      "description": "OAuth 2.0 token for the current user.",
      "type": "string",
      "location": "query"
    },
    "alt": {
      "enumDescriptions": [
        "Responses with Content-Type of application/json",
        "Media download with context-dependent Content-Type",
        "Responses with Content-Type of application/x-protobuf"
      ],
      "enum": [
        "json",
        "media",
        "proto"
      ],
      "type": "string",
      "default": "json",
      "location": "query",
      "description": "Data format for response."
    },
    "upload_protocol": {
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
      "type": "string",
      "location": "query"
    },
    "key": {
      "type": "string",
      "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
      "location": "query"
    },
    "$.xgafv": {
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ],
      "location": "query",
      "enum": [
        "1",
        "2"
      ],
      "type": "string",
      "description": "V1 error format."
    }
  }
}
