<!--
{
  "availability" : [
    "Apple News Format: 1.9.0 - 1.25.0"
  ],
  "documentType" : "symbol",
  "framework" : "AppleNewsFormat",
  "identifier" : "/documentation/AppleNewsFormat/AutoPlacementLayout",
  "metadataVersion" : "0.1.0",
  "role" : "Object",
  "symbol" : {
    "kind" : "Object",
    "modules" : [
      "Apple News Format"
    ],
    "preciseIdentifier" : "data:news_format:AutoPlacementLayout"
  },
  "title" : "AutoPlacementLayout"
}
-->

# AutoPlacementLayout

The object for defining the margin above and below advertising components.

```
object AutoPlacementLayout
```

## Discussion

Use the `AutoPlacementLayout` object to define the margins for ad components that are inserted automatically. This object is different from the [`ComponentLayout`](/documentation/AppleNewsFormat/ComponentLayout) object and supports only one property, `margin`.

This object can be used in [`AdvertisementAutoPlacement`](/documentation/AppleNewsFormat/AdvertisementAutoPlacement).

### Example

```json
{
  "version": "1.9",
  "identifier": "SampleArticle",
  "language": "en",
  "title": "Apple News",
  "layout": {
    "columns": 20,
    "width": 1024,
    "margin": 60,
    "gutter": 20
  },
  "autoplacement": {
    "advertisement": {
      "enabled": true,
      "bannerType": "any",
      "distanceFromMedia": "10vh",
      "frequency": 10,
      "layout": {
        "margin": 10
      }
    }
  },
  …
}
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)