Quickstart

To get started, create an account, sign in with OAuth to get an access token, and run a call to confirm a successful connection.

  1. Create your account

    Sign up on the Get an Account page and verify your email address. All accounts are free to use until you make more than 100 calls per day. You will be sent an email outlining our pro plans if you reach this limit.

    Create an account
  2. Sign in and get your access token

    Sign in with your account when the OAuth window opens and approve access. You will be issued an access token. Store it in an environment variable or a secrets manager, and never in source code. Access tokens expire, so request a new one when yours does.

    export TOKEN="YOUR_ACCESS_TOKEN"
  3. Use the token to make an API call

    Open a terminal or your IDE and paste the example API call. The token is sent in the Authorization header, so there is no separate email or key header.

    curl --request POST \
      --url 'https://api.scientificmicroservices.com/detectoutliers' \
      --header 'Content-Type: application/json' \
      --header "Authorization: Bearer $TOKEN" \
      --data '[10.1727,11.9026,7.9209,9.0841,9.8298,11.345,9.6483,8.9257,8.9788,958.9969,11.1933,12.1186,9.5798,10.0861,10.1675,10.2935,11.2547,10.4636,9.6607,9.7316]'

    If everything worked, the command line displays the information below.

    [{"position":9,"value":958.9969}]

    If you receive a 401 error, your token is missing, invalid or expired. Sign in again to get a new one.

(In this example ,the DetectOutliers algorithm has determined the number in position 9 of the array (starting from 0) to be an outlier, and showed its value as 958.9969. For more information about this endpoint, see the endpoint description).

You’re now ready to use Scientific Microservices APIs.

Working with keys

Scientific Microservices authenticates OAuth2 with a verified email address. This account information is the only piece of identifying data.

If a request doesn’t include a valid token, Scientific Microservices returns an invalid request error.

If a request includes a deleted or expired token, Scientific Microservices returns an authentication error (see ‘Error handling’ to understand these codes better).

Error Handling

The API uses standard HTTP status codes. Error responses contain a machine-readable code and human-readable message.

Code Status Message Notes
400 invalid_payload "Invalid or missing 'data' field" Check the URL of the api in your request, and that the json data submitted is correctly formed.
401 unauthorized "Invalid API key" Check your key is sourced correctly, and you are subscribed to the API.
429 request_limit "Too many requests" Contact us to subscribe to a Pro or Ultra key
500 internal_error “Internal Server Error” Check content type is ‘application/json’, and the data is a correctly formed json

Rate limits

Plan Requests per minute Requests per day
Free 10 100
Academic 1,000 20,000
Pro 1,000 (default) 20,000 (default)

For more information about pricing, see the home page.

Start Building

An example product page from an online store

Improve your product page

A pile of money next to the Google Ads logo

Reduce your ads budget

A line of manufacturing robots

Protect advanced machinery