Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

A cordial invitation to participate in growing the list of Perl modules and clients created for the web services listed at FreePublicAPIs

by oodler (Sexton)
on Aug 31, 2024 at 18:04 UTC ( [id://11161472]=perlnews: print w/replies, xml ) Need Help??


As I say in the Le'Reddit announcement on r/perl, I want this to be the way people have fun or prove that their "way" is better, or at least SUWYM - Show Us What You Mean! :-) .. but I envision this being an easy target for leveraging new Perl features. What does an API look like using class? Is it faster or more idiomatic than ones built with Util::H2O? Pick your API spec and poison, and take some time get it on CPAN. It's not supposed to be a lot of work.

I have 3 so far, and plan to do more! The last one took less than an hour - fun and good practice!


You may "sign up" by claiming the API you want to create a Perl client for, here.

As I type, here are 246 left to claim! See what they have listed at FreePublicAPIs. Update - thanks to soonix's probing questions, there is also now an API call to list all the APIs! Also, FreePublicAPIs listed this as a projected. Have fun!

Update: As each module is uploaded to CPAN, anyone can add the module as a "project using the API" - thus, I will handle adding this to their pages to show your module and Perl! For example,this link lists:
Showcase

The following Projects were built with this API:
Perl CPAN Module - Acme::Free::API::Ye
  • Comment on A cordial invitation to participate in growing the list of Perl modules and clients created for the web services listed at FreePublicAPIs

Replies are listed 'Best First'.
Re: A cordial invitation to participate in growing the list of Perl modules and clients created for the web services listed at FreePublicAPIs
by soonix (Canon) on Sep 01, 2024 at 06:11 UTC
      Oddly it seems not. But digging into the developer console, I could find the following (note this isn't any hacking because the requests can't be repeated - I tried). This would be the API client of clients!

      Update! I emailed the guy who created the site, pointed him to this project, and asked if he could provide one. I for one would welcome the one API to list all APIs. Good thinking!

      Endpoint
      GET https://eskcjmrqkyzznvqwdjkv.supabase.co/rest/v1/freepublicapis_apis?select=*&health=eq.100&confirmed=eq.true&order=health.desc&limit=100
      
      Request
      GET /rest/v1/freepublicapis_apis?select=*&health=eq.100&confirmed=eq.true&order=health.desc&limit=100 HTTP/3
      Host: eskcjmrqkyzznvqwdjkv.supabase.co
      User-Agent: ...
      Accept: */*
      Accept-Language: en-GB,en;q=0.5
      Accept-Encoding: gzip, deflate, br, zstd
      Referer: https://www.freepublicapis.com/
      accept-profile: public
      apikey: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImVza2NqbXJxa3l6em52cXdkamt2Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3MDg1MjY2NDEsImV4cCI6MjAyNDEwMjY0MX0.tLtewDfdXMe68iFG1vp7MZ7kotWioowJHvU2YkXRy3Q
      authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImVza2NqbXJxa3l6em52cXdkamt2Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3MDg1MjY2NDEsImV4cCI6MjAyNDEwMjY0MX0.tLtewDfdXMe68iFG1vp7MZ7kotWioowJHvU2YkXRy3Q
      x-client-info: supabase-ssr/0.4.1
      Origin: https://www.freepublicapis.com
      DNT: 1
      Sec-GPC: 1
      Connection: keep-alive
      Sec-Fetch-Dest: empty
      Sec-Fetch-Mode: cors
      Sec-Fetch-Site: cross-site
      Priority: u=4
      Pragma: no-cache
      Cache-Control: no-cache
      TE: trailers
      
      Response
      HTTP/3 200 
      date: Sun, 01 Sep 2024 06:55:00 GMT
      content-type: application/json; charset=utf-8
      content-range: 0-10/*
      cf-ray: 8bc35a2b5c022e6c-DFW
      cf-cache-status: DYNAMIC
      access-control-allow-origin: *
      content-encoding: gzip
      content-location: /freepublicapis_apis?confirmed=eq.true&health=eq.100&limit=100&order=health.desc&select=%2A
      strict-transport-security: max-age=31536000; includeSubDomains
      vary: Accept-Encoding
      access-control-expose-headers: Content-Encoding, Content-Location, Content-Range, Content-Type, Date, Location, Server, Transfer-Encoding, Range-Unit
      content-profile: public
      sb-gateway-version: 1
      x-kong-proxy-latency: 0
      x-kong-upstream-latency: 3
      server: cloudflare
      
      [
        {
          "id": 133,
          "created_at": "2024-07-08T22:10:54.478921+00:00",
          "title": "Public Holiday API",
          "description": "An API for public holiday data. Supports over 100 countries. Provides information on holidays and long weekends.",
          "documentation": "https://date.nager.at/Api",
          "comment": null,
          "methods": 1,
          "health": 100,
          "slug": "public-holiday-api",
          "emoji": "📅",
          "popularity": 426,
          "avg_reliability": 100,
          "avg_error": 0,
          "avg_latency": 80,
          "confirmed": true,
          "fts": "'/api':23C '100':12B 'api':3A,5B 'countri':13B 'data':9B 'date.nager.at':22C 'date.nager.at/api':21C 'holiday':2A,8B,17B 'inform':15B 'long':19B 'provid':14B 'public':1A,7B 'support':10B 'weekend':20B"
        },
        {
          "id": 129,
          "created_at": "2024-07-08T21:59:21.831964+00:00",
          "title": "IP Geolocation API",
          "description": "Free IP Geolocation API - lookup any IP address. Provides geolocation data based on the input IPv4/IPv6 address or domain name, with optional parameters for customization like language and callback.",
          "documentation": "https://ip-api.com/docs/api:json",
          "comment": null,
          "methods": 1,
          "health": 100,
          "slug": "ip-geolocation-api",
          "emoji": "🌍",
          "popularity": 716,
          "avg_reliability": 100,
          "avg_error": 0,
          "avg_latency": 80,
          "confirmed": true,
          "fts": "'/docs/api:json':35C 'address':11B,20B 'api':3A,7B 'base':15B 'callback':32B 'custom':28B 'data':14B 'domain':22B 'free':4B 'geoloc':2A,6B,13B 'input':18B 'ip':1A,5B,10B 'ip-api.com':34C 'ip-api.com/docs/api:json':33C 'ipv4/ipv6':19B 'languag':30B 'like':29B 'lookup':8B 'name':23B 'option':25B 'paramet':26B 'provid':12B"
        },
        {
          "id": 75,
          "created_at": "2024-05-16T13:15:26.360877+00:00",
          "title": "Rick and Morty API",
          "description": "API providing information about characters, locations, and episodes from the Rick and Morty show. Supports GraphQL and REST endpoints for querying data.",
          "documentation": "https://rickandmortyapi.com/documentation/",
          "comment": null,
          "methods": 3,
          "health": 100,
          "slug": "rick-and-morty-api",
          "emoji": "👽",
          "popularity": 235,
          "avg_reliability": 100,
          "avg_error": 0,
          "avg_latency": 77,
          "confirmed": true,
          "fts": "'/documentation/':29C 'api':4A,5B 'charact':9B 'data':26B 'endpoint':23B 'episod':12B 'graphql':20B 'inform':7B 'locat':10B 'morti':3A,17B 'provid':6B 'queri':25B 'rest':22B 'rick':1A,15B 'rickandmortyapi.com':28C 'rickandmortyapi.com/documentation/':27C 'show':18B 'support':19B"
        },
        {
          "id": 36,
          "created_at": "2024-05-14T07:18:39.824659+00:00",
          "title": "Open Meteo",
          "description": "Open-Meteo is an open-source weather API and offers free access for non-commercial use. No API key required. Start using it now!",
          "documentation": "https://open-meteo.com/en/docs",
          "comment": null,
          "methods": 2,
          "health": 100,
          "slug": "open-meteo",
          "emoji": "🌦️",
          "popularity": 528,
          "avg_reliability": 100,
          "avg_error": 0,
          "avg_latency": 66,
          "confirmed": true,
          "fts": "'/en/docs':30C 'access':16B 'api':12B,23B 'commerci':20B 'free':15B 'key':24B 'meteo':2A,5B 'non':19B 'non-commerci':18B 'offer':14B 'open':1A,4B,9B 'open-meteo':3B 'open-meteo.com':29C 'open-meteo.com/en/docs':28C 'open-sourc':8B 'requir':25B 'sourc':10B 'start':26B 'use':21B,27B 'weather':11B"
        },
        {
          "id": 16,
          "created_at": "2024-05-06T18:19:41.479147+00:00",
          "title": "PokéAPI",
          "description": "An open RESTful API for Pokémon data",
          "documentation": "https://pokeapi.co/",
          "comment": null,
          "methods": 1,
          "health": 100,
          "slug": "pokapi",
          "emoji": "🔴",
          "popularity": 404,
          "avg_reliability": 100,
          "avg_error": 0,
          "avg_latency": 61,
          "confirmed": true,
          "fts": "'api':5B 'data':8B 'open':3B 'pokeapi.co':9C 'pokéapi':1A 'pokémon':7B 'rest':4B"
        },
        {
          "id": 191,
          "created_at": "2024-08-20T19:02:40.624679+00:00",
          "title": "IP Geolocation & Currency Converter",
          "description": "The JSON IP Geolocation API allows you to determine the geographical location of visitors based on their IP addresses. It provides detailed location data such as country, region, city, and coordinates in a structured JSON format.",
          "documentation": "https://www.geoplugin.com/webservices/json",
          "comment": null,
          "methods": 2,
          "health": 100,
          "slug": "json-ip-geolocation",
          "emoji": "🌍",
          "popularity": 491,
          "avg_reliability": 100,
          "avg_error": 0,
          "avg_latency": 36,
          "confirmed": true,
          "fts": "'/webservices/json':43C 'address':23B 'allow':10B 'api':9B 'base':19B 'citi':33B 'convert':4A 'coordin':35B 'countri':31B 'currenc':3A 'data':28B 'detail':26B 'determin':13B 'format':40B 'geograph':15B 'geoloc':2A,8B 'ip':1A,7B,22B 'json':6B,39B 'locat':16B,27B 'provid':25B 'region':32B 'structur':38B 'visitor':18B 'www.geoplugin.com':42C 'www.geoplugin.com/webservices/json':41C"
        },
        {
          "id": 46,
          "created_at": "2024-05-14T14:29:32.780134+00:00",
          "title": "Useless Facts API",
          "description": "HTTP API for useless facts. Provides random useless facts and today's useless fact with language and content-type customization options. APIv1 is deprecated.",
          "documentation": "https://uselessfacts.jsph.pl/",
          "comment": null,
          "methods": 3,
          "health": 100,
          "slug": "useless-facts-api",
          "emoji": "🤪",
          "popularity": 357,
          "avg_reliability": 100,
          "avg_error": 0,
          "avg_latency": 81,
          "confirmed": true,
          "fts": "'api':3A,5B 'apiv1':26B 'content':22B 'content-typ':21B 'custom':24B 'deprec':28B 'fact':2A,8B,12B,17B 'http':4B 'languag':19B 'option':25B 'provid':9B 'random':10B 'today':14B 'type':23B 'useless':1A,7B,11B,16B 'uselessfacts.jsph.pl':29C"
        },
        {
          "id": 121,
          "created_at": "2024-05-31T06:57:35.37794+00:00",
          "title": "Air Quality API",
          "description": "Pollutants and pollen forecast in 11 km resolution",
          "documentation": "https://open-meteo.com/en/docs/air-quality-api",
          "comment": "There is one thing I'd like to point out, the air quality API (https://www.freepublicapis.com/air-quality-api) has 11km resolution in Europe. For global forecast, the precision decreases to 40km. I learned about it when looking for sources on atmospheric pollution in the vicinity of Săo Paulo.",
          "methods": 1,
          "health": 100,
          "slug": "air-quality-api",
          "emoji": "🌱",
          "popularity": 993,
          "avg_reliability": 100,
          "avg_error": 0,
          "avg_latency": 73,
          "confirmed": true,
          "fts": "'/en/docs/air-quality-api':14C '11':9B 'air':1A 'api':3A 'forecast':7B 'km':10B 'open-meteo.com':13C 'open-meteo.com/en/docs/air-quality-api':12C 'pollen':6B 'pollut':4B 'qualiti':2A 'resolut':11B"
        },
        {
          "id": 120,
          "created_at": "2024-05-31T06:43:42.335072+00:00",
          "title": "Global Flood API",
          "description": "Simulated river discharge at 5 km resolution from 1984 up to 7 months forecast.",
          "documentation": "https://open-meteo.com/en/docs/flood-api",
          "comment": null,
          "methods": 1,
          "health": 100,
          "slug": "global-flood-api",
          "emoji": "🌊",
          "popularity": 311,
          "avg_reliability": 100,
          "avg_error": 0,
          "avg_latency": 89,
          "confirmed": true,
          "fts": "'/en/docs/flood-api':20C '1984':12B '5':8B '7':15B 'api':3A 'discharg':6B 'flood':2A 'forecast':17B 'global':1A 'km':9B 'month':16B 'open-meteo.com':19C 'open-meteo.com/en/docs/flood-api':18C 'resolut':10B 'river':5B 'simul':4B"
        },
        {
          "id": 144,
          "created_at": "2024-07-11T20:57:40.365802+00:00",
          "title": "nekos.best API",
          "description": "nekos.best is a RESTful API serving fully SFW and high quality anime images and GIFs.",
          "documentation": "https://docs.nekos.best/",
          "comment": null,
          "methods": 3,
          "health": 100,
          "slug": "nekosbest-api",
          "emoji": "🐾",
          "popularity": 195,
          "avg_reliability": 100,
          "avg_error": 0,
          "avg_latency": 93,
          "confirmed": true,
          "fts": "'anim':14B 'api':2A,7B 'docs.nekos.best':18C 'fulli':9B 'gif':17B 'high':12B 'imag':15B 'nekos.best':1A,3B 'qualiti':13B 'rest':6B 'serv':8B 'sfw':10B"
        },
        {
          "id": 68,
          "created_at": "2024-05-16T11:41:46.807871+00:00",
          "title": "Data USA",
          "description": "Browse 47,000+ automated reports, view aggregated data, merge and download data, compare reports",
          "documentation": "https://datausa.io/",
          "comment": null,
          "methods": 1,
          "health": 100,
          "slug": "data-usa",
          "emoji": "📊",
          "popularity": 1036,
          "avg_reliability": 100,
          "avg_error": 0,
          "avg_latency": 95,
          "confirmed": true,
          "fts": "'000':5B '47':4B 'aggreg':9B 'autom':6B 'brows':3B 'compar':15B 'data':1A,10B,14B 'datausa.io':17C 'download':13B 'merg':11B 'report':7B,16B 'usa':2A 'view':8B"
        }
      ]
      
      Is there an API to query FreePublicAPIs?

      Heh ... on the road to Russell's Paradox: "Is there a FreePublicAPI that queries all (and only all) of the FreePublicAPIs that don't query themselves ?"
      ;-)

      cheers,
      Rob
Re: A cordial invitation to participate in growing the list of Perl modules and clients created for the web services listed at FreePublicAPIs
by cavac (Parson) on Sep 01, 2024 at 10:25 UTC

    Just uploaded Acme-Free-API-Geodata-GeoIP to pause.

    I'm using mercurial as SCM here, like all my other projects. Acme-Free-API-Geodata-GeoIP on cavac.at

    I don't use Dist::Zilla (and have never used it), so i didn't include a dist.ini. It's sunday and i have neither the time nor the energy to look into that just for an example project. What does Dist::Zilla even do? The website does mumble about "it helps to build and upload dists to CPAN", something i can accomplish in a few seconds with "make dist" and a manual upload (which, btw, always reminds me to clean up my old version. I find that very helpful).

    PerlMonks XP is useless? Not anymore: XPD - Do more with your PerlMonks XP
    Also check out my sisters artwork and my weekly webcomics
      I don't use Dist::Zilla (and have never used it)

      That's perfectly fine. I don't use it either as it is vast overkill for my simple needs. I have had to work with it when contributing to the dists of others where it was already installed and that really did not encourage me to use it any further.

      It is used to automate away a lot of boilerplate when authoring dists and is probably really useful for those maintaining hundreds of dists.


      🦛

        Yes, totally fine - I need to update the language to imply wiggle room! It's been very interesting to see how people do their stuff.
        Or for those maintaining a few dists whose dyslexia guarantees that they'll mess up the boilerplate if they have to do it by hand.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlnews [id://11161472]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2024-09-09 12:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.