Connect Retool to CoStar's commercial real estate API using a REST API Resource. CoStar's API is enterprise-only and requires an approved application — there is no self-serve API access. Once approved, configure a REST API Resource in Retool with your CoStar API credentials, then build commercial real estate analytics dashboards querying property data, market analytics, and lease comparables directly in the query editor.
| Fact | Value |
|---|---|
| Tool | CoStar |
| Category | Other |
| Method | REST API Resource |
| Difficulty | Intermediate |
| Time required | 30 minutes (plus CoStar API approval time, which can take days to weeks) |
| Last updated | April 2026 |
Why Connect Retool to CoStar?
CoStar is the dominant data source for commercial real estate professionals — brokers, investors, developers, and analysts rely on it for property listings, lease comparables, sale transactions, market vacancy rates, and tenant movement data. For organizations that have already purchased CoStar access and want to build internal analytics tools, connecting CoStar's API to Retool eliminates the need to manually export data or navigate CoStar's own UI for every data request.
A Retool + CoStar integration enables internal dashboards that combine CoStar market data with your own portfolio data from internal databases, automated comparable analysis workflows, investor reporting panels that pull live CoStar data alongside internal deal tracking, and lease expiration dashboards that query CoStar lease records for portfolio-level views. These are use cases CoStar's own platform supports but in a rigid UI — Retool lets you build exactly the views and workflows your operations team needs.
The critical constraint: CoStar's API is enterprise-only with no public self-serve access. It is not available for individual subscribers or standard CoStar accounts. To obtain API access, you must contact CoStar's sales team and go through an application and approval process. This page covers both the access process and the technical integration for teams that have already been approved or are actively pursuing API access.
Integration method
CoStar does not have a native Retool connector. Integration uses Retool's REST API Resource type, where you configure CoStar's API base URL and credentials once, then build queries for each endpoint in the Retool query editor. All requests proxy through Retool's backend server, so CoStar API credentials never reach the browser and CORS is not an issue. Note: CoStar API access is enterprise-only and requires a separate application and approval process with CoStar's sales and technical team.
Prerequisites
- An approved CoStar API access agreement with your API credentials (API key or username/password) — this requires contacting CoStar's enterprise sales team
- Knowledge of the CoStar API endpoints and data models relevant to your use case (CoStar provides API documentation upon approval)
- A Retool account (Cloud or self-hosted) with permission to create Resources
- Clarity on which CoStar data products your contract covers — API access scope varies by subscription (property search, lease comparables, market analytics, sale transactions, tenant data, etc.)
- An internal database or data model for the property portfolio data you want to combine with CoStar data (optional but common)
Step-by-step guide
Understand and apply for CoStar API access
CoStar does not provide self-serve API access. There is no developer portal, no free tier, no trial access, and no API keys available to standard CoStar subscribers. The CoStar API is a separate enterprise product that requires a dedicated contract. The application process works as follows. Contact CoStar's sales team through costar.com or your existing CoStar account manager. Describe your use case: what data you need (property search, market analytics, comparables, tenant data, sale transactions), the approximate query volume, and how you plan to use the data (internal analytics tool, CRM enrichment, portfolio management platform). CoStar evaluates applications based on use case legitimacy and existing relationship — teams with an existing CoStar subscription have a better chance of approval. Upon approval, CoStar provides API documentation (typically a PDF or private portal), API credentials (API key, username/password, or OAuth client credentials depending on the API version), and a sandbox environment for testing. The production API is typically available at https://api.costar.com or a similar enterprise endpoint. CoStar's API versions vary — ask explicitly about the current API version and request the OpenAPI specification if available. If you do not yet have CoStar API access and need commercial real estate data for a Retool prototype or internal tool, consider these alternatives while pursuing approval: - ATTOM Data Solutions: property data API with self-serve access (attomdata.com) - Regrid: parcel data and property boundaries API - Estated: property data API with address-based lookups - CoStar's own export features: manually export comparables to CSV and import to Retool Database or a PostgreSQL table as a stopgap For teams that definitely need CoStar's specific data and scale, pursuing the enterprise API agreement is the only path to a live integration.
Pro tip: When applying for CoStar API access, lead with your specific use case and the data products you need rather than a generic 'we want API access' request. CoStar is more likely to approve applications with clear, legitimate commercial real estate use cases tied to an existing customer relationship.
Expected result: You have received CoStar API credentials, endpoint documentation, and confirmation of which API endpoints and data products your access covers.
Configure the CoStar REST API Resource in Retool
With your CoStar API credentials, configure a REST API Resource in Retool. Navigate to the Resources tab in the left sidebar and click Add Resource. Select REST API from the resource type list. Name the resource 'CoStar API' or 'CoStar Production'. In the Base URL field, enter the CoStar API base URL provided in your documentation (e.g., https://api.costar.com or https://api.costar.com/v1 — use the versioned base URL if CoStar specifies one). For authentication: CoStar's API authentication method varies by contract and API version. Common patterns include: - API Key: if CoStar provided an API key, add it as a header in the resource settings. Go to Headers → Add Header. Set header name to X-Api-Key or Authorization (check your documentation), and set the value to your API key. Mark it as a secret by referencing a Retool configuration variable: {{ configVars.COSTAR_API_KEY }}. - HTTP Basic Authentication: if CoStar provided a username and password, select Basic Auth in the Authentication dropdown. Enter the username and password. Retool will base64-encode them and send as an Authorization header. - OAuth 2.0 Client Credentials: if CoStar uses OAuth, select OAuth 2.0 and enter the client ID, client secret, and token URL provided by CoStar. In Settings → Configuration Variables, create a variable named COSTAR_API_KEY (or COSTAR_USERNAME and COSTAR_PASSWORD for basic auth). Mark it as a secret so it's never exposed to Retool's frontend. Reference it in your resource's authentication configuration. Click Save Changes. Unlike database resources, Retool cannot automatically test REST API connectivity without a specific endpoint to call — the save will succeed regardless of whether the credentials are correct. You'll verify the connection by running a test query in the next step.
Pro tip: Store your CoStar API credentials in Retool's Configuration Variables (Settings → Configuration Variables), not hardcoded in the resource settings header values. Mark them as secrets to ensure they're only accessible in resource and workflow configurations, never exposed to the browser or visible to Retool app editors.
Expected result: A CoStar REST API resource appears in your Resources list. The resource configuration shows the base URL and authentication headers. You're ready to create queries against CoStar endpoints.
Build and test CoStar API queries in the query editor
Open a Retool app and create a new query. Select your CoStar REST API resource. The query editor will show fields for Method (GET/POST/PUT/DELETE), URL Path (relative to the base URL), URL Parameters, Headers, and Body. Start with a basic property search query. CoStar's property search endpoint typically accepts geographic and property type filters as query parameters or a JSON body (check your specific API documentation). Create a query named searchProperties. Set Method to GET (or POST if the endpoint requires a request body for search filters). Set the URL Path to the property search endpoint from your documentation (e.g., /property/search or /v1/properties). Add the required query parameters referencing Retool component values. Run the query. The response panel below the query editor shows the raw JSON response from CoStar. Inspect the response structure carefully — CoStar responses typically wrap results in a metadata envelope with pagination information, total count, and a results array. Create a JavaScript transformer to extract and reshape the results array into a flat format suitable for Retool's Table component. CoStar responses often include nested objects (address details, building specifications, market identifiers) that need to be flattened for tabular display. For market analytics endpoints: CoStar typically provides time-series data as arrays of period objects. These are well-suited for Retool's Chart component — transform the series data into the x/y format that Retool's Chart expects.
1// CoStar property search query configuration2// Method: GET (or POST depending on CoStar API version)3// URL Path: /property/search4// URL Parameters:5{6 "marketId": "{{ marketSelect.value }}",7 "propertyType": "{{ propertyTypeSelect.value }}",8 "minSize": "{{ minSizeInput.value || '' }}",9 "maxSize": "{{ maxSizeInput.value || '' }}",10 "pageNumber": "{{ Math.floor(table1.pageIndex) + 1 }}",11 "pageSize": "{{ table1.pageSize }}"12}1314// Transformer to reshape CoStar property search results:15const response = data;16const properties = response.properties || response.results || response.data || [];1718return properties.map(prop => ({19 propertyId: prop.propertyId || prop.id,20 address: prop.address?.deliveryLine || prop.streetAddress,21 city: prop.address?.city || prop.city,22 market: prop.market?.name || prop.marketName,23 submarket: prop.submarket?.name || prop.submarketName,24 propertyType: prop.propertyType,25 buildingSizeSF: prop.buildingSize?.toLocaleString(),26 yearBuilt: prop.yearBuilt,27 vacancyRate: prop.vacancy ? `${(prop.vacancy * 100).toFixed(1)}%` : 'N/A',28 askingRent: prop.askingRentPerSF ? `$${prop.askingRentPerSF.toFixed(2)}/SF` : 'N/A',29 lastSaleDate: prop.lastSaleDate ? new Date(prop.lastSaleDate).toLocaleDateString() : 'N/A'30}));Pro tip: CoStar's API documentation uses market IDs and submarket IDs rather than market names for filtering. Build a markets lookup query first (GET /markets or similar) to populate a Retool Select dropdown with market options, then use the selected market ID in your property search and analytics queries. This avoids hardcoding IDs that may change between CoStar API versions.
Expected result: The property search query returns CoStar property data in the response panel. The transformer reshapes the response into a flat array that displays correctly in a Retool Table component with readable column values.
Build the commercial real estate analytics dashboard
With working CoStar queries, assemble the dashboard layout in Retool's visual editor. The typical CRE analytics dashboard structure for a Retool + CoStar integration includes: filter controls at the top (market selector, property type, size range, date range), KPI cards showing current market conditions, a Chart component with trend data, and a Table with detailed property or comparable records. For the filter controls: add a Select component for market selection, populate its options from a getMarkets query. Add a second Select for property type with hardcoded options (Office, Industrial, Retail, Multifamily, Mixed-Use). Add a DateRangePicker for transaction or listing date ranges. All filter components should trigger your CoStar queries automatically when changed — configure this in each query's Settings: enable 'Run query automatically when inputs change'. For KPI cards: Retool's Statistic component (or a styled Container with Text components) displays single metric values. Create a transformer that extracts the key metrics from your market statistics query response: current vacancy rate, net absorption, asking rent, construction pipeline. Bind each metric to a Statistic component. For the trend chart: CoStar market statistics typically return quarterly or monthly time-series data. Transform this into an array of { x: 'Q1 2024', vacancy: 8.5, rent: 42.50 } objects and bind to a Chart component configured as a multi-series line chart. For combining CoStar data with internal portfolio data: create a second query targeting your internal PostgreSQL or other database resource. Use a JavaScript transformer query to join the CoStar results with the internal database results on a shared property identifier (address, property ID, or a custom field your team maintains). For complex integrations with multiple data sources and sophisticated merge logic, RapidDev's team can help architect your complete Retool solution.
1// Market statistics transformer — format CoStar time-series data for Chart component2// Input: data (CoStar market statistics response)3const stats = data?.statistics || data?.timeSeries || data?.periods || [];45return stats.map(period => ({6 quarter: period.periodLabel || period.quarter || period.period,7 vacancyRate: period.vacancyRate ? parseFloat((period.vacancyRate * 100).toFixed(2)) : null,8 askingRent: period.askingRentPerSF ? parseFloat(period.askingRentPerSF.toFixed(2)) : null,9 netAbsorption: period.netAbsorption || null,10 newSupply: period.completions || period.newSupply || null11})).sort((a, b) => {12 // Sort chronologically by quarter string13 return a.quarter < b.quarter ? -1 : a.quarter > b.quarter ? 1 : 0;14});Pro tip: CoStar API responses may include null values for metrics where data is not available (e.g., a new property with no vacancy history). Always use safe access (optional chaining and fallback values) in transformers to prevent null reference errors from breaking your entire dashboard when a single data point is missing.
Expected result: The dashboard displays live CoStar market data in Chart and KPI components, with a filterable Table showing property search results. Changing filter values triggers CoStar API queries and updates all components automatically.
Handle pagination, rate limits, and error states
CoStar's API enforces rate limits and returns paginated results for large data sets. Handling these correctly ensures your Retool dashboard is robust and doesn't fail under normal production usage. For pagination: CoStar typically returns a page of results with metadata indicating the total count and whether more pages exist. Check the response structure for fields like totalCount, pageCount, hasNextPage, or nextPageToken. In Retool, bind Table component pagination to your query's page and pageSize parameters. When the user advances to the next table page, Retool re-runs the query with the updated page parameter. For rate limits: CoStar's enterprise API rate limits are defined in your API agreement — these are typically measured in requests per minute or requests per day. Implement query caching in Retool for data that doesn't change frequently (market statistics are usually updated weekly or monthly). Enable query caching in the query's Advanced settings and set the cache duration appropriately (e.g., 3600 seconds = 1 hour for market data, 300 seconds for property listings). For error handling: CoStar API errors return standard HTTP error codes. Build error state handling in your Retool app: in each query's Event Handlers, add an On Failure handler that shows a notification with the error message. Common CoStar errors include 401 Unauthorized (expired or invalid credentials), 403 Forbidden (the endpoint is not included in your API access contract), 429 Too Many Requests (rate limit exceeded), and 400 Bad Request (invalid parameter values or missing required fields). For monitoring API usage: consider building a simple usage tracking Retool app that logs API calls to a Retool Database table (timestamp, endpoint, response time, status code) via a JavaScript query that runs after each CoStar API query. This helps identify which Retool apps are consuming the most CoStar API quota.
1// Pagination configuration for CoStar queries2// URL Parameters (add to property search and comparables queries):3{4 "pageNumber": "{{ table1.pageIndex + 1 }}",5 "pageSize": "{{ table1.pageSize }}",6 "marketId": "{{ marketSelect.value }}",7 "propertyType": "{{ propertyTypeSelect.value }}"8}910// Transformer to extract pagination metadata from CoStar response:11const response = data;12// Return structured object with items and pagination info13// Bind table1.data to resultTransformer.data.items14// Bind table1.totalCount to resultTransformer.data.totalCount15return {16 items: response.properties || response.results || [],17 totalCount: response.totalCount || response.total || 0,18 currentPage: response.pageNumber || 1,19 pageCount: response.pageCount || Math.ceil((response.totalCount || 0) / (response.pageSize || 25))20};Pro tip: If your CoStar API account has a daily request quota, enable Retool's query caching aggressively for market statistics data — these figures update at most weekly. Market data cached for 1-24 hours will look identical to live data for the vast majority of use cases while saving substantial API quota.
Expected result: Table pagination works correctly, fetching the next page of CoStar results as users navigate. Rate limit errors show informative notifications rather than raw API errors. Cached queries load instantly from cache for the configured duration.
Common use cases
Build a portfolio analytics dashboard combining CoStar market data with internal records
Create a Retool dashboard that queries CoStar's market analytics endpoints for vacancy rates, rental rates, and absorption data for your target markets. Display CoStar data alongside your internal property database records in a unified Table, with Chart components showing market trends over time. Allow analysts to filter by market, submarket, property type, and date range.
Build a commercial real estate portfolio dashboard that queries CoStar's /v1/property/search endpoint filtered by our target submarkets and property type (office, industrial, retail). Show a Table combining CoStar property data (address, size, vacancy, asking rent) with our internal PostgreSQL deals table joined on property_id. Add Chart components showing 12-month vacancy rate trends from CoStar market stats.
Copy this prompt to try it in Retool
Create a comparable analysis tool for brokers
Build a Retool panel where brokers can search CoStar for lease or sale comparables by specifying geography, property type, size range, and transaction date range. Display results in a Table with sorting and filtering. Include an export button that writes selected comparables to a Google Sheet or sends them to a PDF generator for client reports.
Build a comparable analysis tool with inputs for submarket, property type (office/industrial/retail/multifamily), transaction date range, size range (min/max SF), and transaction type (lease/sale). Query CoStar's comparables API and display results as a Table with address, size, rent/price per SF, transaction date, tenant name, and lease term. Add a 'Copy to Report' button that sends selected rows to a Google Sheet.
Copy this prompt to try it in Retool
Build a market intelligence dashboard for investor reporting
Create an investor-facing internal dashboard that pulls CoStar market statistics (vacancy, absorption, completions, rents) for a defined set of markets and property types. Display trend charts showing 8-quarter historical data, KPI cards for current market conditions, and a comparison table across markets. Auto-refresh weekly using a Retool Workflow.
Build a market intelligence dashboard querying CoStar's market statistics API for 8 target markets across office and industrial property types. Show KPI cards for current vacancy rate, net absorption (SF), asking rent, and completions for the current quarter per market. Add line charts showing 8 quarters of vacancy and rental rate trends. Schedule a Retool Workflow to refresh the data every Monday morning.
Copy this prompt to try it in Retool
Troubleshooting
API returns 401 Unauthorized on every request
Cause: The CoStar API credentials in the Retool resource configuration are invalid, expired, or incorrectly formatted. This is the most common issue when first setting up the integration.
Solution: Verify that your API key or username/password exactly matches what CoStar provided — check for extra spaces, truncation, or URL encoding. If using an Authorization header, confirm the header name and value format match CoStar's documentation exactly (some CoStar API versions use 'Authorization: Basic {base64}', others use 'X-CoStar-ApiKey', and others use a custom header name). Contact CoStar's API support team if credentials appear correct but authentication still fails — CoStar occasionally rotates or expires API keys after inactivity.
Query returns 403 Forbidden for specific endpoints
Cause: The 403 response from CoStar's API means the endpoint exists but your API access contract does not include that specific data product or endpoint. CoStar's API access is scoped to specific products.
Solution: Review your CoStar API access agreement to confirm which data products and endpoints are included. For example, a contract that includes property search may not include lease comparables or sale transactions — those require separate licensing. Contact your CoStar account manager to discuss expanding your API access scope if you need additional endpoint coverage.
Transformer throws 'Cannot read properties of undefined' errors when processing CoStar response
Cause: CoStar API responses have nested and inconsistently structured data — some fields may be null, missing entirely for certain property types, or structured differently between API versions. Accessing a nested property without null checking causes JavaScript errors in the transformer.
Solution: Use optional chaining (?.) throughout your transformer when accessing nested CoStar response fields. Add fallback values with the nullish coalescing operator (??). For example, prop.address?.deliveryLine ?? prop.streetAddress ?? 'N/A' safely handles missing address objects. Run a single property record through the transformer in the Retool query editor's debug panel to inspect the actual response structure before writing the full transformer.
1// Safe access pattern for CoStar nested objects:2return (data?.properties ?? data?.results ?? []).map(prop => ({3 address: prop?.address?.deliveryLine ?? prop?.streetAddress ?? 'N/A',4 vacancyRate: prop?.vacancy != null ? `${(prop.vacancy * 100).toFixed(1)}%` : 'N/A',5 rent: prop?.askingRentPerSF != null ? `$${prop.askingRentPerSF.toFixed(2)}/SF` : 'N/A',6 size: prop?.buildingSize?.toLocaleString() ?? 'N/A'7}));CoStar API returns 429 Too Many Requests during dashboard load
Cause: The Retool dashboard has multiple CoStar API queries that all execute simultaneously when the page loads, collectively exceeding CoStar's rate limit. This is common when a dashboard has 4-6 CoStar queries running in parallel.
Solution: Enable query caching for all CoStar queries that don't require real-time data (most market statistics and property data). In each query's Advanced settings, set a Cache Duration of 300-3600 seconds depending on how fresh the data needs to be. Additionally, stagger query execution: set some queries to only run when triggered by user interaction (disable 'Run query automatically') rather than all running on page load. This spreads out API consumption across user actions rather than spiking on dashboard open.
Best practices
- Store CoStar API credentials in Retool's Configuration Variables as secrets rather than hardcoding them in resource headers — this prevents credential exposure and makes rotation easier.
- Enable query caching for market statistics and property search queries — CoStar market data updates infrequently (weekly or quarterly), so caching for 1-24 hours provides identical user experience while dramatically reducing API quota consumption.
- Build a markets and property types lookup query that populates Select dropdowns with CoStar's official market IDs and names — this avoids hardcoding IDs that may change between API versions and ensures filters always use valid values.
- Use transformer functions to flatten CoStar's nested response structure before binding to Retool Table components, and always use optional chaining (?.) when accessing nested fields to handle missing data gracefully.
- Implement graceful error handling for 403 responses with a user-friendly message explaining which CoStar data product the feature requires — this helps internal users understand access limitations rather than seeing cryptic API errors.
- For dashboards combining CoStar data with internal database data, use a JavaScript transformer query for the join logic rather than trying to build it into individual queries — this makes the merge logic explicit, testable, and easy to debug.
- Monitor CoStar API consumption by logging query metadata to a Retool Database table so you can identify high-usage dashboards before hitting your contracted rate limits.
Alternatives
Redfin focuses on residential real estate data with more accessible API options — prefer it over CoStar when your use case involves residential properties rather than commercial real estate analytics.
Realtor.com's API provides residential listing data and is more accessible for smaller teams — a better choice than CoStar when commercial-grade enterprise data is not required.
Yardi is a property management platform with API access for operational data — complement CoStar's market analytics with Yardi's operational portfolio data when you manage properties in addition to researching markets.
Frequently asked questions
Does CoStar have a public API that anyone can access?
No. CoStar's API is strictly enterprise-only with no public self-serve access, no developer portal, no free tier, and no trial API keys. Standard CoStar subscriptions (the web platform) do not include API access — it requires a separate enterprise agreement. The high search volume for 'does CoStar have an API' reflects widespread confusion on this point. To obtain access, you must contact CoStar's enterprise sales team and negotiate a separate API data licensing agreement.
How long does the CoStar API application and approval process take?
The timeline varies significantly depending on the size of the engagement and whether you have an existing CoStar relationship. Teams with existing CoStar subscriptions and a clear enterprise use case typically go through a 2-4 week process covering technical requirements discussion, legal review of the data licensing agreement, and API credential provisioning. New customers without an existing CoStar relationship should expect a longer sales and procurement cycle, potentially 4-8 weeks or more.
What data does CoStar's API actually provide access to?
CoStar's API data coverage depends on your contracted products, but typically includes: commercial property records (office, industrial, retail, multifamily), market and submarket statistics (vacancy, absorption, rents, construction pipeline), lease comparables (tenant, size, rent, term), sale comparables (buyer, seller, price, cap rate), tenant directory (company locations, space requirements), and executive suite data. Not all products are available in all geographic markets, and international data coverage varies. Your specific access is defined by the API licensing agreement.
Can I use CoStar's web platform data in Retool without API access?
The only supported method for getting CoStar data into Retool without API access is manual export: CoStar's web platform allows data exports to CSV/Excel for most searches. You can import these exports into a Retool Database table (Retool's built-in PostgreSQL) or a Google Sheet and build your Retool dashboard against that imported data. This is a reasonable stopgap for small teams with infrequent data needs, but it doesn't provide live data — you'd need to re-export and re-import whenever you need fresh data.
Does Retool have a native CoStar connector?
No. As of 2026, Retool does not have a native CoStar connector in its Resources catalog. CoStar is not available in Retool's connector marketplace. You must connect using Retool's generic REST API Resource type, configuring the CoStar API base URL and authentication manually. This is the approach covered throughout this guide.
Talk to an Expert
Our team has built 600+ apps. Get personalized help with your project.
Book a free consultation