Skip to content
AdCrunch
Esc
↑↓navigate↵open⌘Jpreview

List the Placements

Lists the live Placements that your organization sees, newest first: its own, and the global ones that AdCrunch holds for every organization. A Placement is the slot where a provider shows an ad, and its rules say what an Asset should hold to fit. isGlobal tells you which rows you cannot change.

Filter with channel, type and groupId. One page at a time: limit rows at most, 100 by default. When the answer holds nextCursor, more rows exist: send it back as cursor to get the next page. A cursor of another filter is refused.

GET/library/placements
Authorization
AuthorizationBearer token · headerrequired

Send Authorization: Bearer <credential>.

Use an API key (acr_…), from the AdCrunch console under Settings → API keys.

The credential names the organization, and no operation takes an organization parameter.

See https://docs.adcrunch.dev/api/authentication.

Query parameters
cursorstring

The nextCursor of the previous page. Omit it to get the first page. Send it with no change, and with the same filters as the request that answered it: a cursor from a different query gets a 400 invalid_cursor. Do not build or change a cursor.

min length 1
limitintegerrequired

The greatest number of rows on the page, from 1 to 500. The default is 100. A greater value gets a 400, with error of invalid_request.

min 1 · max 500 · default: 100
channelstring

Only the Placements of this channel.

Allowed:metatiktoksnapchatgoogle_searchgoogle_pmaxgoogle_displayyoutubeprogrammatic_displaylinkedinx
groupIdstring

Only the Placements that this group holds. A group that your organization does not see answers 404.

matches ^(plg_)[\s\S]{0,}$
typestring

Only the Placements of this type.

Allowed:imagevideo
Responses
200

One page of the Placements, newest first. This page is the last one, so it carries no nextCursor.

dataobject[]required
Show properties
Array of object
channelstringrequired

The channel of a Line Item that the Placement belongs to. It never changes.

Allowed:metatiktoksnapchatgoogle_searchgoogle_pmaxgoogle_displayyoutubeprogrammatic_displaylinkedinx
createdAtnumberrequired

Milliseconds since the Unix epoch, UTC.

createdBystring | nullrequired

The user who created the Placement. null on a global row.

deletedAtnumber | nullrequired

Always null here. A deleted Placement is not answered.

descriptionstring | nullrequired

A free text. null when the Placement has none.

idstringrequired

The id of the Placement, plm_….

isGlobalbooleanrequired

true on a row that AdCrunch holds for every organization. You read it, and you cannot change or delete it.

namestringrequired

The name, 1 to 80 characters. It is unique, ignoring case, among the Placements of the channel that the organization sees.

organizationIdstring | nullrequired

The organization that owns the Placement. null on a global row.

paramsobjectrequired
Show properties
One of:
object
rulesobject[]required
max items 20
Show properties
Array of object
One of:
object
operatorobjectrequired
Show properties
Any of:
object
conditionstringrequired
Allowed:eq
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:ne
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:lt
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:lte
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:gt
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:gte
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:in
valueinteger[]required
min items 1 · max items 50
typestringrequired
Allowed:width
object
operatorobjectrequired
Show properties
Any of:
object
conditionstringrequired
Allowed:eq
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:ne
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:lt
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:lte
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:gt
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:gte
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:in
valueinteger[]required
min items 1 · max items 50
typestringrequired
Allowed:height
object
operatorobjectrequired
Show properties
Any of:
object
conditionstringrequired
Allowed:eq
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:ne
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:lt
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:lte
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:gt
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:gte
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:in
valueinteger[]required
min items 1 · max items 50
typestringrequired
Allowed:size
object
operatorobjectrequired
Show properties
Any of:
object
conditionstringrequired
Allowed:eq
valueinteger[]required
min items 2 · max items 2
Show properties
Array of integer
Any of:
integer
integer
integer
integer
object
conditionstringrequired
Allowed:ne
valueinteger[]required
min items 2 · max items 2
Show properties
Array of integer
Any of:
integer
integer
integer
integer
object
conditionstringrequired
Allowed:lt
valueinteger[]required
min items 2 · max items 2
Show properties
Array of integer
Any of:
integer
integer
integer
integer
object
conditionstringrequired
Allowed:lte
valueinteger[]required
min items 2 · max items 2
Show properties
Array of integer
Any of:
integer
integer
integer
integer
object
conditionstringrequired
Allowed:gt
valueinteger[]required
min items 2 · max items 2
Show properties
Array of integer
Any of:
integer
integer
integer
integer
object
conditionstringrequired
Allowed:gte
valueinteger[]required
min items 2 · max items 2
Show properties
Array of integer
Any of:
integer
integer
integer
integer
object
conditionstringrequired
Allowed:in
valueinteger[][]required
min items 1 · max items 50
typestringrequired
Allowed:ratio
object
operatorobjectrequired
Show properties
Any of:
object
conditionstringrequired
Allowed:eq
valuestringrequired
min length 1 · max length 255
object
conditionstringrequired
Allowed:ne
valuestringrequired
min length 1 · max length 255
object
conditionstringrequired
Allowed:in
valuestring[]required
min items 1 · max items 50
typestringrequired
Allowed:mime
typestringrequired
Allowed:image
object
rulesobject[]required
max items 20
Show properties
Array of object
One of:
object
operatorobjectrequired
Show properties
Any of:
object
conditionstringrequired
Allowed:eq
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:ne
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:lt
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:lte
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:gt
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:gte
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:in
valueinteger[]required
min items 1 · max items 50
typestringrequired
Allowed:width
object
operatorobjectrequired
Show properties
Any of:
object
conditionstringrequired
Allowed:eq
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:ne
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:lt
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:lte
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:gt
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:gte
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:in
valueinteger[]required
min items 1 · max items 50
typestringrequired
Allowed:height
object
operatorobjectrequired
Show properties
Any of:
object
conditionstringrequired
Allowed:eq
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:ne
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:lt
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:lte
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:gt
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:gte
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:in
valueinteger[]required
min items 1 · max items 50
typestringrequired
Allowed:size
object
operatorobjectrequired
Show properties
Any of:
object
conditionstringrequired
Allowed:eq
valueinteger[]required
min items 2 · max items 2
Show properties
Array of integer
Any of:
integer
integer
integer
integer
object
conditionstringrequired
Allowed:ne
valueinteger[]required
min items 2 · max items 2
Show properties
Array of integer
Any of:
integer
integer
integer
integer
object
conditionstringrequired
Allowed:lt
valueinteger[]required
min items 2 · max items 2
Show properties
Array of integer
Any of:
integer
integer
integer
integer
object
conditionstringrequired
Allowed:lte
valueinteger[]required
min items 2 · max items 2
Show properties
Array of integer
Any of:
integer
integer
integer
integer
object
conditionstringrequired
Allowed:gt
valueinteger[]required
min items 2 · max items 2
Show properties
Array of integer
Any of:
integer
integer
integer
integer
object
conditionstringrequired
Allowed:gte
valueinteger[]required
min items 2 · max items 2
Show properties
Array of integer
Any of:
integer
integer
integer
integer
object
conditionstringrequired
Allowed:in
valueinteger[][]required
min items 1 · max items 50
typestringrequired
Allowed:ratio
object
operatorobjectrequired
Show properties
Any of:
object
conditionstringrequired
Allowed:eq
valuestringrequired
min length 1 · max length 255
object
conditionstringrequired
Allowed:ne
valuestringrequired
min length 1 · max length 255
object
conditionstringrequired
Allowed:in
valuestring[]required
min items 1 · max items 50
typestringrequired
Allowed:mime
object
operatorobjectrequired
Show properties
Any of:
object
conditionstringrequired
Allowed:eq
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:ne
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:lt
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:lte
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:gt
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:gte
valueintegerrequired
min 0 · max 9007199254740991
object
conditionstringrequired
Allowed:in
valueinteger[]required
min items 1 · max items 50
typestringrequired
Allowed:duration
typestringrequired
Allowed:video
typestringrequired

The kind of Asset that the slot takes. It never changes, and it equals params.type.

Allowed:imagevideo
updatedAtnumber | nullrequired

When the Placement last changed. null until its first update.

nextCursorstring

Send this value as cursor to get the next page. It is absent on the last page.

400

The request does not match the schema of this operation: a field is missing or has the wrong type, or the body is not valid JSON. error is invalid_request, and issues names each field. Nothing was changed. Or AdCrunch cannot use the cursor: it cannot read it, or the cursor belongs to a different query. Then error is invalid_cursor. Send the nextCursor of the previous page with no change, or omit cursor to get the first page.

Any of:
object
issuesobject[]required

One entry for each field that does not match.

Show properties
Array of object
instringrequired

The part of the request that holds the field.

Allowed:bodycookieheadersparamsquery
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

pathstringrequired

A JSON Pointer into that part of the request, such as /filename. An empty string is the whole part.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

Allowed:invalid_request
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

object
errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

Allowed:invalid_cursor
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

401

No API key, or one that does not resolve. See the security scheme. error is unauthorized.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

Allowed:unauthorized
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

402

The organization has no active subscription. An owner subscribes at paywallUrl. error is organization_unentitled.

paywallUrlstring<uri>required

The page where an owner of the organization subscribes. Show it to the person.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

Allowed:organization_unentitled
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

403

The caller does not hold library:read. error is forbidden.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

Allowed:forbidden
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

404

The groupId names no group that your organization sees. error is not_found.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

Request
curl -X GET 'https://api.pr-1337.adcrunch.dev/library/placements?limit=100' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Response
{
  "data": [
    {
      "channel": "meta",
      "createdAt": 1790000500000,
      "createdBy": "usr_2e5b84",
      "deletedAt": null,
      "description": "Our own cut for Reels, never over 30 seconds.",
      "id": "plm_4b8d27",
      "isGlobal": false,
      "name": "Reels short cut",
      "organizationId": "org_3a7f10",
      "params": {
        "rules": [
          {
            "operator": {
              "condition": "eq",
              "value": [
                9,
                16
              ]
            },
            "type": "ratio"
          },
          {
            "operator": {
              "condition": "lte",
              "value": 30000
            },
            "type": "duration"
          }
        ],
        "type": "video"
      },
      "type": "video",
      "updatedAt": null
    },
    {
      "channel": "meta",
      "createdAt": 1789000000000,
      "createdBy": null,
      "deletedAt": null,
      "description": null,
      "id": "plm_meta_stories_video",
      "isGlobal": true,
      "name": "Meta Stories video",
      "organizationId": null,
      "params": {
        "rules": [
          {
            "operator": {
              "condition": "eq",
              "value": [
                9,
                16
              ]
            },
            "type": "ratio"
          },
          {
            "operator": {
              "condition": "gte",
              "value": 250
            },
            "type": "width"
          },
          {
            "operator": {
              "condition": "in",
              "value": [
                "video/mp4",
                "video/quicktime"
              ]
            },
            "type": "mime"
          },
          {
            "operator": {
              "condition": "gte",
              "value": 1000
            },
            "type": "duration"
          }
        ],
        "type": "video"
      },
      "type": "video",
      "updatedAt": null
    }
  ]
}

Was this page helpful?