OpenCage Demo
@tod
code:
data:privatelast updated:4 years agoarchived
today
Build integrations remarkably fast!
You're viewing a public workflow template.
Sign up to customize, add steps, modify code and more.
Join 800,000+ developers using the Pipedream platform
steps.
trigger
Cron Scheduler
Deploy to configure a custom schedule
This workflow runs on Pipedream's servers and is triggered on a custom schedule.
steps.
opencage
auth
to use OAuth tokens and API keys in code via theauths object
(auths.opencage)
code
Write any Node.jscodeand use anynpm package. You can alsoexport datafor use in later steps via return or this.key = 'value', pass input data to your code viaparams, and maintain state across executions with$checkpoint.
async (event, steps, auths) => {
1
2
3
4
}
5
return await require("@pipedreamhq/platform").axios(this, {
  url: `https://api.opencagedata.com/geocode/v1/json?key=${auths.opencage.api_key}&q=51.952659%2C+7.632473&pretty=1&no_annotations=1`,
})
steps.
geocoder_request
Make a geocoder API request
auth
(auths.opencage)
params
Request format

The format component of the URL should be replaced with one of the following json, geojson, xml, map or google-v3-json.

string ·params.format
Query string

A latitude, longitude or a placename/address. The query should be URL encoded, so spaces should be a +, comma should be %2C, instead of, for example, non-ascii strings like München you should send us M%C3%BCnchen.

 
51.952659, 7.632473
string ·params.q
Optional
code
async (params, auths) => {
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
}
23
return await require("@pipedreamhq/platform").axios(this, {
  url: `https://api.opencagedata.com/geocode/v1/${params.format}`,
  params: {
    key: auths.opencage.api_key,
    q: params.q,
    abbrv: params.abbrv,
    add_request: params.add_request,
    bounds: params.bounds,
    countrycode: params.countrycode,
    jsonp: params.jsonp,
    language: params.language,
    limit: params.limit,
    min_confidence: params.min_confidence,
    no_annotations: params.no_annotations,
    no_dedupe: params.no_dedupe,
    no_record: params.no_record,
    pretty: params.pretty,
    proximity: params.proximity,
    roadinfo: params.roadinfo,
  },
})