Liens vus en cours
Les services essayés en classe (2024)
XML : https://v2.jokeapi.dev/joke/Programming?blacklistFlags=nsfw,racist,sexist,explicit&format=xml
RSS : https://bieresetfromages.wordpress.com/feed/
JSON : https://api.coindesk.com/v1/bpi/currentprice.json
Le code tapé en classe
JSON avec gson : import com.google.gson.JsonObject; et import com.google.gson.JsonParser;
XML avec DocumentBuilder : DocumentBuilderFactory.newInstance().newDocumentBuilder(), puis parseur.parse(new ByteArrayInputStream(xml.getBytes())) et document.getElementsByTagName("joke") - les deux diapositives du cours
Sites qui listent des services
https://rapidapi.com/collection/list-of-free-apis
https://github.com/toddmotto/public-apis
https://github.com/public-apis/public-apis
https://mixedanalytics.com/blog/list-actually-free-open-no-auth-needed-apis/
http://www.opendatanetwork.com/
https://www.programmableweb.com/apis/directory
https://www.kaggle.com/datasets
Listes de services gouv
CANADA
https://open.canada.ca/en/open-data
https://open.canada.ca/data/en/dataset?portal_type=dataset&q=&_res_type_limit=0&res_type=api
EUROPE
https://data.europa.eu/euodp/data/ https://ec.europa.eu/digital-single-market/en/open-data
PAYS d'EUROPE
https://www.data.gouv.fr/fr/ http://www.opendatafrance.net/
https://open.nasa.gov/open-data/
https://nasa.github.io/data-nasa-gov-frontpage/data_visualizations.htm
https://api.nasa.gov/neo/rest/v1/feed/today?detailed=true&api_key=DEMO_KEY l
Thématique voitures
Doc des apis
http://ergast.com/mrd/https://vpic.nhtsa.dot.gov/api
https://www.autosport.com/rss/
Liens
https://vpic.nhtsa.dot.gov/api/vehicles/GetModelsForMakeId/603?format=json
http://ergast.com/api/f1/2019/results/1
Nouvelles https://www.autosport.com/rss/feed/f1 (xml)
Thématique jeux
Doc des apis
Exemples de liens
Liste pokémon https://pokeapi.co/api/v2/pokemon/ (json)
1 pokémon https://pokeapi.co/api/v2/pokemon/35 (json)
Nouvelles https://www.jeuxactu.com/rss/ja.rss (xml)
https://www.jeuxactu.com/rss/pc.rss
https://api.atlasacademy.io/export/JP/basic_war_lang_en.json
https://api.atlasacademy.io/export/JP/basic_servant_lang_en.json
https://www.freetogame.com/api/games?platform=pc
Thématique Loisirs - Soirée
Doc des apis
https://www.thecocktaildb.com/api.php
Exemples de liens
https://v2.jokeapi.dev/joke/Programming?type=single
https://www.thecocktaildb.com/api/json/v1/1/filter.php?i=Gin
Thématique Espace
Doc api
https://github.com/r-spacex/SpaceX-API
https://earthquake.usgs.gov/fdsnws/event/1/
https://www.asterank.com/kepler
https://data.nasa.gov/browse?limitTo=datasets
Liens
https://data.nasa.gov/resource/gh4g-9sfh.xml?$where=starts_with(name,%27De%20%27) (xml)
https://data.nasa.gov/resource/gh4g-9sfh.xml?$where=mass%20%3E%2010000000
astronautes ssi http://api.open-notify.org/astros.json (json)
exoplanetes http://www.asterank.com/api/mpc?limit=20
nouvelles https://www.space.com/feeds/all
Thématique Crypto
Doc api
https://cryptocointracker.com/api/coindesk
https://www.coingecko.com/en/api
https://messari.io/asset/apis/metrics/all
https://min-api.cryptocompare.com/
Liens
https://min-api.cryptocompare.com/data/pricemulti?fsyms=BTC,ETH,BAT&tsyms=CAD
https://fr.investing.com/rss/market_overview.rss (xml)
https://api.coindesk.com/v1/bpi/currentprice.json
https://data.messari.io/api/v1/assets/btc/metrics
https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=cad
Thématique sports
Doc des apis
Liens
Thématique Actualité
Doc api
https://developer.nytimes.com/apis (avec clé)
Liens
Thématique Geographie
Doc api
Liens
Thématique Informatique
Doc api
Liens
https://v2.jokeapi.dev/joke/Programming?type=single
https://v2.jokeapi.dev/joke/Programming?blacklistFlags=nsfw,racist,sexist,explicit&format=xml
Thématique Culturel
Doc api
https://docs.zenquotes.io/zenquotes-documentation/
https://excuser-three.vercel.app/
Liens
https://www.omdbapi.com/?t=Avatar&apiKey=c21f3670
https://zenquotes.io/?api=random
https://swapi.dev/api/people/1/?format=json star war
https://finalspaceapi.com/api/v0/character
Thématique Nourriture
Doc api
https://www.themealdb.com/api.php
https://www.thecocktaildb.com/api.php
Liens
https://www.themealdb.com/api/json/v1/1/random.php
https://www.fruityvice.com/api/fruit/all
Thématique Meteo
Doc api
https://earthquake.usgs.gov/fdsnws/event/1/
https://open-meteo.com/en/docs
Liens
https://earthquake.usgs.gov/fdsnws/event/1/query?format=xml&starttime=2021-09-10&endtime=2021-09-11
Thématique Scientifique
Doc api
Liens
Publier son propre xml ou json
Utiliser un VPS configuré en serveur web
(voir cours de Serveur et Projet web)
Utiliser Github
publier le github en site web dans github.io
ouvrir le fichier xml ou json et noter l'url
Exemple d'un ancien étudiant :
Services web de données Services gratuits sans clé
Géographique
Terre
https://sunrise-sunset.org/api
https://api.sunrise-sunset.org/json?lat=48.84&lng=68&formatted=0
Lune https://www.farmsense.net/api/astro-widgets/
https://api.farmsense.net/v1/moonphases/?d=1350526582
Espace
ISS http://open-notify.org/Open-Notify-API/
Astronautes : http://api.open-notify.org/astros.json
Position actuelle : http://api.open-notify.org/iss-now.json
http://www.asterank.com/api/mpc?limit=20
https://api.arcsecond.io/ & https://www.arcsecond.io/apis
Activités observation : https://api.arcsecond.io/activities/?format=json
Explanètes : https://api.arcsecond.io/exoplanets/?format=json
https://github.com/r-spacex/SpaceX-API https://github.com/r-spacex/SpaceX-API/blob/master/docs/README.md
https://api.spacexdata.com/v5/launches/latest
https://api.spacexdata.com/v4/ships/query (Utiliser Restman pour POST)
Géographique
Pays
https://datahelpdesk.worldbank.org/knowledgebase/topics/125589
https://api.worldbank.org/v2/country/ca
api.zippopotam.us/us/ma/belmont
Infos techno
https://www.reddit.com/dev/api/
https://www.reddit.com/r/Wallstreetbets/top.json?limit=10&t=year
Nouvelles & Jobs
https://github.com/HackerNews/API
https://hacker-news.firebaseio.com/v0/topstories.json?print=pretty
https://hacker-news.firebaseio.com/v0/item/8863.json?print=pretty
Encyclopedie
Wikimedia
https://www.mediawiki.org/wiki/API:Main_page
https://en.wikipedia.org/w/api.php?action=parse&page=Bee&format=xml (recherche sur les abeilles)
Activités
Idées d'activités
Une api qui donne des idées d'activités : http://www.boredapi.com/
http://www.boredapi.com/api/activity?type=recreational
Fêtes dans un pays
https://date.nager.at/ & https://date.nager.at/Api
https://date.nager.at/api/v3/PublicHolidays/2017/CA
Listes intéressantes
Nourriture - mets
Mets
www.themealdb.com/api/json/v1/1/search.php?s=Arrabiata
www.themealdb.com/api/json/v1/1/random.php
https://www.themealdb.com/api/json/v1/1/filter.php?i=garlic
www.thecocktaildb.com/api/json/v1/1/lookup.php?iid=552
Food fact
https://world.openfoodfacts.org/data https://openfoodfacts.github.io/api-documentation/
Nourriture - drink
Bière
https://www.openbrewerydb.org/ (villes américaines)
https://api.openbrewerydb.org/breweries?by_city=san_diego
https://punkapi.com/documentation/v2
https://api.punkapi.com/v2/beers?brewed_before=11-2012&abv_gt=6
Drink
https://www.thecocktaildb.com/
www.thecocktaildb.com/api/json/v1/1/search.php?f=a
www.thecocktaildb.com/api/json/v1/1/random.php
www.thecocktaildb.com/api/json/v1/1/filter.php?i=Gin
www.thecocktaildb.com/api/json/v1/1/lookup.php?i=11007
https://www.thecocktaildb.com/api/json/v1/1/lookup.php?iid=552
Services météo
https://open-meteo.com/en/docs
Forecast pour Matane : https://api.open-meteo.com/v1/forecast?latitude=48.8445&longitude=67.5306&hourly=temperature_2m,relativehumidity_2m,windspeed_10m
FarmSense
https://www.farmsense.net/api/frost-date-api/
https://api.farmsense.net/v1/frostdates/stations/?lat=40.360278&lon=-74.957222
Tremblement de terre
Tremblements par ville: https://dev.socrata.com/docs/filtering.html https://soda.demo.socrata.com/resource/6yvf-kk3n.xml?source=pr&$where=region%20like%20%27{XYZ}%25%25%27
Tremblements mondial récent:
https://earthquake.usgs.gov/fdsnws/event/1/query?format=xml&starttime=2017-01-25&endtime=2017-01-30
Météores
Données non-filtrées
Grille webhttps://data.nasa.gov/Space-Science/Meteorite-Landings/gh4g-9sfh
Exemple : https://data.nasa.gov/resource/y77d-th95.xml
Filtrage des données
Grille web filtrée : https://data.nasa.gov/Space-Science/Meteorite-Landings/gh4g-9sfh/data
https://dev.socrata.com/docs/filtering.html
Exemple : https://soda.demo.socrata.com/resource/6yvf-kk3n.xml?region=Virgin%20Islands%20region
https://dev.socrata.com/docs/queries/where.html
Exemple : https://soda.demo.socrata.com/resource/4tka-6guv.json?$where=magnitude%20%3E%203.0 https://data.nasa.gov/resource/gh4g-9sfh.xml?$where=mass%20%3E%2010000000
https://dev.socrata.com/docs/functions/starts_with.html
Exemple : https://data.nasa.gov/resource/gh4g-9sfh.xml?$where=starts_with(name,%27De%20%27)
Services d'image
https://robohash.org/set_set3/bgset_bg1/test2?size=500x500
https://robohash.org/set_set3/bgset_bg1/test?size=500x500
https://avatars.dicebear.com/ & https://avatars.dicebear.com/docs
https://avatars.dicebear.com/api/male/john.svg?background=%230000ff
SVG Monsters
https://app.pixelencounter.com/api/basic/monsters/random
Meme generator
http://apimeme.com/meme?meme=Actual-Advice-Mallard&top=Top+text&bottom=Bottom+text
Services d'image
NFT
https://docs.opensea.io/reference/getting-assets
https://api.opensea.io/api/v1/assets
Art
https://data.novascotia.ca/api/views/3jyx-m8te/rows.xml?accessType=DOWNLOAD
Images générées d'animaux
https://placekitten.com/200/300
http://thecatapi.com/api/images/get?format=xml&results_per_page=20
Services multimédia
Services d'émoji
https://github.com/cheatsnake/emojihub
https://emojihub.herokuapp.com/api/all
https://emojihub.herokuapp.com/api/all/category_food_and_drink
Palette de couleurs
Services random
Fun facts
Valeurs random
https://www.mediawiki.org/wiki/API:Main_page
https://en.wikipedia.org/w/api.php?action=parse&page=Bee&format=xml
Utilisateurs random
Services de pensée
https://quotesondesign.com/api/
https://quotesondesign.com/wp-json/wp/v2/posts/?orderby=rand
http://www.penseedujour.net/rss/
https://penseedujour.net/rss/fluxpen5ee.xml
http://forismatic.com/en/api/ (lang en ne marche plus ?)
https://api.forismatic.com/api/jsonp/?method=getQuote&key=457653&format=xml&lang=en
Services de jokes
Jokes
https://v2.jokeapi.dev/joke/Programming
https://v2.jokeapi.dev/joke/Programming?format=xml
https://api.chucknorris.io/jokes/random
https://api.chucknorris.io/jokes/random?category=food
https://icanhazdadjoke.com/api
https://icanhazdadjoke.com/slack
https://api.jokes.one/jod?category=animal
Comics
Services de sport
Course
http://ergast.com/mrd/ (formule 1)
http://ergast.com/api/f1/drivers/alonso/circuits/monza/races
Basketball
https://any-api.com/nba_com/nba_com/docs/API_Description
Chances
Jeux
https://deckofcardsapi.com/api/deck/new/shuffle/?deck_count=1
retourne l'id à utiliser dans les requetes suivantes
https://deckofcardsapi.com/api/deck/<<deck_id>>/draw/?count=5
Services de fiction
Univers
https://swapi.co/ (star wars)
https://anapioficeandfire.com/ (game of thrones)
https://anapioficeandfire.com/api/characters/
https://anapioficeandfire.com/api/houses/
https://anapioficeandfire.com/api/books/
https://the-one-api.dev/documentation (lord of the ring)
https://the-one-api.dev/v2/book (les autres points nécessitent une clé)
https://pokeapi.co/ (pokémon)
https://pokeapi.co/api/v2/ability/battle-armor
https://pokeapi.co/api/v2/type/3
Listes
http://www.tvmaze.com/api (tv)
https://api.tvmaze.com/search/shows?q=girls
https://api.tvmaze.com/singlesearch/shows?q=girls&embed=episodes
https://api.tvmaze.com/schedule/web?date=2020-05-29&country=US
Traductions fantasy
Traductions Yoda, klingon, etc.
https://funtranslations.com/api/yoda
https://api.funtranslations.com/translate/yoda.json?text=Master%20Obiwan%20has%20lost%20a%20planet.
https://funtranslations.com/api/klingon
Animes
https://api.jikan.moe/v4/anime?q=sci-fi&sfw
Livres
Institutions
Universités
Pièces & ressources
https://vpic.nhtsa.dot.gov/api/
https://vpic.nhtsa.dot.gov/api/vehicles/getallmakes?format=XML
Services de science
Math et physique
https://newton.vercel.app/api/v2/cos/pi
Publications scientifiques
https://github.com/inspirehep/rest-api-doc
https://inspirehep.net/api/literature?sort=mostrecent&size=25&page=1&q=title
https://arxiv.org/abs/1409.0798
DataSet (sans api)
https://www.europeandataportal.eu/data/en/dataset?tags=zooplankton
Santé
Qualité des produits
https://api.fda.gov/drug/event.json?limit=1
https://health-products.canada.ca/
https://health-products.canada.ca/api/clinical-trial/sponsor/?lang=en&type=json
https://fdc.nal.usda.gov/api-guide.htmlhttps://app.swaggerhub.com/apis/fdcnal/food-data_central_api/1.0.1#/FDC/getFoodsList
https://ndb.nal.usda.gov/ndb/doc/index
https://data.ct.gov/resource/y6p2-px98.json?category=Fruit&item=Peaches
Économie
https://developers.teleport.org/
https://api.teleport.org/api/countries/
https://api.teleport.org/api/urban_areas/slug:montreal/scores/
https://api.teleport.org/api/urban_areas/slug:quebec/scores/
Services santé
Services de santé
https://ndb.nal.usda.gov/ndb/doc/index
https://npiregistry.cms.hhs.gov/registry/help-api
https://data.medicare.gov/developers
Maladies
Service web de données Service gratuit avec clé
Sport
Parier
Fiction
Univers
Listes
http://www.omdbapi.com/ (films)
https://developers.google.com/books/docs/v1/using?csw=1 (livres)
Services météo
avec clés
https://developer.yahoo.com/weather/
Services web de données Services payants
Sports
Lutte
Finances
Bourse
Autres ...
Services
https://www.programmableweb.com/news/26-weather-apis-12-support-json/2012/01/11
https://www.computersciencezone.org/50-most-useful-apis-for-developers/
Exemple pour relais
Services sécurité
https://waterservices.usgs.gov/ & https://waterdata.usgs.gov/nwis
Services météo
sans clés
https://open-meteo.com/en/docs
http://api.oceandrivers.com/static/docs.html
avec clés
https://developer.yahoo.com/weather/
Exemples de services
https://openweathermap.org/api
Générateur random sans service
Valeurs sémantiques random dont utilisateurs
Totalement random anglais