Graph API Version

Ad Account Suggested Product Tags

Reading

To get suggested tags based on an image hash, you can make a GET request to /{ad-account-id}/suggested_product_tags.

Request

curl -X GET -G \
  -F 'image_hash=<IMAGE_HASH>' \ 
  -F 'is_shops_ad=true'  \ 
  -F 'instagram_actor_id=<ACTOR_ID>'  \ 
  -F 'page_id=<PAGE_ID>'  \ 
  -d 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v19.0/act_<AD_ACCOUNT_ID>/suggested_product_tags

Response

{
  "data": [
    {
      "product_id":<PRODUCT_ID_1>,
      "x": 0.5,
      "y": 0.6
    },
    {
      "product_id": <PRODUCT_ID_2>,
      "x": 0.2,
      "y": 0.7
    }

  ]
}

Fields

NameDescription

product_id

string

Product ID of the product tag.

x

float

X-coordinate of the product tag.

y

float

Y-coordinate of the product tag.

Parameters

ParameterDescription
image_hash
string

Returned after uploading an image to {ad-account-id}/adimages.

Required
instagram_actor_id
numeric string or integer

Either a Page-connected Instagram account ID or the Page-backed Instagram account ID. See more details in Set Up Instagram Accounts With Pages.

Required
is_shops_ad
boolean

Whether you want to use the suggested product tags and the image for Shops ads.

Required
page_id
numeric string

The ID for your Page.

Required

Fields

Reading from this edge will return a JSON formatted result:

{ "data": [], "paging": {} }

data

A list of AdAccountSuggestedTag nodes.

paging

For more details about pagination, see the Graph API guide.

Error Codes

ErrorDescription
100Invalid parameter

Creating

You can't perform this operation on this endpoint.

Updating

You can't perform this operation on this endpoint.

Deleting

You can't perform this operation on this endpoint.