Otreeba

Otreeba

Food & Drink

This is an open, canonical database of cannabis seed companies, strains, brands, products, retailers, and studies from Otreeba

Visit API

πŸ“š Documentation & Examples

Everything you need to integrate with Otreeba

πŸš€ Quick Start Examples

Otreeba Javascript Examplejavascript
// Otreeba API Example
const response = await fetch('https://api.otreeba.com/swagger/', {
    method: 'GET',
    headers: {
        'Content-Type': 'application/json'
    }
});

const data = await response.json();
console.log(data);

Get Started with Otreeba API

Otreeba API is a public API that provides access to the most comprehensive cannabis-related data resources. It enables users to access information related to cannabis strains, products, and user reviews. The APIs are RESTful, and all the responses are either JSON or XML.

In order to get started with Otreeba API, you need to sign up for an account and obtain an API key. Once you have your API key, you’re all set to start making requests.

Sample API Requests

Below are some sample API requests that you can try out using JavaScript:

Get All Strains

fetch('https://api.otreeba.com/v1/strains', {
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
}).then(response => response.json())
  .then(data => console.log(data));

Get Strain by ID

fetch('https://api.otreeba.com/v1/strains/5f6027b50f96431c06ddf5b3', {
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
}).then(response => response.json())
  .then(data => console.log(data));

Get All Products

fetch('https://api.otreeba.com/v1/products', {
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
}).then(response => response.json())
  .then(data => console.log(data));

Get Product by ID

fetch('https://api.otreeba.com/v1/products/5f788fbc0d1405410ff8ebc8', {
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
}).then(response => response.json())
  .then(data => console.log(data));

Get User Reviews by Strain ID

fetch('https://api.otreeba.com/v1/strains/5f6027b50f96431c06ddf5b3/reviews', {
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
}).then(response => response.json())
  .then(data => console.log(data));

Conclusion

These sample API requests should give you an idea of how to get started with Otreeba API and make successful requests using JavaScript. If you’d like to explore the API further, be sure to check out the official API documentation for more information. Happy coding!

πŸ“Š 30-Day Uptime History

Daily uptime tracking showing online vs offline minutes

Jun 2Jun 4Jun 6Jun 8Jun 10Jun 12Jun 14Jun 16Jun 18Jun 20Jun 22Jun 24Jun 26Jun 28Jul 104008001440Minutes
Online
Offline

Related APIs in Food & Drink