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,
})
},
})
Weather Alert System: Create a workflow that monitors weather conditions in multiple cities. When certain conditions are met, like the forecast of a storm, trigger notifications to users in the affected cities through an email or SMS service like SendGrid or Twilio.
Local Event Finder: Build a workflow that fetches events from a service like Eventbrite based on the city data retrieved from GeoDB Cities. You can filter events by categories or keywords and send a curated list of local events to subscribers via a messaging platform like Slack.
Travel Itinerary Planner: Use the GeoDB Cities API to offer suggestions for travel destinations. Combine this with the Skyscanner Flight Search API to find the best flight options and craft a complete itinerary. Notify the user with options through a service like Telegram or save the plan to a Google Sheet.
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.
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.
GeoDB Cities uses API keys for authentication. When you connect your GeoDB Cities account, Pipedream securely stores the keys so you can easily authenticate to GeoDB Cities APIs in both code and no-code steps.
Subscribe and copy your API Key from the GeoDB Cities endpoints page at RapidAPI.