with OpenCage and Public Record?
The OpenCage API provides geocoding services, converting coordinates to readable addresses (reverse geocoding) and vice versa (forward geocoding). It's valuable for apps requiring geolocation data, such as mapping, logistics, or location-based services. In Pipedream, it can be used to create workflows that react to location-based events or enrich datasets with geographical information.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
opencage: {
type: "app",
app: "opencage",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.opencagedata.com/geocode/v1/json`,
params: {
key: `${this.opencage.$auth.api_key}`,
"q": `51.952659%2C+7.632473`,
pretty: `1`,
no_annotations: `1`,
},
})
},
})
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
public_record: {
type: "app",
app: "public_record",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.propmix.io/pubrec/assessor/v1/GetPropertyDetails`,
headers: {
"Access-Token": `${this.public_record.$auth.api_key}`,
},
params: {
StreetAddress: `305 E 2nd St`,
City: `Lucas`,
State: `KS`,
PostalCode: `67648`,
OrderId: `5411013`,
},
})
},
})