AvantLink API - Main

Affiliate Modules:

Data Retrieval Subscription Configuration Used By AvantLink Tools

Merchant Modules:

Data Input Data Retrieval Used By AvantLink Tools

Merchant Parent Modules:

Data Retrieval Used By AvantLink Tools

Avantlink API Module: ProductSearch

Access:

Affiliate access, no authentication required.
Frequency limitation(s): 3600 request(s) per hour. 15000 request(s) per day.

Description:

This module provides access to the search capabilities of the AvantLink product database. This is a fairly complex module, and you might want to work your way up through a series of examples.
 
First, try making the most basic request: specifying only the authentication parameters and the term to search for, leaving all else to defaults:
 
https://classic.avantlink.com/api.php?module=ProductSearch&affiliate_id=Your-Affiliate-Id&search_term=shoes
 
Now, try customizing the results to include only certain fields, e.g. by adding the following to your API request:
 
&search_results_fields=Merchant+Name|Product+SKU|Product+Name|Retail+Price
 
By default, most fields are returned in the search results. If you'd like to return the default fields and one or two non-default fields but don't want to specify the entire list, you can use an asterisk to specify all default fields:
 
&search_results_fields=*|Variants+XML
 
So far, all of your output has been in XML, right? For a moment let's change to HTML output and experiment with some of the options there. Try adding each of the following parameter combinations to your API request to see some of the control you have over results formatting:
 
&output=html&search_results_layout=list
&output=html&search_results_layout=grid3
&output=html&search_results_layout=grid5

 
Also, let's see some of the functionality for producing RSS feeds directly from search results. Notice how you can include some HTML formatting in the result fields listing to make your RSS more presentable, and also that you can customize both the RSS item title as well as the item description by specifying two sets of field specifications separated by a tilde (~):
 
&output=rss
&output=rss&search_results_fields=Description|<br />|Retail+Price
&output=rss&search_results_fields=Product+Name|+|Retail+Price~Description|<br />|Merchant+Name|+-+|Retail+Price

 
Finally, take some time to experiment with the remaining parameters, as documented below, until you have a solution that fits your needs.
 
Code samples for using the product search module can be found here:

When customizing the search results to specify what fields to include in the results, and/or what to sort by, you must select field names from the following list:
  • Merchant Id
  • Merchant Name
  • Datafeed Id
  • Product Id
  • Subcategory Id
  • Category Id
  • Department Id
  • Subcategory Name
  • Category Name
  • Department Name
  • Product SKU
  • Product Name
  • Brand Name
  • Retail Price
  • Sale Price
  • Abbreviated Description
  • Short Description
  • Description
  • Thumbnail Image
  • Medium Image
  • Large Image
  • Buy URL
  • Product URL
  • Match Score
  • Commission
  • Match Precision
  • Product Content Widget
  • Match Result
  • Price Discount Percent
  • Price Discount Amount
  • Variants XML
  • Google Categorization

Supported Output Formats:

  • csv
  • html
  • js
  • rss
  • tab
  • xml
  • json

Parameters:

  • affiliate_id
    • Type: integer
    • Required: true
    • Description: An AvantLink assigned affiliate identifier.
  • module
    • Type: string
    • Required: true
    • Description: For this module, specify "ProductSearch".
  • search_term
    • Type: string
    • Required: true
    • Description: A word or phrase to search for.
  • website_id
    • Type: integer
    • Required: true
    • Description: An AvantLink assigned affiliate website identifier.
  • app_id
    • Type: integer
    • Required: false
    • Description: The AvantLink assigned identifier for an App Market application. When specified, this will trigger the construction of customized click-through URLs that track back to the particular app for any resulting sales.
  • custom_tracking_code
    • Type: string
    • Required: false
    • Description: A custom string to be appended to AvantLink click-through URLs, for use with your own personal tracking mechanisms.
  • datafeed_ids
    • Type: string
    • Required: false
    • Description: A pipe-delimited list of AvantLink assigned datafeed identifiers, e.g. "123|456".
  • merchant_category_ids
    • Type: string
    • Required: false
    • Description: A pipe-delimited list of AvantLink assigned merchant category identifiers, e.g. "2|11"
  • merchant_group_ids
    • Type: string
    • Required: false
    • Description: A pipe-delimited list of custom merchant grouping identifiers, e.g. "74|101"
  • merchant_ids
    • Type: string
    • Required: false
    • Description: A pipe-delimited list of AvantLink assigned merchant identifiers, e.g. "123|456".
  • output
    • Type: string
    • Required: false
    • Description: The specific output format you wish to receive results in. Possible values include: csv (comma-separated text), html, js (javascript document.write statements), rss, tab (tab-delimited text), and xml (the default). Individual modules may not support all output methods.
  • search_advanced_syntax
    • Type: boolean
    • Required: false
    • Description: Enables the use of advanced search syntax, causing special treatment in the following circumstances: preceding a word with "+" will restrict the search to ONLY products that mention that word, preceding a word with "-" will restrict the search to exclude any products that mention that word, and the keyword " OR " can be used to perform multiple simultaneous searches (in place of OR you can use the pipe character "|" to separate multiple search terms).
  • search_brand
    • Type: string
    • Required: false
    • Description: A product brand to which search results should be restricted (strict filter only; does not allow wildcards).
  • search_category
    • Type: string
    • Required: false
    • Description: A product category to which search results should be restricted.
  • search_department
    • Type: string
    • Required: false
    • Description: A department to which search results should be restricted.
  • search_input_fields
    • Type: string
    • Required: false
    • Description: A pipe-delimited list of fields to examine for a given search term; by default all available fields are considered.
  • search_on_sale_level
    • Type: integer
    • Required: false
    • Description: A numeric value representing how deeply discounted a product must be for inclusion in the product search results. Leave empty or 0 to include all products, regardless of whether they are on sale or not. Specify a value of 100 to restrict to only on-sale products, or 100 + discount to filter further, i.e. 110 includes only products with at least a 10% sale price discount.
  • search_on_sale_only
    • Type: boolean
    • Required: false
    • Description: Whether or not to restrict to just products that are on sale (1 = yes, 0 = no).
  • search_price_maximum
    • Type: float
    • Required: false
    • Description: The maximum product price (using current price, i.e. sale price where applicable) to allow into the search results; only products priced lower than this value will be included.
  • search_price_minimum
    • Type: float
    • Required: false
    • Description: The minimum product price (using current price, i.e. sale price where applicable) to allow into the search results; only products priced higher than this value will be included.
  • search_results_base
    • Type: integer
    • Required: false
    • Description: The base record to start with for results; default is 0.
  • search_results_count
    • Type: integer
    • Required: false
    • Description: How many records to show in the results; the default is 10.
  • search_results_fields
    • Type: string
    • Required: false
    • Description: Pipe-delimited list of fields to include in results, e.g. "Product Name|Retail Price|Description". It is possible to include all default fields plus a non-default field, e.g. "*|Variants XML". It is also possible to include formatted layout "templates" in the list of result fields, similar to advanced layouts in the Product Display Builder tool. To use this functionality, incorporate bracketed field names into HTML in your list of fields, for example: <div><a href="[Buy URL]">[Product Name]</a><br />[Description]</div>
  • search_results_layout
    • Type: string
    • Required: false
    • Description: How to format search results: "list", or "grid". For "grid" output an additional numeric value can be appended to indicate how many columns should be used in the layout, e.g. "grid2", "grid3", etc.
  • search_results_merchant_limit
    • Type: integer
    • Required: false
    • Description: The maximum number of results to return for each merchant.
  • search_results_options
    • Type: string
    • Required: false
    • Description: Miscellaneous search result display options. For HTML or JavaScript output, "nofollow" will cause links to be output with the rel="nofollow" attribute; "noheader" will suppress field/column headings from output. If multiple merchants/datafeeds are used for the search, and the number of records to return is specified (see "search_results_count"), then "interleave" will attempt to distribute the results evenly across each available merchant. The "precise" option will restrict your search results to just the most precise matches, i.e. those matching the greatest number of keywords from your original search term. The "sortearly" option controls sorting and record count limitation. By default the result is limited to the top N matches before sorting is applied; "sortearly" will reverse that so that sorting is performed first, and then the top N records are returned.
  • search_results_pagination_base
    • Type: string
    • Required: false
    • Description: The base URL to use for paginating search results, i.e. the URL that all page requests should go to. Usually, this will just be the full URL of the page that you are making your API request from.
  • search_results_sort_order
    • Type: string
    • Required: false
    • Description: A pipe-delimited list of information about how to sort the results, e.g. "Merchant Name|desc". The first part of the string should be the field to sort by, and the second should be the order (asc = ascending, desc = descending).
  • search_subcategory
    • Type: string
    • Required: false
    • Description: A product sub-category to which search results should be restricted.