with CrimeoMeter and AgentQL?
Provides raw data coverage information grouped by cities. See the docs and here
The CrimeoMeter API provides detailed crime data, allowing users to access crime statistics and safety information across various locations. Utilize this API within Pipedream to integrate real-time crime data into apps, send alerts, or enhance analytics. Pipedream makes it simple to set up event-driven workflows that react to CrimeoMeter's data, enabling both individual users and organizations to act upon crime insights swiftly and automate their safety processes.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
crimeometer: {
type: "app",
app: "crimeometer",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.crimeometer.com/v1/incidents/raw-data`,
headers: {
"Content-Type": `application/json`,
"x-api-key": `${this.crimeometer.$auth.api_key}`,
},
params: {
lat: `{your_latitude}`,
lon: `{your_longitude}`,
distance: `{your_distance}`,
datetime_ini: `{your_datetime_ini}`,
datetime_end: `{your_datetime_end}`,
},
})
},
})
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
agentql: {
type: "app",
app: "agentql",
}
},
async run({steps, $}) {
const data = {
"query": "{ products[] { product_name product_price(integer) } }",
"url": "https://scrapeme.live/?s=fish&post_type=product",
"params": {
"wait_for": 0,
"is_scroll_to_bottom_enabled": false,
"mode": "fast",
"is_screenshot_enabled": false
}
};
return await axios($, {
method: "post",
url: `https://api.agentql.com/v1/query-data `,
headers: {
"content-type": `application/json`,
"x-api-key": `${this.agentql.$auth.api_key}`,
},
data,
})
},
})