Flight Ads - Catalog & Feed

To promote your flight inventory on Facebook, you have to share information about your flights with Facebook. You do this by creating a flight catalog and then filling it with flight routes. There are three ways to fill your catalog and keep it up to date.

  1. Upload CSV or XML files for 'flight feeds' with flight inventory
  2. Use event activity to automatically fill your catalog
  3. Combine a flight feed with automatically generated flights

You can create and manage your flight catalogs in your Commerce Manager:

  1. Create a flight catalog
  2. Upload your feed to Facebook
  3. Create product sets out of your flight catalog
  4. Associate the catalog to your event sources

Flight Feed - Upload Your Flights to Facebook

A flight feed is a file with your flight inventory. Every line or item in the file represents a single route. You can use one or more flight feeds, as long as all feeds together contain your full flight inventory.

Supported Flight Feed Formats

CSV > Sample - Description

CSV sample | TSV sample (flattened)

  • The first row must list the chosen field names in the order the values will be given. Subsequent rows then supply the corresponding values for each flight.
  • Fields containing whitespace or commas should be enclosed in "double quotes".
  • Nested or multi-value fields such as image can be represented using JSON-encoded values or by a set of "flattened" plain-text columns labeled using JSON-path syntax, such as image[0].url, image[0].tag[0], image[0].tag[1]. Both conventions can be used interchangeably in the same file.

XML > Sample - Description

XML sample

  • A root <listings> XML node encloses a set of <listing> nodes, each of which represents a flight.
  • The file must begin with a valid <?xml declaration tag.

The feed parser automatically detects UTF8, UTF16, or UTF32 text encodings, and defaults to LATIN1 if it encounters an unexpected byte sequences. You can provide text in field values in any language; however, field names must be given exactly as below, in English.

Supported Fields - Flight Ads

The following supported fields are designed for items you add to your product catalog.

For localized catalogs, see supported fields for flight ads.

Field and TypeDescription


type: string


The IATA code for the origin. Supports airport and city IATA code. Use IATA Code Search to validate your IATA codes. Tip: To improve performance, avoid using a space for this unique identifier field.

Example: SFO


type: string


The IATA code for the destination. Supports airport and city IATA code. Use IATA Code Search to validate your IATA codes. Tip: To improve performance, avoid using a space for this unique identifier field.

Example: JFK


type: object


Max items: 20

Image data for this flight. You can provide up to 20 images for the flight. Each image contains two fields: url and tag. You can have multiple tags associated with an image. You must provide at least one image. Each image can be up to 4 MB in size.

See Image Object Parameters


type: string


Max size: 5000

A short paragraph describing the route.


type: string

Required only if you do not specify a deep link on ad level. You can use the Deep Link field in Ads Manager, or template_url_spec in the API).

Link to the external site where you can view the flight. If a deep link is specified on ad level, that will take precedence.


type: string

The name of the origin city.

Example: San Francisco


type: string

The name of the destination city.

Example: New York


type: string

Price of the flight. You must specify the value with currency.

Example: 99.99 USD


type: element

Deep link straight to the flight details page in your mobile app using App Links. You can specify deep links (in order of precedence, highest to lowest):

  1. on ad level using template_url_spec
  2. here in the feed using an Applink Object
  3. by adding App Link meta tags to your website.


type: string

One-way price of the flight. You must specify the value with currency.

Example: 99.99 USD


type: integer

Priority of the flight. Value from 0(lowest priority) to 5(highest priority). Flight without this value will have priority=0.

Example: 5

Image Object Parameters

Field Name and TypeDescription


type: string


URL of the flight image. Follow these image specifications:

  • All images must be in JPG, GIF, or PNG format.

  • For carousel ads and collection ads: Images display in square (1:1) format. The minimum image size is 500 x 500 px. We recommend 1024 x 1024 px for best quality.

  • For single image ads: Images display at a 1.91:1 aspect ratio. The minimum image size is 500 x 500 px. We recommend 1200 x 628 px for best quality.


type: string

A string that represents what's in the image. There can be multiple tags associated with an image.


  • Fitness Center
  • Swimming Pool

Optional. INSTAGRAM_STANDARD_PREFERRED - Allows advertisers to tag a specific image in their feed as the default image that will be used for Instagram. This tag is case sensitive.

If you have separate apps for iPhone and iPad, specify iPhone and iPad specific information. Otherwise specify only iOS information.

Field Name and TypeDescription


type: string

A custom scheme for the iOS app.

Example: example-ios://electronic


type: string

The app ID for the App Store.

Example: 1234


type: string

The name of the app (suitable for display).

Example: Electronic Example iOS


type: string

A custom scheme for the iPhone app.

Example: example-iphone://electronic


type: string

The app ID for the App Store.

Example: 5678



The name of the app (suitable for display).

Example: Electronic Example iPhone


type: string

A custom scheme for the iPhone app.

Example: example-ipad://electronic


type: string

The app ID for the App Store.

Example: 9010


type: string

The name of the app (suitable for display).

Example: Electronic Example iPad


type: string

A custom scheme for the Android app.

Example: example-android://electronic


type: string

A fully-qualified package name for intent generation.

Exammple: com.electronic


type: string

The name of the app (suitable for display).

Example: Electronic Example Android

Product Deep Links

Provide deep links in feed following the App Links specification. Deep link information in feed takes precedence over any information Facebook collects with App Links metadata with our web crawler.

If you already have deep link information from App Links, you don't need to specify this data. Facebook uses information from App Links to display the correct deep link. To display deep links in your ads, see Dynamic Ads, Ad Template.

Autogenerate Flights - Add Routes to Catalog Automatically Using Event Activity

Facebook can automatically add routes to your catalog based on pixel and app event activity. Every time an event is received with a route that does not yet exist in the catalog, it can be added automatically. This allows to you use flight ads for all your flights without having to deal with flight feeds.

To enable this, make a POST request to your flight catalog and set generate_items_from_events to true.

curl \
  -F 'flight_catalog_settings={generate_items_from_events:1}' \
  -F 'access_token=<ACCESS_TOKEN>' \

Routes that are added automatically don't have an image (to display in the ad). Therefore, you need to provide a generic image to use for all autogenerated routes.

curl \
  -F 'fallback_image_url=http://example.com/some.image_1.jpg' \
  -F 'access_token=<ACCESS_TOKEN>' \

As soon as your catalog is associated to a pixel and/or app, and receiving flight ads events, your catalog populates. You can verify this by querying the catalog.

curl \
  -F 'access_token=<ACCESS_TOKEN>' \

Combined - Use Flight Feeds with Automatically Generated Flights

You can combine uploading a flight feed with autogenerated routes. Combining these options allows you to leverage flight ads for all your flights, while providing custom images for your most important routes using a flight feed.

To do so, just combine the steps uploading a flight feed with automatically filling your catalog.

The following sections are only relevant if you want to manage your catalogs using this API.

Create a Flight Catalog using the API

A flight catalog is a container for your flight inventory. To use the catalog API, make sure you have the appropriate Marketing API Access Level and that you have accepted the Terms of Service by creating your first catalog through Business Manager.

To create a flight catalog for flight ads, set vertical to flights:

curl -X POST \ -F 'name="Test Flight Catalog"' \ -F 'vertical="flights"' \ -F 'access_token=<ACCESS_TOKEN>' \ https://graph.facebook.com/v12.0/{business-id}/owned_product_catalogs
'use strict'; const bizSdk = require('facebook-nodejs-business-sdk'); const Business = bizSdk.Business; const ProductCatalog = bizSdk.ProductCatalog; const access_token = '<ACCESS_TOKEN>'; const app_secret = '<APP_SECRET>'; const app_id = '<APP_ID>'; const id = '<BUSINESS_ID>'; const api = bizSdk.FacebookAdsApi.init(access_token); const showDebugingInfo = true; // Setting this to true shows more debugging info. if (showDebugingInfo) { api.setDebug(true); } const logApiCallResult = (apiCallName, data) => { console.log(apiCallName); if (showDebugingInfo) { console.log('Data:' + JSON.stringify(data)); } }; let fields, params; fields = [ ]; params = { 'name' : 'Test Flight Catalog', 'vertical' : 'flights', }; const owned_product_catalogs = (new Business(id)).createOwnedProductCatalog( fields, params ); logApiCallResult('owned_product_catalogs api call complete.', owned_product_catalogs);
require __DIR__ . '/vendor/autoload.php'; use FacebookAds\Object\Business; use FacebookAds\Object\ProductCatalog; use FacebookAds\Api; use FacebookAds\Logger\CurlLogger; $access_token = '<ACCESS_TOKEN>'; $app_secret = '<APP_SECRET>'; $app_id = '<APP_ID>'; $id = '<BUSINESS_ID>'; $api = Api::init($app_id, $app_secret, $access_token); $api->setLogger(new CurlLogger()); $fields = array( ); $params = array( 'name' => 'Test Flight Catalog', 'vertical' => 'flights', ); echo json_encode((new Business($id))->createOwnedProductCatalog( $fields, $params )->exportAllData(), JSON_PRETTY_PRINT);
from facebook_business.adobjects.business import Business from facebook_business.adobjects.productcatalog import ProductCatalog from facebook_business.api import FacebookAdsApi access_token = '<ACCESS_TOKEN>' app_secret = '<APP_SECRET>' app_id = '<APP_ID>' id = '<BUSINESS_ID>' FacebookAdsApi.init(access_token=access_token) fields = [ ] params = { 'name': 'Test Flight Catalog', 'vertical': 'flights', } print Business(id).create_owned_product_catalog( fields=fields, params=params, )
import com.facebook.ads.sdk.*; import java.io.File; import java.util.Arrays; public class SAMPLE_CODE_EXAMPLE { public static void main (String args[]) throws APIException { String access_token = \"<ACCESS_TOKEN>\"; String app_secret = \"<APP_SECRET>\"; String app_id = \"<APP_ID>\"; String id = \"<BUSINESS_ID>\"; APIContext context = new APIContext(access_token).enableDebug(true); new Business(id, context).createOwnedProductCatalog() .setName(\"Test Flight Catalog\") .setVertical(ProductCatalog.EnumVertical.VALUE_FLIGHTS) .execute(); } }
require 'facebook_ads' access_token = '<ACCESS_TOKEN>' app_secret = '<APP_SECRET>' app_id = '<APP_ID>' id = '<BUSINESS_ID>' FacebookAds.configure do |config| config.access_token = access_token config.app_secret = app_secret end business = FacebookAds::Business.get(id) owned_product_catalogs = business.owned_product_catalogs.create({ name: 'Test Flight Catalog', vertical: 'flights', })

Upload Your Flight Feeds via the API

Once you've created the catalog, you need to upload your flight feed(s) to Facebook. Use the API to create a feed object for every feed you want to upload. We support scheduled and direct uploads.

For scheduled uploads, specify a schedule when you create the feed. For non scheduled uploads, don't specify a schedule.

use FacebookAds\Object\ProductFeed;
use FacebookAds\Object\Fields\ProductFeedFields;
use FacebookAds\Object\Fields\ProductFeedScheduleFields;

$product_feed = new ProductFeed(null, <PRODUCT_CATALOG_ID>);

  ProductFeedFields::NAME => 'Test Feed',
  ProductFeedFields::SCHEDULE => array(
    ProductFeedScheduleFields::INTERVAL => 'DAILY',
    ProductFeedScheduleFields::URL =>'http://www.example.com/sample_feed.tsv',
    ProductFeedScheduleFields::HOUR => 22,

from facebookads.adobjects.productfeed import ProductFeed

product_feed = ProductFeed(parent_id=<PRODUCT_CATALOG_ID>)

product_feed[ProductFeed.Field.name] = 'Test Feed'
product_feed[ProductFeed.Field.schedule] = {
    'interval': 'DAILY',
    'url': 'http://www.example.com/sample_feed.tsv',
    'hour': 22,

ProductFeed productFeed = new ProductCatalog(<PRODUCT_CATALOG_ID>, context).createProductFeed()
  .setName("Test Feed")
String product_feed_id = productFeed.getId();
curl \
  -F 'name=Test Feed' \
  -F 'schedule={ 
    "interval": "DAILY", 
    "url": "http:\/\/www.example.com\/sample_feed.tsv", 
    "hour": 22 
  }' \
  -F 'access_token=<ACCESS_TOKEN>' \

In either case, the response is:

{ "id" : <PRODUCT_FEED_ID> }

Once you have created the feed (with or without schedule), you can do a one time upload of your feed using the PRODUCT_FEED_ID:

curl \
-F "url=http://www.example.com/sample_feed.xml" \
-F "access_token=<ACCESS_TOKEN>" \

Filter Flight Catalog to Flight Sets

Reference Docs

A flight set is a subset of your catalog. To set up flight ads, you need to create, at least, one flight set.

Flight sets are defined by filters that are applied to the flight catalog. For example, you can create a flight set with all routes that depart from London. Do note you can also create a flight set without any filters. In that case, the flight set will contain all flights in your catalog.

use FacebookAds\Object\ProductSet;
use FacebookAds\Object\Fields\ProductSetFields;

$flight_set = new ProductSet(null, <PRODUCT_CATALOG_ID>);

  ProductSetFields::NAME => 'Test Flight Set',
  ProductSetFields::FILTER => array(
    'origin_airport' => array(
      'eq' => 'LHR',

from facebookads.adobjects.productset import ProductSet

flight_set = ProductSet(None, <PRODUCT_CATALOG_ID>)

flight_set[ProductSet.Field.name] = 'Test Flights Set'
flight_set[ProductSet.Field.filter] = {
    'origin_airport': {
        'eq': 'SFO',

curl \
  -F 'name=Test Flight Set' \
  -F 'filter={"origin_airport":{"eq":"LHR"}}' \
  -F 'access_token=<ACCESS_TOKEN>' \

The filter parameter is made up of the following operators and data:

OperatorsFilter Type


Contains substring. Operator is case-insensitive.


Does not contain substring. Operator is case-insensitive.


Contains substring. Operator is case-insensitive.


Does not contain substring. Operator is case-insensitive.


Equal to. Operator is case-insensitive.


Not equal to. Operator is case-insensitive.


Less than. For numeric fields only.


Less than or equal to. For numeric fields only.


Greater than. For numeric fields only.


Greater than or equal to. For numeric fields only.

DataThe data being filtered


The IATA code for the origin.


The IATA code for the destination.


Price of the flight. The price is in cents.


A short paragraph describing the route.

Associate the catalog to your event sources

To map the data from your event sources (your pixels and app events) to your catalog, every catalog must be associated with these event sources. You can do this by visiting your business manager's catalog page and clicking the 'Associate Sources' button. Make sure to select the app and pixel that are receiving the travel events. Alternatively, you can use the API.

use FacebookAds\Object\ProductCatalog;

$product_catalog = new ProductCatalog(<PRODUCT_CATALOG_ID>);
$product_catalog->createExternalEventSource(array(), array(
  'external_event_sources' => array(
from facebookads.adobjects.productcatalog import ProductCatalog

product_catalog = ProductCatalog(<PRODUCT_CATALOG_ID>)
curl \
  -F 'external_event_sources=["<PIXEL_ID>","<APP_ID>"]' \
  -F 'access_token=<ACCESS_TOKEN>' \

When making the API call, specify the following parameters:

Parameter Name & TypeDescription


type: int[]

A list of Pixel and App IDs to associate with the catalog.