Easy Way to Bypass REST API Query Limits

Record Extract Limit
%%time
import urllib.request, urllib.error, urllib.parse
import pandas as pd
import geopandas as gpd
import matplotlib.pyplot as plt
import io, sys
import json, requests
from json import loads
from shapely.geometry import Point, Polygon
import numpy as np
import ssl
from shapely.geometry import shape
from pandas.io.json import json_normalize
from collections import OrderedDict
# remove warnings
import warnings
warnings.filterwarnings('ignore')
# set url
baseURL = "https://services.arcgis.com/V6ZHFr6zdgNZuVG0/ArcGIS/rest/services/Alternative_Fuel_Stations/FeatureServer/0"
fields = "*"
# Get record extract limit
urlstring = baseURL + "?f=json"
j = urllib.request.urlopen(urlstring)
js = json.load(j)
maxrcn = int(js["maxRecordCount"])
print(("Record extract limit: %s" % maxrcn))
Query Result
Downloaded DataFrame

References:

Senior Geospatial Specialist in Toronto

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store