I need a 2 sample scripts (php or perl) coded which query the Yahoo Search Marketing (YSM)/Enterprise Web Services (EWS) 4.0 API ([url removed, login to view]) for basic account-level and keyword-level reports, and generate TSV outputs in the appropriate format.
I need two scripts (account-level and keyword-level) which query the Yahoo Search Marketing API for reports, and output them into standard extract form. This could be incredibly simple.
The scripts need to retrieve the reports for all accounts within a master account (or less preferably read from a list of accounts) and generate output as TSV (tab delimited) in the following format.
1) Account performance script
date – accountid - accountname – metrics
2) Keyword performance script
date – accountid – account - campaignid – campaign – adgroupid – adgroup – keywordid – keyword - metrics
31 days data, broken up by day, should be retrieved.
The metrics are all the provided performance metrics in the reports (e.g. Impressions, Clicks, Conversions).
These are the most basic data extracts required to do daily account or keyword level performance analysis.
The scripts should be:
*written in PHP or Perl(identify which in the bid)
*written for security and reliability
*minimise and report on (if possible) API quota consumption.
* work with V4 of the API
* written in English as well as PHP/Perl
If 3rd party modules are used, they need to be identified and approved by myself.
I am a developer, and don't need documentation, installation etc, just working, solid, illustrative code that I can develop further.