{"openapi":"3.1.0","info":{"title":"api-labellink","version":"0.1.0","description":"US pesticide product registrations and labels from the EPA Pesticide Product and Label System: status, restricted-use flag, ingredients, label sites and pests.","contact":{"email":"support@elysianintelligence.com","url":"https://elysianintelligence.com"}},"servers":[{"url":"https://api.elysianintelligence.com/labellink"}],"components":{"securitySchemes":{"ApiKey":{"type":"http","scheme":"bearer","description":"Send 'x-api-key: <key>' instead if you prefer."}},"schemas":{},"parameters":{}},"paths":{"/status":{"get":{"summary":"Dataset freshness","responses":{"200":{"description":"When each dataset last updated","content":{"application/json":{"schema":{"type":"object","properties":{"api":{"type":"string"},"version":{"type":"string"},"datasets":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"last_success_at":{"type":["string","null"]},"row_count":{"type":["number","null"]},"last_error":{"type":["string","null"]}},"required":["name","last_success_at","row_count","last_error"]}},"notes":{"type":"array","items":{"type":"string"}}},"required":["api","version","datasets"]}}}}}}},"/v1/keys":{"post":{"summary":"Get a free API key","description":"The key is shown once. Store it; only a hash is kept. Sign up on https://elysianintelligence.com/signup/, which solves the bot check (Cloudflare Turnstile) for you.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":254},"turnstile_token":{"type":"string","maxLength":2048},"accept_terms":{"type":"string","maxLength":16,"description":"The version of the API Terms of Service (https://elysianintelligence.com/terms/) you accept. Must be \"1.0\"."},"certify_tradecheck":{"type":"string","maxLength":32,"description":"Send \"tradecheck-fcra-v1\" to certify that you will use TradeCheck data only for permitted purposes and never as a factor in eligibility for credit, insurance, employment, housing or any purpose under 15 U.S.C. § 1681b (FCRA). TradeCheck serves no data without it."}},"required":["email"]}}}},"responses":{"201":{"description":"Key created","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string"},"prefix":{"type":"string"},"plan":{"type":"string","enum":["free","starter","pro","payg","lapsed"]}},"required":["key","prefix","plan"]}}}}}}},"/v1/keys/rotate":{"post":{"security":[{"ApiKey":[]}],"summary":"Rotate your API key","description":"Makes a new key for the same account and revokes the key you send, in one step. The plan, prepaid calls, subscription, usage, terms acceptance and TradeCheck certification move to the new key. The new key is shown once. Apps connected over OAuth must sign in again with the new key. We email the account about every rotation.","responses":{"201":{"description":"Key rotated","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string"},"prefix":{"type":"string"},"plan":{"type":"string","enum":["free","starter","pro","payg","lapsed"]}},"required":["key","prefix","plan"]}}}}}}},"/v1/keys/revoke":{"post":{"security":[{"ApiKey":[]}],"summary":"Revoke your API key","description":"Stops the key you send at once, for good. A key with a live subscription or prepaid calls left cannot be revoked: rotate it instead, so they move to a new key. We email the account about every revoke. After the last key of an account is revoked, a new key needs a new sign-up or a request to support.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"string","maxLength":32,"description":"Send \"revoke\" to confirm. This cannot be undone."}},"required":["confirm"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"revoked":{"type":"boolean","enum":[true]},"active_keys_left":{"type":"integer"},"message":{"type":"string"}},"required":["revoked","active_keys_left","message"]}}}}}}},"/v1/keys/close-account":{"post":{"security":[{"ApiKey":[]}],"summary":"Close your account","description":"Revokes every key of the account (the email of the key you send) and closes the account. Cancel any subscription first. Prepaid calls that are left end with the account. We email the account, delete its email address and key records 30 days after closure, and keep billing records for seven years without the email address, as the privacy policy (https://elysianintelligence.com/privacy/) says.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"string","maxLength":32,"description":"Send \"close-account\" to confirm. This cannot be undone."}},"required":["confirm"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"closed":{"type":"boolean","enum":[true]},"keys_closed":{"type":"integer"},"message":{"type":"string"}},"required":["closed","keys_closed","message"]}}}}}}},"/v1/keys/accept-terms":{"post":{"security":[{"ApiKey":[]}],"summary":"Accept the API Terms of Service","description":"For a key made before the terms, or before their current version. Billing sells nothing to a key until it accepts the current version.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"accept_terms":{"type":"string","maxLength":16,"description":"The version of the API Terms of Service (https://elysianintelligence.com/terms/) you accept. Must be \"1.0\"."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"terms_version":{"type":"string"}},"required":["terms_version"]}}}}}}},"/v1/keys/certify-tradecheck":{"post":{"security":[{"ApiKey":[]}],"summary":"Certify the TradeCheck FCRA terms","description":"TradeCheck serves no data to a key until it certifies section 6.1(c) of the terms.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"certify":{"type":"string","maxLength":32,"description":"Send \"tradecheck-fcra-v1\" to certify that you will use TradeCheck data only for permitted purposes and never as a factor in eligibility for credit, insurance, employment, housing or any purpose under 15 U.S.C. § 1681b (FCRA). TradeCheck serves no data without it."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"tradecheck_certified":{"type":"boolean","enum":[true]}},"required":["tradecheck_certified"]}}}}}}},"/v1/product/{epa_reg_no}":{"get":{"summary":"Gets one US pesticide product by EPA registration number (for example 524-475 or 000524-00475): status, restricted-use flag, ingredients, sites, pests and label links.","tags":["get_pesticide_product"],"security":[{"ApiKey":[]}],"parameters":[{"schema":{"type":"string","description":"EPA registration number, with or without zero padding."},"required":true,"description":"EPA registration number, with or without zero padding.","name":"epa_reg_no","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"epa_reg_no":{"type":"string"},"product_name":{"type":"string"},"company_name":{"type":["string","null"]},"status":{"type":"string","enum":["registered","cancelled","inactive"]},"rup":{"type":"boolean"},"signal_word":{"type":["string","null"]},"ingredients":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"pc_code":{"type":"string"},"cas":{"type":["string","null"]},"percent":{"type":["number","null"]}},"required":["name","pc_code","cas","percent"]}},"latest_label_url":{"type":["string","null"]},"company_number":{"type":"string"},"registration_date":{"type":["string","null"]},"cancellation_date":{"type":["string","null"]},"formulation":{"type":["string","null"]},"sites":{"type":"array","items":{"type":"string"}},"pests":{"type":"array","items":{"type":"string"}},"alternate_brand_names":{"type":"array","items":{"type":"string"}},"label_pdfs":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"date":{"type":["string","null"]}},"required":["url","date"]}},"source_updated_at":{"type":["string","null"]},"ingested_at":{"type":"string"},"last_verified_at":{"type":["string","null"]},"replaced_by":{"type":["string","null"]},"disclaimer":{"type":"string"},"source":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"},"license":{"type":"string"}},"required":["name","url","license"]}},"required":["epa_reg_no","product_name","company_name","status","rup","signal_word","ingredients","latest_label_url","company_number","registration_date","cancellation_date","formulation","sites","pests","alternate_brand_names","label_pdfs","source_updated_at","ingested_at","last_verified_at","replaced_by","disclaimer","source"]}}}}}}},"/v1/search":{"get":{"summary":"Searches US pesticide products by active ingredient, product or brand name, company, label site (crop or place), label pest, restricted-use flag and status. Give at least one filter. All filters combine. Pages by cursor.","tags":["search_pesticides"],"security":[{"ApiKey":[]}],"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":100,"description":"Start of an active ingredient name, or its PC code."},"required":false,"description":"Start of an active ingredient name, or its PC code.","name":"ingredient","in":"query"},{"schema":{"type":"string","minLength":3,"maxLength":100,"description":"Start of a word of the product name or an alternate brand name."},"required":false,"description":"Start of a word of the product name or an alternate brand name.","name":"name","in":"query"},{"schema":{"type":"string","minLength":3,"maxLength":100,"description":"Start of a word of the company name."},"required":false,"description":"Start of a word of the company name.","name":"company","in":"query"},{"schema":{"type":"string","minLength":3,"maxLength":100,"description":"Start of a word of a label site, for example corn or turf."},"required":false,"description":"Start of a word of a label site, for example corn or turf.","name":"site","in":"query"},{"schema":{"type":"string","minLength":3,"maxLength":100,"description":"Start of a word of a label pest, for example aphid."},"required":false,"description":"Start of a word of a label pest, for example aphid.","name":"pest","in":"query"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"True for restricted-use products only, false for general-use only."},"required":false,"description":"True for restricted-use products only, false for general-use only.","name":"rup","in":"query"},{"schema":{"type":"string","enum":["registered","cancelled","inactive"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Results per page, 1 to 100."},"required":false,"description":"Results per page, 1 to 100.","name":"limit","in":"query"},{"schema":{"type":"string","maxLength":40,"description":"The next_cursor of the previous page."},"required":false,"description":"The next_cursor of the previous page.","name":"cursor","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"epa_reg_no":{"type":"string"},"product_name":{"type":"string"},"company_name":{"type":["string","null"]},"status":{"type":"string","enum":["registered","cancelled","inactive"]},"rup":{"type":"boolean"},"signal_word":{"type":["string","null"]},"ingredients":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"pc_code":{"type":"string"},"cas":{"type":["string","null"]},"percent":{"type":["number","null"]}},"required":["name","pc_code","cas","percent"]}},"latest_label_url":{"type":["string","null"]}},"required":["epa_reg_no","product_name","company_name","status","rup","signal_word","ingredients","latest_label_url"]}},"next_cursor":{"type":["string","null"]},"disclaimer":{"type":"string"},"source":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"},"license":{"type":"string"}},"required":["name","url","license"]}},"required":["results","next_cursor","disclaimer","source"]}}}}}}},"/v1/ingredient/{ingredient}":{"get":{"summary":"Lists the US pesticide products that contain an active ingredient (the start of its name, or its PC code), with how many products there are for each matching ingredient.","tags":["products_by_ingredient"],"security":[{"ApiKey":[]}],"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":100,"description":"Start of an active ingredient name, or its PC code."},"required":true,"description":"Start of an active ingredient name, or its PC code.","name":"ingredient","in":"path"},{"schema":{"type":"string","enum":["registered","cancelled","inactive"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Results per page, 1 to 100."},"required":false,"description":"Results per page, 1 to 100.","name":"limit","in":"query"},{"schema":{"type":"string","maxLength":40,"description":"The next_cursor of the previous page."},"required":false,"description":"The next_cursor of the previous page.","name":"cursor","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ingredients":{"type":"array","items":{"type":"object","properties":{"pc_code":{"type":"string"},"name":{"type":"string"},"cas":{"type":["string","null"]},"products":{"type":"number"},"registered_products":{"type":"number"}},"required":["pc_code","name","cas","products","registered_products"]}},"results":{"type":"array","items":{"type":"object","properties":{"epa_reg_no":{"type":"string"},"product_name":{"type":"string"},"company_name":{"type":["string","null"]},"status":{"type":"string","enum":["registered","cancelled","inactive"]},"rup":{"type":"boolean"},"signal_word":{"type":["string","null"]},"ingredients":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"pc_code":{"type":"string"},"cas":{"type":["string","null"]},"percent":{"type":["number","null"]}},"required":["name","pc_code","cas","percent"]}},"latest_label_url":{"type":["string","null"]}},"required":["epa_reg_no","product_name","company_name","status","rup","signal_word","ingredients","latest_label_url"]}},"next_cursor":{"type":["string","null"]},"disclaimer":{"type":"string"},"source":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"},"license":{"type":"string"}},"required":["name","url","license"]}},"required":["ingredients","results","next_cursor","disclaimer","source"]}}}}}}}},"webhooks":{}}