🌐 Services web de données

Le catalogue d'adresses du cours : cherchable, cliquable, toujours à jour dans vos signets

🎬 Voir le diaporama en classe

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

JSON : https://en.wikipedia.org/w/api.php?action=query&list=geosearch&gscoord=45.4215|-75.6972&gsradius=10000&gslimit=10&format=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://any-api.com/

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/

https://apipheny.io/free-api/

http://www.opendatanetwork.com/

https://apilist.fun/

https://www.programmableweb.com/apis/directory

https://www.kaggle.com/datasets

https://developers.google.com/apis-explorer

https://developers.google.com/gdata/docs/directory

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.gov.ie/

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/

http://docs.apis.is/

https://data.nasa.gov/

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

https://pokeapi.co/

https://randomuser.me/

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

https://www.dnd5eapi.co/api/rule-sections

https://randomuser.me/api/

Thématique Loisirs - Soirée

Doc des apis

https://v2.jokeapi.dev/

https://www.thecocktaildb.com/api.php

https://uselessfacts.jsph.pl/

https://deckofcardsapi.com/

Exemples de liens

https://v2.jokeapi.dev/joke/Programming?type=single

https://www.thecocktaildb.com/api/json/v1/1/filter.php?i=Gin

http://www.boredapi.com/api/activity/

https://uselessfacts.jsph.pl//random.json?language=en

Thématique Espace

Doc api

http://api.open-notify.org/

https://github.com/r-spacex/SpaceX-API

https://earthquake.usgs.gov/fdsnws/event/1/

https://www.asterank.com/api

https://www.asterank.com/kepler

https://data.nasa.gov/browse?limitTo=datasets

Liens

https://earthquake.usgs.gov/fdsnws/event/1/query?format=xml&starttime=2020-01-01&endtime=2020-01-02&minmagnitude=5 (xml)

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

https://www.cbc.ca/cmlink/rss-sports-nhl

Thématique Actualité

Doc api

https://developer.nytimes.com/apis (avec clé)

Liens

Thématique Geographie

Doc api

https://restcountries.com/

Liens

https://restcountries.com/v3.1/all?fields=name,capital,region,subregion,flag,languages,population,flags

https://restcountries.com/v3.1/name/canada

https://api.ipify.org/?format=json

Thématique Informatique

Doc api

https://v2.jokeapi.dev/

https://techy-api.vercel.app/

Liens

https://v2.jokeapi.dev/joke/Programming?type=single

https://v2.jokeapi.dev/joke/Programming?blacklistFlags=nsfw,racist,sexist,explicit&format=xml

https://backend-omega-seven.vercel.app/api/getjoke

https://techy-api.vercel.app/api/json

Thématique Culturel

Doc api

https://www.omdbapi.com/

https://docs.zenquotes.io/zenquotes-documentation/

https://swapi.dev/

https://excuser-three.vercel.app/

https://api.adviceslip.com/

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

https://api.adviceslip.com/advice

https://excuser-three.vercel.app/v1/excuse/college/

Thématique Nourriture

Doc api

https://www.themealdb.com/api.php

https://www.fruityvice.com/#2

https://www.thecocktaildb.com/api.php

https://punkapi.com/

Liens

https://www.themealdb.com/api/json/v1/1/random.php

https://www.fruityvice.com/api/fruit/all

www.thecocktaildb.com/api/json/v1/1/random.php

https://api.punkapi.com/v2/beers

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

http://numbersapi.com/#42

https://uselessfacts.jsph.pl/

https://dogapi.dog/

Liens

http://numbersapi.com/42

https://uselessfacts.jsph.pl/random.json?language=en

https://dog-api.kinduff.com/api/facts chiens

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 :

https://valentin-mn.github.io/apiwebsite/results.json

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/mpc

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

http://www.zippopotam.us/

api.zippopotam.us/us/ma/belmont

Infos techno

Reddit

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

https://list.ly/api/docs

https://list.ly/api/v4/lists/trending

Nourriture - mets

Mets

www.themealdb.com

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/

https://fr.openfoodfacts.org/cgi/search.pl?action=process&tagtype_0=categories&tag_contains_0=contains&tag_0=breakfast_cereals&tagtype_1=nutrition_grades&tag_contains_1=contains&tag_1=A&additives=without&ingredients_from_palm_oil=without&json=1

https://fr.openfoodfacts.org/cgi/search.pl?action=process&tagtype_0=categories&tag_contains_0=contains&tag_0=breakfast_cereals&tagtype_1=nutrition_grades&tag_contains_1=contains&tag_1=A&additives=without&ingredients_from_palm_oil=without&xml=1

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

https://soda.demo.socrata.com/resource/6yvf-kk3n.xml?source=pr&$where=region%20like%20%27%25British%20Virgin%20Islands%25%27

https://soda.demo.socrata.com/resource/6yvf-kk3n.xml?$where=region%20like%20%27%25Puerto%20Rico%27&source=pr

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/

https://robohash.org/set_set3/bgset_bg1/test2?size=500x500

https://robohash.org/set_set3/bgset_bg1/test?size=500x500

https://yesno.wtf/

https://yesno.wtf/api

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://artbank.ca/

https://data.novascotia.ca/api/views/3jyx-m8te/rows.xml?accessType=DOWNLOAD

Images générées d'animaux

https://placekitten.com/

https://placekitten.com/200/300

http://thecatapi.com/api/images/get?format=xml&results_per_page=20

https://random.dog/

https://random.dog/

https://randomfox.ca/floof/

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

http://www.colourlovers.com/api

http://www.colourlovers.com/api/palettes/new

Services random

Fun facts

http://numbersapi.com/

http://numbersapi.com/42

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

https://randomuser.me/

https://randomuser.me/documentation#format

Services de pensée

https://quotesondesign.com/api/

https://quotesondesign.com/wp-json/wp/v2/posts/?orderby=rand

https://favqs.com/api

https://favqs.com/api/qotd

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/

https://v2.jokeapi.dev/joke/Programming

https://v2.jokeapi.dev/joke/Programming?format=xml

https://api.chucknorris.io/

https://api.chucknorris.io/jokes/random

https://api.chucknorris.io/jokes/random?category=food

https://icanhazdadjoke.com/api

https://icanhazdadjoke.com/slack

https://jokes.one/api/joke/

https://api.jokes.one/jod?category=animal

Comics

https://xkcd.com/

https://xkcd.com/info.0.json

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

https://data.oddsmagnet.com/

https://data.oddsmagnet.com/history/2021/football/england-premier-league/leeds-united-v-brentford/win-market.json

Jeux

https://deckofcardsapi.com/

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

https://api.funtranslations.com/translate/klingon.json?text=Who%20do%20you%20work%20for%3F%20They%20are%20going%20to%20terminate%20you.

Animes

https://jikan.moe/

https://api.jikan.moe/v4/anime?q=sci-fi&sfw

Livres

https://developers.google.com/books/docs/v1/getting_started

https://www.googleapis.com/books/v1/volumes?q=quilting

Institutions

Universités

https://github.com/Hipo/university-domains-list

http://universities.hipolabs.com/search?country=canada

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.now.sh/

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

https://data.world/datasets/water

https://crcns.org/data-sets

Santé

Qualité des produits

https://open.fda.gov/apis/

https://api.fda.gov/drug/event.json?limit=1

https://api.fda.gov/drug/event.json?search=patient.drug.openfda.pharm_class_epc:"nonsteroidal+anti-inflammatory+drug"&count=patient.reaction.reactionmeddrapt.exact

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://dev.socrata.com/

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/

https://www.quandl.com/

Services santé

Services de santé

https://open.fda.gov/apis/

https://api.fda.gov/drug/event.json?search=patient.drug.openfda.pharm_class_epc:"nonsteroidal+anti-inflammatory+drug"&count=patient.reaction.reactionmeddrapt.exact

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

https://uwaterloo.ca/api/

Parier

https://api.the-odds-api.com/

https://api.the-odds-api.com/v4/sports/?apiKey=(lacle)

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/

https://weatherstack.com/

https://openweathermap.org/api

https://darksky.net/dev

Services web de données Services payants

Sports

Lutte

https://sportsdata.io/mma-ufc-api

Finances

Bourse

http://www.quotemedia.com/apifeeds/

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

https://api.meteomatics.com/DataConnectors.html

Services sécurité

https://waterservices.usgs.gov/ & https://waterdata.usgs.gov/nwis

https://earthquake.usgs.gov/fdsnws/event/1/

https://earthquake.usgs.gov/fdsnws/event/1/query?format=xml&starttime=2014-01-01&endtime=2014-01-02&minmagnitude=5

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/

https://weatherstack.com/

https://openweathermap.org/api

https://darksky.net/dev

Exemples de services

https://api.slack.com/web

https://openweathermap.org/api

https://www.cryptocompare.com/api/#introduction

https://pokeapi.co/

Générateur random sans service

Valeurs sémantiques random dont utilisateurs

https://mockaroo.com/

https://www.generatedata.com/

Totalement random anglais

https://onlinerandomtools.com/generate-random-xml