{
"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/9851/us+stupid+laws+api/18511/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/9851/us+stupid+laws+api/18512/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/9851/us+stupid+laws+api/18513/highlighted+stupid+laws+per+state' --header 'Authorization: Bearer YOUR_API_KEY' --header 'Content-Type: application/json' --data-raw '{"State":"Required"}'
注册后,每个开发者都会被分配一个个人 API 访问密钥,这是一个唯一的字母和数字组合,用于访问我们的 API 端点。要使用 美国愚蠢的法律 API 进行身份验证,只需在 Authorization 标头中包含您的 bearer token。
| 标头 | 描述 |
|---|---|
授权
|
必需
应为 Bearer access_key. 订阅后,请查看上方的"您的 API 访问密钥"。
|
无长期承诺。随时升级、降级或取消。 免费试用包括最多 50 个请求。
(年度计费可节省 2 个月 🎉)
美国愚蠢法律API允许开发人员、研究人员和爱好者探索在不同州记录的怪异、过时或不寻常的法律。该API的设计采用了将州与其相关法律分开的端点,而不是在一个庞大的请求中提取所有数据,使其在不同用例中更高效和灵活。
美国愚蠢法律API提供了一系列不寻常和过时的法律,这些法律按美国各州分类,让用户可以访问与每个州相关的具体法律
API以结构化格式返回数据,通常为JSON,包含关于每个州及其相关的“愚蠢法律”的细节
开发者可以使用API创建教育工具、竞猜游戏或法律研究应用程序,突出奇怪的法律,使其成为学习和娱乐的有趣资源
API的输出包括诸如'state'、'law_description'和可能的'law_id'等字段,提供关于每条法律及其来源的清晰信息
您可以通过向其端点发送请求来集成API,以获取所有州或特定州的数据,从而允许您在应用程序中根据需要显示或利用这些不寻常的法律
该端点以结构化的JSON格式返回所有美国州的综合列表 每个州作为数组中的字符串表示 允许用户轻松访问和利用所有州的名称以进行进一步查询
此端点需要一个州标识符作为参数,可以是完整的州名或缩写。这使得用户能够高效地获取该州特有的异常法律
响应被结构化为一个对象数组,每个对象包含州名作为键和与之相关的奇怪法律的数组作为值 这种格式便于访问与特定州相关的法律
该端点提供指定州的单一突出法律,以JSON对象格式返回。响应包括州名作为键,法律描述作为字符串,便于快速参考显著法律
用户可以解析JSON响应以提取州名及其相关法律。这些数据可以在应用程序中显示,用于趣味游戏,或融入教育内容中,增强用户对不寻常法律事实的参与感
常见的用例包括创建问答游戏 教育工具或法律研究应用程序 开发人员可以利用该API突出奇怪的法律 使其成为学习美国法律怪异现象的有趣资源
API的数据来源于记录的法律参考和州法律的历史记录 定期更新和质量检查确保信息保持相关和准确 尽管用户应验证特定法律的当前适用性
如果API返回部分或空结果,请检查请求中的参数以确保准确性 确保州标识符是正确的 如果问题仍然存在,请考虑某些州可能有较少的法律文档,导致结果有限