Important Notes
Rate Limit
API has a rate limit. If the usage exceeds a certain amount, API usage will be temporarily restricted. The criteria for this restriction will be adjusted after confirming the usage status of everyone.
Paging of Responses
If the API response gets larger, pagination_key may be set in the response. If pagination_key is set, please retrieve subsequent data by executing a request with pagination_key set without changing the search conditions in the next query. Refer to the sample code of each API for the format of the response.
Sample Python code using pagination_key is shown below.
import requests
import json
# First search
idToken = "YOUR idToken"
headers = {"Authorization": "Bearer {}".format(idToken)}
r_get = requests.get("https://api.jquants-pro.com/v2/method?query=param", headers=headers)
data = r_get.json()["data"]
# Re-search when large data is returned
# Re-search as long as pagination_key is included
while "pagination_key" in r_get.json():
pagination_key = r_get.json()["pagination_key"]
r_get = requests.get(f"https://api.jquants-pro.com/v2/method?query=param&pagination_key={pagination_key}", headers=headers)
data += r_get.json()["data"]Gzip compression on API Responses
The response from the API is changed to Gzip to reduce data traffic.
It is assumed that no action is required on the client side due to this specification change, but some action may be required on the client side depending on the usage pattern. Please refer to the table below for details.
Impact depending on the usage pattern
Use the Package
Use above header (This header is set by default.)
No Action required (Compressed responses are automatically decompressed)
Not use thePackage
Use above header
Action required. Need to decompress responses properly. In the case of curl, "--compressed" option is necessary.
Not use above header
No Action required
* Generally refers to HTTP client libraries that are used when making RestAPI calls. e.g.) Libraries such as "requests" and "urllib" in python.
Last updated