Customer Support
Trillion Direct Search Network
API Manual
API Queries - List Campaigns
The list_campaigns function shows all of your Campaigns with their settings and status. There are optional parameters, for search specific Campaigns and Folders. If optional parameters are omitted, the default is to display all campaigns.
Additional Parameters
- campaign - Name of the campaign to search (Keyword or RON). (Optional)
- folder - Name of the folder to search. (Optional)
- approval -
- accepted - Campaign approved by account manager are shown. (Default)
- denied - Campaign denied by account manager are shown.
- pending - pending campaign waiting for account manager's action
- all - campaign from all above status are shown.
Note: Make sure to URL encode all values.
Example query and response:
Example query:
https://bid.trellian.com/api.html?username=user&api_key=key&mode=list_campaigns&folder=Student%20Loans&campaign=credit%20cards
Response:
<results> <result Average_Bid="0.230" Blacklist_Subids="" Campaign="credit cards" Daily_Limit="250.00" Folder="Student Loans" Folder_Status="Stopped" Geo_Target="US" Highest_Bid="1.553" My_Bid="5.000" Negative_Keywords="" Status="Stopped" Target_URL="http://www.trellian.com" Traffic_Type="all" Type="Keyword"> <Whitelist_Subids> <result id="1059815679" price="5.000"/> </Whitelist_Subids> </result> </results>
Example query:
In this example, we will see if the approval is accepted.
https://bid.trellian.com/api.html?username=user&api_key=key&mode=list_campaigns&approval=acceptedResponse:
<results> <result AD_Type="ron" Approval_status="APPROVED" Average_Bid="0.030" Blacklist_Subids="" Campaign=".au.03.nonadult.macos.safari" Channel="direct" Daily_Limit="80.00" Folder="testron" Folder_Status="Active" Geo_Target="ALL" Highest_Bid="" My_Bid="0.050" Negative_Keywords="" Status="Stopped" Target_URL="https://www.trillion.com" Traffic_Type="all" Type="RON" Whitelist_Subids=""/> <result AD_Type="ron" Approval_status="APPROVED" Average_Bid="0.030" Blacklist_Subids="" Campaign=".fr.03.nonadult.macos.safari" Channel="direct" Daily_Limit="80.00" Folder="testron" Folder_Status="Active" Geo_Target="ALL" Highest_Bid="" My_Bid="0.030" Negative_Keywords="" Status="Stopped" Target_URL="https://www.trillion.com" Traffic_Type="all" Type="RON" Whitelist_Subids=""/> </results>
Example query:
In this example, we will see if the approval is denied.
https://bid.trellian.com/api.html?username=user&api_key=key&mode=list_campaigns&approval=deniedResponse:
<results> <result AD_Type="ron" Approval_status="DENIED" Average_Bid="0.030" Blacklist_Subids="" Campaign=".ar.03.nonadult.macos.safari" Channel="direct" Daily_Limit="80.00" Folder="testron" Folder_Status="Active" Geo_Target="ALL" Highest_Bid="" My_Bid="0.030" Negative_Keywords="" Status="Stopped" Target_URL="https://www.trillion.com" Traffic_Type="all" Type="RON" Whitelist_Subids=""/> <result AD_Type="ron" Approval_status="DENIED" Average_Bid="0.030" Blacklist_Subids="" Campaign=".br.03.nonadult.macos.safari" Channel="direct" Daily_Limit="80.00" Folder="testron" Folder_Status="Active" Geo_Target="ALL" Highest_Bid="" My_Bid="0.030" Negative_Keywords="" Status="Stopped" Target_URL="https://www.trillion.com" Traffic_Type="all" Type="RON" Whitelist_Subids=""/> <result AD_Type="keyword" Approval_status="DENIED" Average_Bid="0.170" Blacklist_Subids="" Campaign="education" Channel="direct" Daily_Limit="100.00" Folder="testdirect" Folder_Status="Active" Geo_Target="US" Highest_Bid="0.774" My_Bid="5.000" Negative_Keywords="" Status="Stopped" Target_URL="https://www.mamma.com" Traffic_Type="all" Type="Keyword" Whitelist_Subids=""/> </results>
Example query:
In this example, we will see if the approval is pending.
https://bid.trellian.com/api.html?username=user&api_key=key&mode=list_campaigns&approval=pendingResponse:
<results> <result AD_Type="ron" Approval_status="PENDING" Average_Bid="0.050" Blacklist_Subids="" Campaign=".hk.05.desktop.windows.chrome" Channel="direct" Daily_Limit="80.00" Folder="testron" Folder_Status="Active" Geo_Target="ALL" Highest_Bid="" My_Bid="0.050" Negative_Keywords="" Status="Stopped" Target_URL="https://www.trillion.com" Traffic_Type="all" Type="RON" Whitelist_Subids=""/> <result AD_Type="ron" Approval_status="PENDING" Average_Bid="0.020" Campaign=".hm.02.desktop.nonadult.windows.chrome" Channel="direct" Daily_Limit="50.00" Folder="testron" Folder_Status="Active" Geo_Target="ALL" Highest_Bid="" My_Bid="0.900" Negative_Keywords="" Status="Stopped" Target_URL="https://www.above.com" Traffic_Type="all" Type="RON"> <Blacklist_Subids> <result>57595103</result> <result>150351530</result> <result>172586601</result> </Blacklist_Subids> <Whitelist_Subids> <result id="1854815464" price="0.910"/> <result id="2044261633" price="0.910"/> </Whitelist_Subids> </result> <result AD_Type="ron" Approval_status="PENDING" Average_Bid="0.020" Blacklist_Subids="" Campaign=".lv.02.desktop.nonadult.windows.chrome" Channel="direct" Daily_Limit="50.00" Folder="testron" Folder_Status="Active" Geo_Target="ALL" Highest_Bid="" My_Bid="0.900" Negative_Keywords="" Status="Stopped" Target_URL="https://www.above.com" Traffic_Type="all" Type="RON" Whitelist_Subids=""/> <result AD_Type="keyword" Approval_status="PENDING" Average_Bid="0.070" Campaign="nike" Channel="direct" Daily_Limit="100.00" Folder="testdirect" Folder_Status="Active" Geo_Target="BH" Highest_Bid="" My_Bid="10.000" Negative_Keywords="" Status="Stopped" Target_URL="https://www.mamma.com" Traffic_Type="all" Type="Keyword"> <Blacklist_Subids> <result>949890674</result> </Blacklist_Subids> <Whitelist_Subids> <result id="865370471" price="10.010"/> <result id="2044261633" price="10.010"/> </Whitelist_Subids> </result>
Example query:
In this example, we will see if the approval is set to all.
https://bid.trellian.com/api.html?username=user&api_key=key&mode=list_campaigns&approval=all<results> <result AD_Type="" Approval_status="PENDING" Average_Bid="0.05" Blacklist_Subids="" Campaign="beautybay" Channel="suggest" Daily_Limit="100.00" Folder="Test" Folder_Status="Active" Geo_Target="PY" Highest_Bid="" My_Bid="8.000" Negative_Keywords="" Status="Stopped" Target_URL="https://www.above.com" Traffic_Type="mobile" Type="Keyword" Whitelist_Subids=""/> <result AD_Type="" Approval_status="DENIED" Average_Bid="0.05" Blacklist_Subids="" Campaign="brandcrowd" Channel="suggest" Daily_Limit="88.00" Folder="Test" Folder_Status="Active" Geo_Target="AZ" Highest_Bid="" My_Bid="4.000" Negative_Keywords="" Status="Stopped" Target_URL="https://www.trillion.com" Traffic_Type="mobile" Type="Keyword" Whitelist_Subids=""/> <result AD_Type="keyword" Approval_status="PENDING" Average_Bid="0.100" Blacklist_Subids="" Campaign="destiny" Channel="direct" Daily_Limit="80.00" Folder="Test" Folder_Status="Active" Geo_Target="PR" Highest_Bid="" My_Bid="2.000" Negative_Keywords="" Status="Stopped" Target_URL="https://www.above.com" Traffic_Type="all" Type="Keyword" Whitelist_Subids=""/> <result AD_Type="keyword" Approval_status="DENIED" Average_Bid="0.090" Blacklist_Subids="" Campaign="education" Channel="direct" Daily_Limit="50.00" Folder="Test" Folder_Status="Active" Geo_Target="CL" Highest_Bid="0.400" My_Bid="1.000" Negative_Keywords="" Status="Stopped" Target_URL="https://www.above.com" Traffic_Type="desktop" Type="Keyword" Whitelist_Subids=""/> <result AD_Type="" Approval_status="APPROVED" Average_Bid="0.05" Blacklist_Subids="" Campaign="fashionesta" Channel="suggest" Daily_Limit="70.00" Folder="Test" Folder_Status="Active" Geo_Target="GE" Highest_Bid="" My_Bid="0.500" Negative_Keywords="" Status="Active" Target_URL="https://www.mamma.com" Traffic_Type="all" Type="Keyword" Whitelist_Subids=""/> <result AD_Type="ron" Approval_status="PENDING" Average_Bid="0.030" Blacklist_Subids="" Campaign=".um.03.nonadult.macos.safari" Channel="direct" Daily_Limit="90.00" Folder="Test" Folder_Status="Active" Geo_Target="ALL" Highest_Bid="" My_Bid="0.500" Negative_Keywords="" Status="Stopped" Target_URL="https://www.mamma.com" Traffic_Type="all" Type="RON" Whitelist_Subids=""/> <result AD_Type="ron" Approval_status="DENIED" Average_Bid="0.030" Blacklist_Subids="" Campaign=".wf.03.nonadult.macos.safari" Channel="direct" Daily_Limit="80.00" Folder="Test" Folder_Status="Active" Geo_Target="ALL" Highest_Bid="" My_Bid="0.030" Negative_Keywords="" Status="Stopped" Target_URL="https://www.trillion.com" Traffic_Type="all" Type="RON" Whitelist_Subids=""/> </results>
If there are no campaigns in your account, the response will not be an error. Instead, this will be shown:
</results>
Error Responses:
Possible error responses for this function are:
- 420 - Folder not in account
- 420 - Campaign could not be found
- 421 - Campaign may only contain letters, digits and periods
- 421 - Folder name may only contain letters, digits and spaces
- Other general errors, such as 200 - Internal Error or 300 - Username or API Key invalid.
For a complete list of error responses, see the Error Codes manual page.