APIs: data + AI

What are APIs?

API stands for " application programming interface".

APIs are methods or techniques to allow two pieces of software to " communicate" with each other. This enables you to automate tasks. Things you used to do manually or with specific software can be automated.

An example: Imagine you have a bookstore and you want to provide a product description for each book on your website. For that, you either search the internet yourself for information about the book you want to sell. Or... your supplier gives you an Excel file containing data about each book they have supplied. To add those details to your webshop, you have to copy and paste the text from another site or from the Excel file. In addition, you need to "rewrite" the text a bit to avoid accusations of plagiarism.

You are therefore using software, but you still have to do a lot of "manual" work.

With APIs you can automate this process.

  1. You can now build (or have built) your own app that automates this work. You create an app that automatically finds the correct data for each book you want to sell and adds that data to your site. The only thing you then have to do is give the new app a photo of your book.
  2. You can have your app communicate with online APIs. For data applications there are roughly two types of APIs: data APIs + AI APIs.

Data APIs

Data APIs or REST APIs provide the ability to request data automatically.

Book example:

  1. Your app requests, for example based on an ISBN number, the data for a specific book from Google Books or OpenLibrary.
  2. Google Books or OpenLibrary return the data in JSON format.
  3. Your app receives that data and stores it in the website’s own database.

Vinyl example:

  1. Your app sends the name of an artist and the name of an album to MusicBrainz.
  2. MusicBrainz returns the data in JSON format.
  3. Your app receives that data and stores it in the website’s own database.

Examples of such data APIs:

  • Google Books
  • OpenLibrary
  • Wikipedia
  • Google Maps: data about locations
  • OpenStreetMaps: data about locations + reverse geocoding (converting GPS coordinates into an address)
  • Amazon Products API
  • ...

No data API? Web scraping as an alternative

If there is no data API available for your purpose, you can use "web scraping". In that case you build an app that automatically searches other websites for the data and "steals" and copies the parts you need. That is less precise, but can still save you a lot of time.

AI APIs

Image Recognition

Image recognitionmeans you want to identify certain elements in an image.
See  https://www.leerschool.be/readpublication/artificial-intelligence/18

  • Google Vision: Google Vision recognizes every element in an image very accurately, including text. You can therefore use Google Vision for text recognition.
  • OpenAI Vision: You can send a photo to OpenAI Vision along with a question. For example, you send a photo of a vinyl record and ask which artist and album it is, and immediately request a biography of the artist.

Generative AI

You can let your own app communicate with the ChatGPT or Sora API, for example, to generate texts and images on demand. Your app sends a request to the corresponding API. For instance, you might ask it to modify a "stolen" text description.

Translations

You can let your app "communicate" with the DeepL API to automatically translate product descriptions for non-native visitors.

Audio: TTS + STT

TTS stands for "text to speech" and STT for "speech to text". You can let your app communicate with a TTS or STT API. A browser like Chrome has both APIs built in, but they are not very "accurate". If you want very accurate results, you can let your app communicate with OpenAI’s TTS and STT APIs. You send an audio recording and receive the text back as a response, or vice versa.

Search APIs

OpenAI also offers a search API that can search on the internet en generates a text description from the search results and the list of the sources. 

  • Perplexity AI– https://www.perplexity.ai– AI assistant with built-in web search and source citations, ideal for research queries.
  • Bing Copilot (Microsoft)– https://www.bing.com/chat– Combines GPT-4 with Bing Search via Azure, suitable for enterprise integrations.
  • Google Gemini (formerly Bard)– https://gemini.google.com– Google's AI with live web results powered by Google Search, great for general knowledge queries.
  • You.com– https://you.com– Privacy-focused AI assistant that includes live web search and summarization.
  • Claude 3 + external search– https://www.anthropic.com– Claude doesn't include search natively but can use results from external APIs like Bing or Google Custom Search.

An automated helpdesk

What are OpenAI Assistants?

OpenAI Assistants are custom AI agents you can create and configure using the OpenAI platform. They combine powerful language models like GPT-4 with your own instructions, files, tools, and memory to perform specialized tasks.

What can you do with them?

You can program assistants to respond in specific ways, remember user context, use tools like code interpreters or APIs, and even interact with uploaded documents. They are flexible and can be fine-tuned for various use cases.

Which real-world tasks can assistants handle?

Assistants can summarize documents, answer customer support questions, analyze data, draft emails, write reports, tutor students, generate code, translate text, and automate repetitive workflows in businesses.

API's for marketeers

The page currently mainly discusses data APIssuch as Google Books, OpenLibrary, MusicBrainz, Maps/OpenStreetMap, Amazon Product Advertising API and AI APIssuch as Vision, generative AI, DeepL, TTS/STT, search APIs and assistants/helpdesks.

For marketing purposes, I would add the following API categories to the overview:

Category Interesting data/APIs Marketing application
Website and behavioural data Google Analytics Data API / GA4 Automatically report on visitors, pages, conversions, campaigns, audience segments and customer behaviour. The GA4 Data API gives access to the same report data as the Analytics interface.
SEO data Google Search Console API See which search terms bring people to your website, which pages perform well, where impressions or clicks are dropping, and which content offers SEO opportunities.
Search trends and market interest Google Trends API / trend data Research which products, themes, artists, brands or keywords are becoming more popular. This is useful for comparing search interest over time.
Advertising data Google Ads API Manage campaigns, create reports, analyse bidding strategies, link ads to inventory or optimise them automatically.
Social advertising Meta Marketing API Manage ads on Facebook and Instagram, analyse audiences, set up A/B tests and monitor performance.
TikTok marketing TikTok API for Business Automate campaigns, manage TikTok ads, collect performance data and test creative campaigns with younger audiences.
CRM and customer data HubSpot API, Salesforce API, Zoho CRM API Store leads, customers, companies, deals and interactions centrally and use them for segmentation and follow-up.
Email marketing Mailchimp Marketing API, Brevo API, Klaviyo API Manage contact lists, create segments, personalise newsletters and send automated emails after actions such as a purchase, abandoned cart or registration.
E-commerce data Shopify API, WooCommerce API, Amazon Selling Partner API Use products, orders, customer behaviour, shopping carts, inventory and sales data for recommendations, promotions, retargeting and sales analysis.
Product and pricing data Amazon Product Advertising API, Bol.com Retailer API, Google Merchant Center API Compare prices, enrich product information, detect popular products and update product feeds automatically.
Location and audience data Google Maps Platform, OpenStreetMap/Nominatim, Foursquare Places API Local marketing: show the nearest store, segment customers by region, and align campaigns with neighbourhoods, competitors or visitor flows.
Social listening Reddit API, YouTube Data API, Bluesky API, Mastodon API, possibly Brandwatch/Sprout Social Analyse opinions, complaints, trends, hashtags and brand mentions. This is useful for understanding what people spontaneously say about a brand, product or competitor.
Content generation OpenAI API, Gemini API, Claude API, Mistral API Generate ad copy, product descriptions, social posts, landing pages, slogans, variants for A/B tests and personalised emails.
Image generation and visual content OpenAI Image API, Adobe Firefly API, Stability AI API, Canva API Create banners, social visuals, product mock-ups, campaign images or ad variants.
Vision / image analysis Google Vision, OpenAI Vision, Amazon Rekognition Recognise products in photos, detect logos, automatically tag images, analyse user-generated content, and recognise packaging or store shelves.
Embeddings and recommendations OpenAI Embeddings, Cohere Embed, Vertex AI embeddings Convert products, articles, customers or search queries into comparable vectors. This enables better search functions, recommendations, segmentation and “similar products”.
Sentiment analysis OpenAI, Google Natural Language, AWS Comprehend Automatically label reviews, emails, chats, surveys and social posts as positive, negative or neutral. This is useful for customer satisfaction and reputation management.
Conversational marketing Chatbots via OpenAI Assistants/Responses API, Intercom, Zendesk, Freshdesk Let a chatbot answer product questions, give advice, qualify leads, summarise complaints or direct customers to the right department.
Speech and video TTS/STT APIs, OpenAI audio, ElevenLabs, Google Speech-to-Text Create audio ads, build voice interfaces, transcribe customer interviews, and summarise podcasts or videos.
Surveys and feedback Typeform API, SurveyMonkey API, Google Forms via Sheets API Automatically process customer feedback, link scores to customer profiles and summarise open answers with AI.
Weather, calendar and event data Weather APIs, Ticketmaster API, Eventbrite API, public holiday APIs Contextual marketing: promote ice cream in warm weather, umbrellas when it rains, restaurant offers around events and campaigns around public holidays.
News and trend monitoring NewsAPI, GDELT, media data APIs, AI search APIs Monitor brands, competitors, sector trends and current events. This is useful for content marketing and fast-response campaigns.

1. GA4 + Search Console + OpenAI

This combination shows how website behaviour, search terms and AI can be used together to improve content ideas, SEO titles, social posts or landing pages.

2. CRM + Mailchimp + AI

This combination shows how customer data, segmentation and AI-generated emails come together in personalised communication.

3. Google Ads / Meta / TikTok Ads + AI

This combination shows how campaign performance is analysed and how AI can help suggest new ad variants.

4. Product data + embeddings

This combination shows how recommendation systems work, for example in features such as “similar products” or “customers also viewed”.

5. Reviews + sentiment analysis

This combination shows how customer reviews can be summarised automatically: what do customers like, what bothers them and which product features are mentioned often?

6. Location data + marketing

This combination shows how local campaigns can be aligned with the location of customers, stores, regions or events.

Marketing APIs: from data to campaigns

In this section, you can explain that marketing is not only about recognising products or generating texts, but mainly about combining:

customer data + behavioural data + campaign data + AI analysis + automated content creation.

A simple example flow

  1. The website collects visitor data via GA4.
  2. Search Console shows which search terms visitors use.
  3. The CRM stores which customers bought something or showed interest.
  4. An AI API creates customer segments and writes adapted texts.
  5. Mailchimp, Google Ads, Meta or TikTok send or display the campaign.
  6. The results come back in through analytics and advertising APIs.

This makes clear that APIs in marketing do not stand alone, but together can form an automated marketing cycle.

Next page