Boatvertizer
  • Embed Ads on your Website
    • JavaScript Embed
    • JSON API
    • XML API
      • Raw Data XML
      • Formatted XML
    • Image Sizes
Powered by GitBook
On this page
  • Getting Started
  • Basic Structure
  • Language
  • Images
  1. Embed Ads on your Website

JSON API

Integrate your ads in your own custom application with our straightforward JSON API.

PreviousJavaScript EmbedNextXML API

Last updated 6 months ago

Getting Started

Start by creating an export token (API key) in Boatvertizer. Go to "Tools > JSON-Export".

Basic Structure

The JSON delivers all ads in the data array. Each ad contains various attributes, presented in both formatted and raw value. We recommend using the raw values for filtering and formatted values for the user output. The formatted values are translated into the selected output (see further below), the raw values are not affected by the language settings.

{
  "status": "ok",
  "count": 12,
  "data": [
    {
      "id": 7898,
      "status": {
        "formatted": "active",
        "value": "active"
      },
      "new_or_used": {
        "formatted": "Used Boat",
        "value": "usedboat"
      },
      "boat_category": {
        "formatted": "Power Boat",
        "value": "power"
      },
      "boat_type": {
        "formatted": "Motor Yacht",
        "value": [
          "motoryacht"
        ]
      },
      "title": {
        "formatted": "Princess 50 Fly",
        "value": "Princess 50 Fly"
      },
      "price": {
        "formatted": "EUR 500.000",
        "value": 500000,
        "currency": "EUR"
      },

Field labels

"fields": {
        "status": "Status",
        "advert_type": "Advert Type",
        "boat_category": "Category",
        "boat_type": "Type",
        "title": "Title",
        "price": "Asking Price",

Language

You can set the language with the GET parameter lan in the URL of the JSON request.

Available languages

en, de, fr, it, es, pt, nl, dk, se, fi, no, pl

Images

The fotos are listed in an array inside of each ad:

"fotos": [
                {
                    "url": "https://static.boatvertizer.com/fotos/qwerty/123456-large.jpg",
                    "width": 1024,
                    "height": 575,
                    "caption": "",
                    "description": ""
                },

The JSON also contains a fields array with a translated description of all attributes. You can use those field labels to display the data in various languages in your application. The field labels are also translated according to your parameter.

You can rewrite the -large suffix in the URL to the desired .

image size
language
language