Arivertisements API

An open source alternative to Johnvertisements from john.citrons.xyz! Now with an API!

Want to add Arivertisements into your own application? We've got you covered :) Use this API to programatically embed them in your application:

  • GET /api/random - Get random Arivertisement (2/s, 24/min, 160/hr)

    Returns a JSON object with this scheme:

    {
      "alt": "alt text...",
      "author": "Author Name",
      "bg": "#...", (optional)
      "bias": 0.32413131933855255,
      "contact": "29G35jRSvqFIK...",
      "fg": "#...", (optional)
      "filename": "cool-ad.jpg",
      "license": "...",
      "timestamp": 1756739056.0, (example)
      "to": "https://example.com/" (optional)
    }
    

    This allows you to call to these endpoints:

    • /ads/contact?for=29G35jRSvqFIK... - allows users to contact authors (must be open client side, non-static URL, can change any time)
    • /ads/img/cool-ad.jpg - get Arivertisement image

    The bias parameter tells you how often is the AD displayed: higher value = newer AD = displayed more often.

  • GET /api/all - Get the index of all Arivertisements (1/s, 1/min, 10/hr) - please cache

    Returns a JSON list of all Arivertisement objects with stricter rate limits. Please cache.

    [
       {
         "alt": "alt text...",
         "author": "Author Name",
         ...
       },
       {
         "alt": "alt text...",
         "author": "Author Name",
         ...
       },
       ...
    ]
    
  • Get /api/leaderboard - Get the leaderboard of Arivertisers (1/s, 1/min, 10/hr) - please cache

    Get URL/domain-to-rendered-ads leaderboard mapping:

    {
        "example.com": 1234,
        "https://ari.lt/": 1111111,
        ...
    }