美国愚蠢法律数据API允许开发者、研究人员和爱好者探索记录在不同美国州的奇怪、过时或不寻常的法律。该API的设计采用了将州与其相关法律分开的端点,而不是在单个重请求中获取所有数据,使其在不同的用例中高效且灵活。
[
{
"states": [
"Alabama",
"Alaska",
"Arizona",
"Arkansas",
"California",
"Colorado",
"Connecticut",
"Delaware",
"District of Columbia",
"Florida",
"Georgia",
"Hawaii",
"Idaho",
"Illinois",
"Indiana",
"Iowa",
"Kansas",
"Kentucky",
"Louisiana",
"Maine",
"Maryland",
"Massachusetts",
"Michigan",
"Minnesota",
"Mississippi",
"Missouri",
"Montana",
"Nebraska",
"Nevada",
"New Hampshire",
"New Jersey",
"New Mexico",
"New York",
"North Carolina",
"North Dakota",
"Ohio",
"Oklahoma",
"Oregon",
"Pennsylvania",
"Rhode Island",
"South Carolina",
"South Dakota",
"Tennessee",
"Texas",
"Utah",
"Vermont",
"Virginia",
"Washington",
"West Virginia",
"Wisconsin",
"Wyoming"
]
}
]
curl --location --request POST 'https://zylalabs.com/api/9855/usa+stupid+laws+data+api/18518/obtain+all+us+states+in+dataset' --header 'Authorization: Bearer YOUR_API_KEY' --header 'Content-Type: application/json' --data-raw '{}'
[
{
"Florida": [
"In Sarasota, it is illegal to sing in a public place while clad in a swimsuit.",
"A special law prohibits unmarried women from parachuting on Sunday or she shall risk arrest, fine, and/or jailing.",
"Florida law forbids rats to leave the ships docked in Tampa Bay.",
"In Hialeah, ambling and strolling is a misdemeanor.",
"If an elephant is left tied to a parking meter, the parking fee has to be paid just as it would for a vehicle.",
"In Florida failure to tell your neighbor his house is on fire is illegal.",
"In Florida it is illegal to fish while driving across a bridge.",
"It is illegal to skateboard without a license.",
"Women may be fined for falling asleep under a hair dryer, as can the salon owner.",
"It is illegal to break more than three dishes per day or chip the edges of more than four cups and/or saucers.",
"Owners of bars, restaurants, and other places where liquor is sold may be fined up to $1,000 if they participate in or permit any contest of 'dwarf-tossing.'"
]
}
]
curl --location --request POST 'https://zylalabs.com/api/9855/usa+stupid+laws+data+api/18521/get+stupid+laws+for+state' --header 'Authorization: Bearer YOUR_API_KEY' --header 'Content-Type: application/json' --data-raw '{"state":"Required"}'
[
{
"Florida": "People who own bars, restaurants, and other places where liquor is sold may be fined up to $1,000 if they participate in or permit any contest of “dwarf-tossing.”"
}
]
curl --location --request POST 'https://zylalabs.com/api/9855/usa+stupid+laws+data+api/18526/highlighted+stupid+laws+per+state' --header 'Authorization: Bearer YOUR_API_KEY' --header 'Content-Type: application/json' --data-raw '{"State":"Required"}'
| 标头 | 描述 |
|---|---|
授权
|
[必需] 应为 Bearer access_key. 订阅后,请查看上方的"您的 API 访问密钥"。 |
无长期承诺。随时升级、降级或取消。 免费试用包括最多 50 个请求。
美国愚蠢法律数据API提供了一系列不寻常和过时的法律,按美国各州分类,使用户可以访问与每个州相关的特定法律
API以结构化格式返回数据,通常是JSON,包含关于每个州及其相关的“愚蠢法律”的详细信息
开发人员可以使用API创建教育工具、问答游戏或法律研究应用程序,突出奇怪的法律,使其成为一个有趣的学习和娱乐资源
该API的输出包括“state”、“law_description”和潜在的“law_id”等字段,提供关于每项法律及其来源的清晰信息
您可以通过向其端点发送请求来集成API,以获取所有州或特定州的数据,从而根据需要在您的应用程序中显示或利用这些不寻常的法律
此端点以结构化的JSON格式返回所有美国州的全面列表 每个州在数组中作为字符串表示 方便用户轻松访问和利用州名进行进一步查询
该端点提供特定于请求的美国州的不寻常和过时法律的列表 响应包括州名作为键和离奇法律的数组作为其值 允许用户探索特定州的法律怪异之处
响应结构为一个JSON对象,其中每个州是一个键,相应的值是描述突出愚蠢法律的字符串。这种格式使得识别和展示每个州的重要法律变得容易
此端点需要一个作为参数的州标识符,该标识符可以从“获取数据集中所有美国州”端点获得 用户必须提供有效的州名称以检索相关法律
用户可以根据需求选择特定的端点来自定义请求,例如检索所有州或获取特定州的法律。这种灵活性允许根据用户的要求进行有针对性的数据检索
典型的用例包括创建 trivia 游戏、教育内容或突出奇怪法律的法律研究工具 开发者可以利用这些数据进行娱乐、提高意识,甚至作为谈话的开场白
该API从文档法律参考和美国法律的历史记录中获取数据。定期更新和质量检查有助于确保信息保持准确和相关,尽管用户应验证特定法律的当前适用性
如果用户收到部分或空结果,他们应该验证请求中使用的状态标识符。此外,检查是否有潜在的API错误或确保该州有记录的法律可以帮助排除问题
服务级别:
100%
响应时间:
12,487ms
服务级别:
100%
响应时间:
56ms
服务级别:
100%
响应时间:
52ms
服务级别:
100%
响应时间:
57ms
服务级别:
100%
响应时间:
56ms
服务级别:
100%
响应时间:
5,655ms
服务级别:
100%
响应时间:
53ms
服务级别:
100%
响应时间:
6,613ms
服务级别:
100%
响应时间:
7,909ms
服务级别:
100%
响应时间:
3,948ms
服务级别:
100%
响应时间:
825ms
服务级别:
100%
响应时间:
105ms
服务级别:
100%
响应时间:
191ms
服务级别:
100%
响应时间:
2,610ms
服务级别:
100%
响应时间:
307ms
服务级别:
100%
响应时间:
270ms
服务级别:
100%
响应时间:
263ms
服务级别:
100%
响应时间:
592ms
服务级别:
100%
响应时间:
238ms
服务级别:
100%
响应时间:
765ms