Ads API
From Facebook Developer Wiki
The article contains extended documentation about the Facebook Ads API.
Contents |
REST Interface
The API uses a REST-like interface. This means that our Facebook method calls are made over the internet by sending HTTP GET or POST requests to the Facebook API REST server . Nearly any computer language can be used to communicate over HTTP with the REST server.
Note: If you manually form your HTTP POST requests to Facebook, you must include the request data in the POST body. In addition, you should include a Content-Type: header of application/x-www-form-urlencoded.
Facebook API
The Facebook Ads API methods are built on top of Facebook Platform. To make Ads API calls, you'll need to create a Facebook Platform application and manage user sessions. Developers new to the Ads API should read the Getting Started guide.
API Structures
- ads.campaign_specs
- Definition of the
campaign_specsarray - ads.adgroup_specs
- Definition of the
adgroup_specsarray - ads.targeting_specs
- Definition of the
targetingarray - ads.creative_specs
- Definition of the
creativearray
API Methods
- ads.getAccounts
- Returns the user's Ads Account ID.
- ads.getConnectionObjectIds
- Returns a list of valid Connection IDs.
- ads.getCampaigns
- Returns all of the user's Facebook Ads Campaigns.
- ads.createCampaigns
- Creates new Facebook Ads Campaigns.
- ads.updateCampaigns
- Updates existing Facebook Ads Campaigns.
- ads.getCampaignStats
- Returns basic campaign statistics.
- ads.getAutoCompleteData
- Returns a list of possible Facebook Ads targeting data.
- ads.getAdGroups
- Returns all of the user's Facebook AdGroups.
- ads.createAdGroups
- Creates new Facebook AdGroups.
- ads.updateAdGroups
- Updates existing Facebook AdGroups.
- ads.getAdGroupStats
- Returns basic AdGroup statistics.
- ads.getAdGroupTargeting
- Returns targeting specifications for existing AdGroups.
- ads.getAdGroupCreatives
- Returns ad creative information for existing AdGroups.
- ads.estimateTargetingStats
- Returns an estimate of the users the proposed AdGroup may reach.
