User Tools

Site Tools


api

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
api [2026/01/17 12:48] – [Special rate limits] flackapi [2026/03/02 13:15] (current) – [Rate limits] flack
Line 18: Line 18:
  
 If you make a lot of API requests then you may receive a 429 Too Many Requests response. This indicates that an API rate limit has been reached. If you make a lot of API requests then you may receive a 429 Too Many Requests response. This indicates that an API rate limit has been reached.
 +
 +You can check the "Retry-After" response header or message in the response body to determine how long you have to wait with your next request without being rate limited.
 +
 If you need higher API rate limits please get in touch with us. If you need higher API rate limits please get in touch with us.
 +
 +Please note that we might refine the existing rate limits or introduce new ones in the future in order to keep our API reliable and to help third-party developers use the API in a responsible way.
 +
 +
  
 ===== Default rate limits ===== ===== Default rate limits =====
Line 31: Line 38:
 === For authenticated requests === === For authenticated requests ===
  
-If you use a valid API access token the following limits apply:+If you use a valid API access token, the following limits apply:
  
   * Burst: 20/min   * Burst: 20/min
Line 38: Line 45:
 ===== Special rate limits ===== ===== Special rate limits =====
  
-If an endpoint is not listed in this section then the default rate limits apply for that endpoint.+If an endpoint is not listed in this section, the default rate limits apply for that endpoint.
  
 === Compound list details === === Compound list details ===
  
-These rate limits only apply for the [[api#compound_list_details1|Compound list details API endpoint]].+These rate limits only apply for the [[api#compound_list_details1|Compound list details endpoint]].
  
   * Burst: 5/min   * Burst: 5/min
Line 49: Line 56:
 === Quote Request  === === Quote Request  ===
  
-These rate limits only apply for the [[api#quote_request_api|Quote Request API endpoint]].+These rate limits only apply for the [[api#quote_request1|Quote Request endpoint]].
  
   * Burst: 5/min   * Burst: 5/min
Line 184: Line 191:
 If you call this API endpoint as an authenticated user (=you provide a [[api#authentication|valid token]]) you might get additional private entries if you have permission to access them. If you call this API endpoint as an authenticated user (=you provide a [[api#authentication|valid token]]) you might get additional private entries if you have permission to access them.
  
 +You can get a single database file by its ID:
 +
 +== Endpoint: ==
 +<code>/database-files/<id>/</code>
 +
 +== Example API request: ==
 +<code>
 +http https://mcule.com/api/v1/database-files/1/ --print HBhb
 +</code>
 +
 +== Request: ==
 +<code>
 +GET /api/v1/database-files/1/ HTTP/1.1
 +Accept: */*
 +Accept-Encoding: gzip, deflate
 +</code>
 +
 +== Response: ==
 +<code>
 +HTTP/1.1 200 OK
 +Allow: GET, HEAD, OPTIONS
 +Content-Type: application/json
 +
 +{
 +  "count": 1,
 +  "next": null,
 +  "previous": null,
 +  "results": [
 +    {
 +      "id": 1,
 +      "name": "Mcule Full",
 +      "description": "Purchasable Mcule supplier & ULTIMATE catalogs",
 +      "entry_count": 139650179,
 +      "last_updated": "2026-01-29",
 +      "files": [
 +        {
 +          "id": 28,
 +          "size_mb": 31039,
 +          "file_type": "sdf.gz",
 +          "file_type_display": "2D SDF (sdf.gz)",
 +          "download_url": "https://dl.mcule.com/database/mcule_purchasable_full_260129.sdf.gz",
 +          "filename": "mcule_purchasable_full_260129.sdf.gz",
 +          "sha256_checksum": "5222e0d4b0b2886c372e971d1f720a2ebde280bc7eefa893d79b2231460d9551"
 +        },
 +        {
 +          "id": 32,
 +          "size_mb": 2396,
 +          "file_type": "smi.gz",
 +          "file_type_display": "SMILES (smi.gz)",
 +          "download_url": "https://dl.mcule.com/database/mcule_purchasable_full_260129.smi.gz",
 +          "filename": "mcule_purchasable_full_260129.smi.gz",
 +          "sha256_checksum": "f9af6934f1b4dcfe40b0c52734637d1fa50c920d1c488c33ee16c04b23df8049"
 +        }
 +      ],
 +      "public": true,
 +      "group": "default"
 +    }
 +  ]
 +}
 +</code>
  
 ===== Compound details ===== ===== Compound details =====
Line 1014: Line 1081:
  
  
-===== Compound suppliers public API  =====+===== Compound suppliers public =====
  
 You can get some very basic (public) information about our compound suppliers with this API. You can get some very basic (public) information about our compound suppliers with this API.
Line 1081: Line 1148:
  
  
-===== Compound catalogs public API  =====+===== Compound catalogs public =====
  
 You can get some very basic (public) information about our compound catalogs with this API. You can get some very basic (public) information about our compound catalogs with this API.
Line 1139: Line 1206:
  
  
-===== Quote Request API =====+===== Quote Request =====
  
 == Endpoint: == == Endpoint: ==
Line 1150: Line 1217:
  
 Mandatory fields: Mandatory fields:
-  * **mcule_ids**: List of mcule IDs of structures you want get a quote for.+  * **mcule_ids**: List of mcule IDs of structures you want get a quote for. The maximum number of valid IDs allowed here is 1000 by default. Contact us if you need more.
   * **customer_first_name**: The customer's first name. It does not need to be specified if the user's first name is specified on the Edit profile page on mcule.com.   * **customer_first_name**: The customer's first name. It does not need to be specified if the user's first name is specified on the Edit profile page on mcule.com.
   * **customer_last_name**: The customer's last name. It does not need to be specified if the user's last name is specified on the Edit profile page on mcule.com.   * **customer_last_name**: The customer's last name. It does not need to be specified if the user's last name is specified on the Edit profile page on mcule.com.
-  * **delivery_country**: ISO 3166-1 alpha-2 code of the delivery country.+  * **delivery_country**: ISO 3166-1 alpha-2 code of the delivery country. [[https://www.iso.org/obp/ui#search]]
  
  
Line 1371: Line 1438:
 } }
 </code> </code>
-===== Quote Request Status API =====+===== Quote Request Status =====
  
 Since processing a quote request and generating suitable quotes can take some time it is an asynchronous process. You can query the status of a quote request by calling the detail API endpoint of the quote request. It is returned in the **api_url** field when you create the quote request. You can also use the **id** field to construct the url of the API call. You can check the **state** field of the response whether the async quote request processing is finished. Since processing a quote request and generating suitable quotes can take some time it is an asynchronous process. You can query the status of a quote request by calling the detail API endpoint of the quote request. It is returned in the **api_url** field when you create the quote request. You can also use the **id** field to construct the url of the API call. You can check the **state** field of the response whether the async quote request processing is finished.
Line 1571: Line 1638:
 Check for the **group** field. If it is not null, we could generate some quotes for your quote query. As you can see from the above result, we could generate 3 different quotes for the quote query. A "Best price" quote, a "Fastest delivery" quote and an "Optimum" quote. Check for the **group** field. If it is not null, we could generate some quotes for your quote query. As you can see from the above result, we could generate 3 different quotes for the quote query. A "Best price" quote, a "Fastest delivery" quote and an "Optimum" quote.
  
-===== Quote API  =====+===== Quote =====
  
 In order to get the detailed data of an individual quote, you can call the detail API endpoint of a quote, for example for the quote with ID //15677//: In order to get the detailed data of an individual quote, you can call the detail API endpoint of a quote, for example for the quote with ID //15677//:
api.1768654081.txt.gz · Last modified: by flack