这两种表示法包含相同的位置和准确性。例如,如果出价请求使用城市级精度填充 BidRequest.device.geo,则 lat 和 lon 字段将包含所标识城市中心点的纬度和经度,而 accuracy 将是与该城市面积相同的圆形的半径。Google 还将 lat 和 lon 字段的精度限制为 0.01 度。
地理位置定位最佳实践
对于需要自定义地理位置数据的出价方,我们建议使用近似的 lat、lon 和 accuracy 字段来执行空间地理位置查询。我们不建议使用 BidRequest.device.ip 字段进行地理定位,因为 Google 只会以截断形式分享 IP 地址;使用截断的 IP 地址进行地理定位可能会导致结果不太准确。
[null,null,["最后更新时间 (UTC):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."]]