Documentation Index
Fetch the complete documentation index at: https://docs.x.com/llms.txt
Use this file to discover all available pages before exploring further.
API Reference
This is the full technical reference. For an overview of Catalog Management concepts, product feeds, and Dynamic Product Ads, see the
Catalog Management Overview.
These endpoints are currently available via early-access only. To apply for access, please fill out this form or reach out to your X representative.
Product Catalogs
GET product_catalogs
Retrieve details for some or all product catalogs associated with the authenticated user (default) or the user specified in theuser_id parameter.
Resource URL
https://ads-api.x.com/12/product_catalogs
A reference to the user you are operating with in the request. Use GET users/lookup to retrieve a user ID for a screen name.
POST product_catalogs
Create a product catalog. One user can only create one catalog that holds all products. X merchants need to create a catalog before uploading products. Resource URLhttps://ads-api.x.com/12/product_catalogs
Name of your product catalog.
A reference to the user you are operating with in the request. Use GET users/lookup to retrieve a user ID for a screen name.
PUT product_catalogs/:product_catalog_id
Update a product catalog. Resource URLhttps://ads-api.x.com/12/product_catalogs/:product_catalog_id
Identifier of your product catalog.
Name of your product catalog.
DELETE product_catalogs/:product_catalog_id
Delete a product catalog. This is a permanent deletion. Resource URLhttps://ads-api.x.com/12/product_catalogs/:product_catalog_id
Identifier of your product catalog.
Products
X merchants are able to send a synchronous batch request to view, create, edit, and delete products, instead of having to upload a feed file. There are two types of products: individual products vs product groups. A product group is a group of multiple variants and is created when the user provides anitem_group_id and has multiple variants for the product. When you call a fetch endpoint for products that includes grouped products, only the product that you submitted first will be returned.
GET product_catalogs/:product_catalog_id/products
Retrieve details for some or all products associated with the specified Product Catalog. Resource URLhttps://ads-api.x.com/12/product_catalogs/:product_catalog_id/products
This is a X-generated item group identifier.
Specifies the number of records to try and retrieve per distinct request.
Min: 1, Max: 100
Min: 1, Max: 100
Specifies a cursor to get the next page of results. See Pagination for more information.
PUT product_catalogs/:product_catalog_id/products
Add new products or update existing ones via a batch request. In a single request, up to 25 products can be supported. A PUT request needs all of the required fields from the attribute list below. If we do not recognize theid, we create a new product. If we recognize the id in your catalog, we update the corresponding existing product.
Resource URL
https://ads-api.x.com/12/product_catalogs/:product_catalog_id/products
Request Attributes (JSON body)
Unique ID for the item. Use the SKU if possible. If there are multiple instances of the same ID, all instances will be ignored.
Unique product object identifier generated by X.
The name of the product. Should be the same name as the product from the landing product page given through
link or mobile_link attributes. Max 150 characters.The description of the product. This field does not support HTML and must be in plain text. Max 5000 characters.
Current availability of your item.
Possible values:
Possible values:
in stock, available for order, preorder, out of stock, discontinuedCondition of the item being sold.
Possible values:
Possible values:
new, used, refurbishedPrice of the item. Format as a number followed by the 3-digit ISO currency code (ISO 4217), with a space between cost and currency. Use
. as the decimal point.URL of the product page where people can buy the item. Must include
https.URL for the primary image of your item. Must be JPG, GIF, WEBP, or PNG. Minimum 500x500px. Max file size 5MB.
The brand name of the item. Required if
gtin and mpn are not available.Global Trade Item Number (UPC, EAN, JAN, or ISBN). Required if
brand and mpn are not available.Manufacturer Part Number. Required if
gtin and brand are not available.URL of a mobile-optimized product page. Must include
https.Comma-separated list of up to 10 additional image URLs. Follow the same specs as
image_link.Category according to Google’s product taxonomy (path or ID).
Your business’s custom product taxonomy. Subcategories separated by
> (with spaces).Quantity available to sell. Must be ≥ 1 when
availability is in stock.Discounted price (must be lower than
price). Same format as price.Time range for the sale period in ISO-8601 format:
YYYY-MM-DDTHH:MM+HH:MM/YYYY-MM-DDTHH:MM+HH:MM.Groups product variants together (size, color, age_group, gender). Required if the product has variants.
X-generated item group identifier.
Gender for item sizing.
Possible values:
Possible values:
female, male, unisexPrimary color of the product (do not use hex codes).
Size of the item (word, abbreviation, or number).
Associated age group.
Possible values:
Possible values:
adult, all ages, teen, kids, toddler, infant, newbornExtra custom label.
Extra custom label.
Extra custom label.
Extra custom label.
Extra custom label.
Warnings about your request.
Error messages about your request.
Unique product object identifier generated by X.
Unique ID for the item.
Status of your request.
Possible values:
Possible values:
CREATE_SUCCESS, UPDATE_SUCCESS, ERROR, NO_CHANGEDELETE product_catalogs/:product_catalog_id/products
Delete existing products. This is a permanent deletion. Resource URLhttps://ads-api.x.com/12/product_catalogs/:product_catalog_id/products
Request Parameters (JSON body)
Array of unique product object identifiers generated by X.
Product Sets
Product Sets are collections of products which represent a subset of your catalog (e.g. “Fall Sale Products”). You can use product sets to run Dynamic Product Ads (DPA) featuring the specific products included in that collection, rather than all products in your catalog.GET product_catalogs/:product_catalog_id/product_sets/:product_set_id
Retrieve details for a specific Product Set associated with the specified Product Catalog. Resource URLhttps://ads-api.x.com/12/product_catalogs/:product_catalog_id/product_sets/:product_set_id
Unique ID for the product set.
POST product_catalogs/:product_catalog_id/product_sets
Create a new product set. Resource URLhttps://ads-api.x.com/12/product_catalogs/:product_catalog_id/product_sets
Request Parameters (JSON body)
Name of the product set.
Description of the product set.
Type of product set.
Possible values:
Possible values:
MANUAL, FILTEREDRequired when
Supported attributes:
Supported operators:
type is FILTERED. Array of filter objects with attribute, operator, and value.Supported attributes:
price, product_type, google_product_category, sale_price, inventory, custom_label_0 through custom_label_4.Supported operators:
GREATER_THAN, EQUAL_TO, LESS_THAN, MATCH, NOT_CONTAINS, CONTAINS.Required when
type is MANUAL. Array of X-generated product keys.Status of product set creation when using
Possible values:
FILTERED type.Possible values:
DONE, PROCESSING, FAILEDPUT product_catalogs/:product_catalog_id/product_sets/:product_set_id
Update an existing product set. Note: UpdatingFILTERED product sets is not supported. The example below shows a MANUAL product set update.
Resource URL
https://ads-api.x.com/12/product_catalogs/:product_catalog_id/product_sets/:product_set_id
Request Parameters (JSON body)
Unique ID for the product set.
Name of the product set.
Description of the product set.
Array of X-generated product keys (for MANUAL sets).
DELETE product_catalogs/:product_catalog_id/product_sets/:product_set_id
Delete an existing product set. This is a permanent deletion. Resource URLhttps://ads-api.x.com/12/product_catalogs/:product_catalog_id/product_sets/:product_set_id
Unique ID for the product set.
Scheduled Feeds
Scheduled Feeds configure the file location and frequency with which X ingests product data into a user’s catalog. Only one product feed is supported per user. Importing a scheduled feed is an additive action — removing products from the feed does not delete them from the catalog.GET product_catalogs/:product_catalog_id/scheduled_feeds
Retrieve details for scheduled feeds associated with the specified Product Catalog. Resource URLhttps://ads-api.x.com/12/product_catalogs/:product_catalog_id/scheduled_feeds
Example Request
POST product_catalogs/:product_catalog_id/scheduled_feeds
Create a scheduled product feed. Resource URLhttps://ads-api.x.com/12/product_catalogs/:product_catalog_id/scheduled_feeds
Host feed URL for your product file. Can be up to 8GB.
Format of the product feed file.
Possible values:
Possible values:
CSV, TSV, XMLHow often X should ingest the feed.
Possible values:
Possible values:
HOURLY, DAILY, WEEKLYRequired for
WEEKLY or HOURLY frequency.WEEKLY:MONDAY–SUNDAYHOURLY:1,2,3,4,6,8,12DAILY: Do not include this parameter.
Time to import the feed file (HH:MM format).
IANA time zone for
start_time.PUT product_catalogs/:product_catalog_id/scheduled_feeds/:scheduled_feed_id
Update an existing scheduled product feed. Resource URLhttps://ads-api.x.com/12/product_catalogs/:product_catalog_id/scheduled_feeds/:scheduled_feed_id
Unique ID for the scheduled feed.
Host feed URL for your product file (up to 8GB).
Format of the product feed file.
Possible values:
Possible values:
CSV, TSV, XMLIngestion frequency.
Possible values:
Possible values:
HOURLY, DAILY, WEEKLYRepeat value (see POST for valid values per frequency).
Time to import the feed (HH:MM).
IANA time zone for
start_time.DELETE product_catalogs/:product_catalog_id/scheduled_feeds/:scheduled_feed_id
Delete an existing scheduled product feed. This is a permanent deletion. Resource URLhttps://ads-api.x.com/12/product_catalogs/:product_catalog_id/scheduled_feeds/:scheduled_feed_id
Unique ID for the scheduled feed.