GithubHelp home page GithubHelp logo

greenie10 / usdaplantsapi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sckott/usdaplantsapi

0.0 2.0 0.0 8.9 MB

REST API for the USDA Plants Database

Home Page: https://plantsdb.xyz/heartbeat

License: MIT License

Dockerfile 3.42% Ruby 93.88% Makefile 2.69%

usdaplantsapi's Introduction

usda plants database API

NOTE: This is not a USDA supported project

NOTE: The data behind the API is a bit stale, approx. from July 2016

USDA PLANTS Database: https://plants.sc.egov.usda.gov/java/

Cite the PLANTS database as:

USDA, NRCS. 2019. The PLANTS Database (http://plants.usda.gov, <todays date>). National Plant Data Team, Greensboro, NC 27401-4901 USA.


base url

https://plantsdb.xyz/

routes

  • / (redirects to /heartbeat)
  • /heartbeat
  • /search

params

on /search route only

  • fields, e.g., fields='Genus,Species' (default: all fields returned)
  • limit, e.g., limit=10 (default: 10)
  • offset, e.g., offset=1 (default: 0)
  • search on any fields in the output, e.g, Genus=Pinus or Species=annua

examples

heartbeat

curl 'https://plantsdb.xyz/heartbeat' | jq .
#> {
#>   "routes": [
#>     "/search (HEAD, GET)",
#>     "/heartbeat"
#>   ]
#> }

search, no param

curl 'https://plantsdb.xyz/search' | jq .
#> {
#>   "count": 48022,
#>   "returned": 10,
#>   "data": [
#>     {
#>       "id": 1,
#>       "betydb_species_id": 3,
#>       "Genus": "Abies",
#>       "Species": "NA",
#>       "ScientificName": "Abies",
#> ... cutoff

search, limit

curl 'https://plantsdb.xyz/search?limit=3' | jq .
#>  "count": 48022,
#>  "returned": 3,
#>  "data": [
#>    {
#>      "id": 1,
#>      "betydb_species_id": 3
#> ... cutoff

search, offset

curl 'https://plantsdb.xyz/search?limit=3&offset=4' | jq .

fields, get back certain fields

curl 'https://plantsdb.xyz/search?limit=2&fields=Genus,Species,AcceptedSymbol' | jq .
#> {
#>   "count": 48022,
#>   "returned": 2,
#>   "data": [
#>     {
#>       "Genus": "Abies",
#>       "Species": "NA",
#>       "AcceptedSymbol": "ABIES"
#>     },
#>     {
#>       "Genus": "Abies",
#>       "Species": "alba",
#>       "AcceptedSymbol": "ABAL3"
#>     }
#>   ],
#>   "error": null
#> }

usdaplantsapi's People

Contributors

sckott avatar

Watchers

James Cloos avatar Laura Green avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.