如果出價方需要自訂地理位置資料,建議使用 lat、lon 和 accuracy 欄位執行空間地理位置查詢。我們不建議使用 BidRequest.device.ip 欄位進行地理定位,因為 Google 只會以經過截斷的形式分享 IP 位址;如果使用經過截斷的 IP 位址進行地理定位,可能會導致結果不準確。
地理表 (已淘汰)
BidRequest.device.geo.ext.geo_criteria_id 欄位會以數字 ID 表示地理位置,並對應至 geo-table.csv 中的地理位置,您可以在 Protos 與參考資料頁面的參考資料表格部分下載該檔案。這個欄位和對應的資料表現已淘汰。您可以使用 BidRequest.device.geo 取得類似的地理位置資訊。
舉例來說,如果出價要求以城市級精確度填入 geo,geo_criteria_id 就會包含對應城市的代碼。您可以使用該 ID 在地理表中找出記錄。
[null,null,["上次更新時間:2025-08-21 (世界標準時間)。"],[[["\u003cp\u003eGoogle uses IP geolocation to provide coarse location data in bid requests, prioritizing user privacy by generalizing the location.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eGeo\u003c/code\u003e object contains civil location fields (country, region, etc.) and geographical coordinates (lat, lon, accuracy) representing the same location.\u003c/p\u003e\n"],["\u003cp\u003eFor custom geolocation targeting, utilize the \u003ccode\u003elat\u003c/code\u003e, \u003ccode\u003elon\u003c/code\u003e, and \u003ccode\u003eaccuracy\u003c/code\u003e fields for spatial lookups instead of the truncated \u003ccode\u003eip\u003c/code\u003e field.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egeo_criteria_id\u003c/code\u003e and associated geo-table are deprecated; migrate to the \u003ccode\u003eGeo\u003c/code\u003e object for location information.\u003c/p\u003e\n"],["\u003cp\u003eWhile some locations may appear in reports, they might be non-targetable due to advertising regulations, like those in China.\u003c/p\u003e\n"]]],[],null,["# Geographical Targeting\n\nGoogle provides geolocation information through the\n[`Geo`](/authorized-buyers/rtb/openrtb-guide#geo) object. This document\ndescribes higher-level details of how Google populates geolocation in bid\nrequests and suggests best practices for its use.\n| **Note:** The `BidRequest.device.geo.ext.geo_criteria_id` field is deprecated; we encourage using the `Geo` object instead.\n\nHow the Geo object is populated\n-------------------------------\n\nGoogle only supports geolocation information describing the location of the\ndevice on which the ad would be rendered, which is exposed in\n`BidRequest.device.geo`. This location information is only obtained from IP\ngeolocation, never from GPS or other sources.\n\nPrivacy protections\n-------------------\n\nIn order to protect user privacy, Google only provides a coarse geolocation that\nis shared by a sufficiently large number of users, generalizing detected\nlocation as necessary.\n\nLocation representations\n------------------------\n\nThe `Geo` object supports two separate representations of location -- civil\nlocation and geographical coordinates.\n\nCivil locations are represented by the following fields:\n\n- `country`\n- `region`\n- `metro`\n- `city`\n- `zip`\n\nGeographical coordinates are represented by the following fields:\n\n- `lat`\n- `lon`\n- `accuracy`\n\nBoth representations contain the same location and accuracy. For example, if a\nbid request populates `BidRequest.device.geo` with city-level precision, then\nthe `lat` and `lon` fields will contain the latitude and longitude of the\ncenterpoint of the identified city, and `accuracy` will be the radius of a\ncircle with the same area as that city. Google also limits the precision of the\n`lat` and `lon` fields to 0.01 degrees.\n\n### Best practices for geolocation targeting\n\nFor bidders that need custom geolocation data we recommend using the approximate\n`lat`, `lon` and `accuracy` fields for performing spatial geolocation lookups.\nWe don't recommend the use of the `BidRequest.device.ip` field for geolocation,\nsince Google only shares the IP address in truncated form; the use of truncated\nIP addresses for geolocation can result in somewhat inaccurate results.\n\nThe Geo Table (Deprecated)\n--------------------------\n\n| **Caution:** Google strongly recommends using `BidRequest.device.geo` instead. Support for the geo criteria ID has been temporarily added with the `BidRequest.device.geo.ext.geo_criteria_id` extension in order to simplify migration from the obsolete Google RTB protocol. Support for this extension can be removed at any time after May 1st, 2025.\n\nThe `BidRequest.device.geo.ext.geo_criteria_id` field represents geolocation as\na numeric identifier, which is mapped to a geolocation in **geo-table.csv**\navailable for download in the\n[Reference tables section](/authorized-buyers/rtb/data#reference-tables-click-to-download-csvs)\nof the Protos \\& Reference Data page. **This field and the corresponding table\nare now deprecated** . You can use `BidRequest.device.geo` to get similar\ngeolocation information.\n\nAs an example, if a bid request populates `geo` with city-level precision, then\nthe `geo_criteria_id` will contain the code for the corresponding city. You can\nuse that ID to locate a record in the geo table.\n\n### Columns\n\nCriteria ID\n: Unique and persistent assigned ID. In the API, these criteria are of type\n [`Location`](/adwords/api/docs/reference/latest/CampaignCriterionService.Location).\n\nName\n: Best available English name of the geo target.\n\nCanonical Name\n: The constructed fully qualified English name consisting of the target's own\n name, and that of its parent and country. This field is meant only for\n disambiguating similar target names--it's not supported in\n [LocationCriterionService](/adwords/api/docs/reference/latest/LocationCriterionService)\n (use location names or criteria IDs instead).\n\nParent ID\n: The criteria ID of a parent. This field is included for legacy support,\n and the IDs may not be consistent across datasets. Canonical names is the\n preferred method of constructing hierarchies.\n\nRegion Code\n: The ISO 3166-2 region code for the state or province target, if one exists.\n\nCountry Code\n: The ISO-3166-1 alpha-2 country code that is associated with the target.\n\nTarget Type\n\n: Allowable values:\n\n - Airport\n - Arrondissement\n - Autonomous Community\n - Borough\n - Canton\n - City\n - City Region\n - Congressional District\n - Country\n - County\n - Department\n - District\n - DMA region\n - Governorate\n - Metro\n - Municipality\n - National Park\n - Neighborhood\n - Okrug\n - Other\n - Postal Code\n - Prefecture\n - Province\n - Region\n - State\n - Territory\n - TV Region\n - Union Territory\n - University\n\n### Non-targetable locations\n\n| **Note:** Some countries or territories are not targetable, but may appear in reports based on the user's area of interest or physical location.\n\nDue to advertising regulations and laws of the People's Republic of China, you\nmay be asked to provide certificates and licenses if you are advertising certain\ncategories of products in China. You do not need to submit certificates until\nafter your account has been activated. Once your account is active, you will be\nprovided with information on how to submit certificates to Google."]]