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

Search the Meta interests and job titles

Available on: Meta

Live read. Asks Meta now for the interests or the job titles whose name matches q, as this ad account can target them. Send the id of each option that you choose in interests or workPositions when you create an ad set.

Keep the id, not the name: Meta can rename an option. audienceSizeLowerBound and audienceSizeUpperBound give the size of the audience that Meta estimates for the option alone. path gives the category of an interest. A field that Meta does not give is null. Meta gives at most 45 options on one page.

An advertiser that your organization does not own answers 404, with error of not_found. An advertiser that does not exist, and one that is not a Meta ad account, answer the same.

AdCrunch stores nothing from this read. Each request counts against the rate limits of Meta.

limit and cursor page the answer. Send nextCursor back as cursor to get the next page. A page can hold no row and still carry nextCursor.

GET/observe/{advertiserId}/targeting-options
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.

Path parameters
advertiserIdstringrequired
matches ^(acc_)[\s\S]{0,}$
Query parameters
qstringrequired
min length 1
typestringrequired
Allowed:interestwork_position
cursorstring
min length 1
limitinteger
min 1 · max 500 · default: 100
Responses
200

The options that match the search.

dataobject[]required

The interests or the job titles whose name matches q, in the order of Meta. An empty array can carry nextCursor: then more rows can exist.

Show properties
Array of object
audienceSizeLowerBoundinteger | nullrequired

The lower bound of the audience size that Meta estimates for this option alone. Null when Meta gives none.

min -9007199254740991 · max 9007199254740991
audienceSizeUpperBoundinteger | nullrequired

The upper bound of the audience size that Meta estimates for this option alone. Null when Meta gives none.

min -9007199254740991 · max 9007199254740991
idstringrequired

The Meta id of the option. Send it in interests or workPositions to create an ad set. Keep the id: Meta can rename an option.

namestringrequired

The name of the option in Meta.

pathstring[] | nullrequired

The category of the option and its parent categories, from the top. Null when Meta gives none.

typestringrequired

The type of the option: interest or work_position.

Allowed:interestwork_position
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 observe: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

Your organization does not own the advertiser in the path, it does not exist, or it is not a Meta ad account. The answer does not tell them apart. error is not_found. AdCrunch asks Meta nothing.

errorstringrequired

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

Allowed:not_found
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.

409

This advertiser has no usable connection to Meta. A person must reconnect it.

providerstringrequired

The ad platform this failure came from: meta.

errorstringrequired

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

Allowed:provider_not_connected
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.

502

The provider refused the request, or could not answer it. This failure is often transient. Send the request again.

platformErroranyrequired

The provider’s own error object, unchanged. For Meta it carries code, error_subcode, type, error_user_title and error_user_msg — branch on the subcode for anything AdCrunch does not model. It never holds the request AdCrunch sent.

providerstringrequired

The ad platform this failure came from: meta.

errorstringrequired

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

Allowed:provider_error
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-1108.adcrunch.dev/observe/string/targeting-options?q=string&type=interest' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
{
  "data": [
    {
      "audienceSizeLowerBound": 412000000,
      "audienceSizeUpperBound": 484500000,
      "id": "6003139266461",
      "name": "Yoga",
      "path": [
        "Interests",
        "Fitness and wellness",
        "Yoga"
      ],
      "type": "interest"
    },
    {
      "audienceSizeLowerBound": 18400000,
      "audienceSizeUpperBound": 21700000,
      "id": "6003256093937",
      "name": "Hot yoga",
      "path": [
        "Interests",
        "Additional interests",
        "Hot yoga"
      ],
      "type": "interest"
    }
  ]
}