Find Cities & Towns with GeoDB Cities API.
Find cities, filtering by optional criteria. If no criteria are set, you will get back all known cities with a population of at least 1000. See the docs.
Write Python and use any of the 350k+ PyPi packages available. Refer to the Pipedream Python docs to learn more.
Get the details for a specific country, including number of regions. See the docs.
Get the details of a specific country region, including number of cities. See the docs.
The GeoDB Cities API lets you tap into a rich dataset of worldwide cities, their attributes, and related data. On Pipedream, you can use this API to create workflows that automate location-based tasks, enrich data with geographical context, or power apps with location intelligence. For instance, you could trigger a workflow whenever a new city is added to a database, gather demographic information based on city names, or even integrate with travel platforms to plan itineraries.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
geodb_cities: {
type: "app",
app: "geodb_cities",
}
},
async run({steps, $}) {
const data = {
"query": `{country(id:"US"){name region(code:"CA"){name populatedPlaces(first:10){totalCount pageInfo{startCursor endCursor hasNextPage}edges{node{name}}}}}}`,
}
return await axios($, {
method: "post",
url: `http://geodb-free-service.wirefreethought.com/graphql`,
headers: {
"x-rapidapi-key": `${this.geodb_cities.$auth.api_key}`,
"Content-Type": `application/json`,
},
data,
})
},
})
Develop, run and deploy your Python code in Pipedream workflows. Integrate seamlessly between no-code steps, with connected accounts, or integrate Data Stores and manipulate files within a workflow.
This includes installing PyPI packages, within your code without having to manage a requirements.txt
file or running pip
.
Below is an example of using Python to access data from the trigger of the workflow, and sharing it with subsequent workflow steps:
def handler(pd: "pipedream"):
# Reference data from previous steps
print(pd.steps["trigger"]["context"]["id"])
# Return data for use in future steps
return {"foo": {"test":True}}