100 free credits. No credit card required.Start building
Logo
Economy API

Fetch official economic data with one API

Get household and travel spending, US federal spending and contracts, and a US importer's suppliers as structured JSON with one SocialCrawl API key. Eurostat and USAspending.gov are the named sources. Reads are priced in credits.

/v1/economy

5 active endpoints. Consumer and travel spend, federal spend and contracts, importers.

  • GET /v1/economy/consumer-spend
  • GET /v1/economy/tourism-spend
  • GET /v1/economy/government-spend
  • GET /v1/economy/government-contracts
  • GET /v1/economy/imports

What Economy endpoints does SocialCrawl ship?

Read endpoints for official spending statistics and public trade records. EU household and travel spending by country, US federal spending by place and individual contract awards, and the overseas suppliers of a US importer. Data API only.

/v1/economy/consumer-spend

Annual household spending by country and spending category from Eurostat. Choose euro millions, euro per capita or share of total. Years not yet published come back as null, never 0.

country_code, category, from_year, to_year, unit

/v1/economy/tourism-spend

What residents of a country spend on trips, split into transport, accommodation, restaurants and more. Filter by business or personal purpose, domestic or foreign destination, and total, per trip or per night.

country_code, category, purpose, destination, measure, from_year, to_year

/v1/economy/government-spend

Federal spending by state, county or country for an industry code, a product or service code or a keyword, from USAspending.gov. Ranked by amount with a total for the window.

naics, psc, keyword, from_date, to_date, geo, scope, award_type

/v1/economy/government-contracts

Individual awards with recipient, amount, awarding agency, NAICS, description, dates and place of performance. Needs one of recipient, keyword, naics or psc. No match returns an empty list and is refunded.

recipient, keyword, naics, psc (one required), from_date, to_date, type, sort, order, limit, page

/v1/economy/imports

A US importer's customs record: top overseas suppliers with shipment counts, the HS headings it ships and the latest bills of lading. Brand names resolve to the filer, so Nike returns Nike Usa.

company, limit

Economy API5 endpoints supported
View docs

Returns yearly household spending for each country and category, such as food, housing or transport, in euro millions, per person or as a share of the total.

Use it to compare how much people in different countries spend on a product category, or to see how a country's spending mix changes year to year.

1 credit

GET/v1/economy/consumer-spend?country_code=DE%2CFR&category=transport%2Cfood&from_year=2020&to_year=2024&unit=eur_millions

country_code · One or more ISO 3166-1 alpha-2 country codes, comma-separated (up to 10), e.g. `DE,FR,GR`. `EU27` returns the European Union total.

$ curl https://www.socialcrawl.dev/v1/economy/consumer-spend?country_code=DE%2CFR&category=transport%2Cfood&from_year=2020&to_year=2024&unit=eur_millions \
    -H "x-api-key: sc_YOUR_API_KEY"
idle
// Running this live needs your own API key. Hit "Try it" to see an example response

How the Economy API works

Economy is a normal SocialCrawl surface. You call GET /v1/economy/… with an API key, spend credits on cache misses, and get a single JSON envelope back. No keys for the official sources and no second SDK.

Authenticate every call

Send your key in the x-api-key header. The same key works for the social, search and commerce endpoints.

GET with query params

All routes are GET. consumer-spend and tourism-spend require country_code, imports requires company, and government-contracts requires one of recipient, keyword, naics or psc. We validate before charging.

Pay in credits, not seats

Spending and contract calls cost 1 credit. The importer lookup costs 20 credits whatever the limit. Cache hits cost 0.

Read one JSON envelope

Every response has the same outer shape: success, data, credits_used, credits_remaining, request_id, cached. What sits inside data depends on the endpoint.

The usual integration chain

Start from an industry code, find the awards behind it, then look up what a company imports. The two Eurostat endpoints stand alone for market sizing by country.

01Federal spend
GET /v1/economy/government-spend?naics=…

Regions ranked by amount for an industry code

Find where federal money goes before you pull individual awards.

02Contract awards
GET /v1/economy/government-contracts?naics=…

Award rows with recipient, amount and agency

Name the companies and agencies behind a spending total.

03Importer lookup
GET /v1/economy/imports?company=…

Top overseas suppliers, HS headings and bills of lading

See who a company buys from and what it ships in.

request
GET /v1/economy/consumer-spend
  ?country_code=DE,FR
  &category=transport
  &unit=eur_millions
Host: www.socialcrawl.dev
x-api-key: sc_your_api_key_here

GET /v1/economy/imports?company=Nike
response envelope
{
  "success": true,
  "data": {
    "series": [
      {
        "country_code": "DE",
        "category": "transport",
        "points": [{ "year": 2022, "value": 253929 }]
      }
    ],
    "unit": "eur_millions",
    "source_note": "…"
  },
  "credits_used": 1,
  "credits_remaining": 9999,
  "request_id": "req_…",
  "cached": false
}

What lands in data

Each endpoint returns its own structured object. Series, ranked regions, award rows and a supplier dossier are all plain JSON you can read without a parser for the original source.

Series (consumer-spend)consumer-spend

series[] per country and category with points[] of year and value, plus dataset, unit, source_note

Series (tourism-spend)tourism-spend

series[] per country and category in euro, plus the purpose, destination and measure applied

Regions (government-spend)government-spend

regions[] with code, name, amount, population, per_capita; total_amount, geo_layer, filters

Award list (government-contracts)government-contracts

items[] with award_id, type, recipient_name, amount, awarding_agency, naics, description, dates, place_of_performance

Importer record (imports)imports

company, top_suppliers, hs_codes, recent_shipments, matches, selection

Inside the gateway

Same request lifecycle as every other /v1 platform endpoint. Economy is not a sidecar.

  1. 01

    Edge receives the call

    Next.js catch-all routes into the Hono social API. We mint a request_id, authenticate the key, then enforce rate limit (600/min) and concurrency (50 in flight per key).

  2. 02

    Validate, then debit

    Registry lookup finds the economy route. Required params are checked first. Invalid input returns 400 with no charge. Valid calls debit the tier cost atomically before upstream work.

  3. 03

    Cache or fetch

    A deterministic cache key is built from platform, resource and params. Hit: return immediately with credits_used 0. Miss: the source is queried directly. Spending and importer responses cache for hours because the underlying data moves daily at most.

  4. 04

    Normalize and return

    The source response is reshaped into the endpoint's object, validated, wrapped in the success envelope and logged for billing audit.

Billing rules that matter in production

  • Spending and contract calls: 1 credit per call
  • Contract search: 1 credit per page
  • Importer lookup: 20 credits, whatever the limit
  • Cache hit: 0 credits
  • No match: 404 or an empty list, refunded
  • Bad params: 400, never charged
  • No credits: 402, never charged
  • Importer name with no US import records: 404, 0 credits
  • Source outage after debit: refund path applies

How we get the data

Economy reads official statistics and public records and returns them in one JSON shape. You do not learn each source's query language.

What Economy is for this API

Spending and trade facts about countries, industries and companies. Read-only reference data, not market quotes and not social content.

Where the numbers come from

Household and travel spending come from Eurostat, the statistical office of the European Union. Federal spending and contracts come from USAspending.gov, the official US source. Importer records come from public US customs bill-of-lading filings.

What leaves our edge

A unified JSON envelope: success, data, credits_used, request_id, cached. Missing values are null, never 0, and responses carry a source note.

What we do not cover

Eurostat spending covers EU and EEA countries and some candidates. Importer data covers US ocean freight imports only, with no air freight, exports or non-US trade, and some importers withhold their manifests.

field map sketch
Eurostat annual dataset→ series[] with year and value pointsEurostat annual values become series points per country and category
USAspending.gov award totals→ regions[] ranked by amountUSAspending.gov totals become regions ranked by amount
federal award record→ items[] contract rowseach federal award becomes one contract row
customs bill-of-lading records→ importer supplier dossiercustoms bills of lading roll up into suppliers, HS headings and shipments

What this API is used for

The jobs this API is most often used for.

5active Economy endpoints in the registry
1 / 20credit ladder for spending and contracts (1) and the importer lookup (20)

Market sizing and company sourcing research

Callers pair government-spend with government-contracts to find who is paid, and use imports to see who a merchant buys from. The Eurostat endpoints feed country comparisons. One GET per question and null for missing years instead of zero. Spending and contract calls at 1 credit, the importer lookup at 20. Same SocialCrawl key as the rest of the catalog.

Spending and contract calls usually return in a few seconds. The importer lookup takes 8 to 12 seconds and can reach about 25, so set a client timeout of at least 45 seconds.

Use case examples

Common ways teams put this data to work, and the stack each one tends to run.

Market sizing analysts

Python, pandas, notebooks

consumer-spend and tourism-spend by country and category to size demand, with per capita or share units to compare countries of different size.

Public sector sales teams

Node, CRM sync, cron

government-spend to find states and industries with federal money, then government-contracts to list the awards and recipients behind it.

Sourcing and competitor research

Go, queues, spreadsheets

imports to see a brand's top overseas suppliers, HS headings and latest shipments before a supplier or competitor review.

Call it in two lines

Spending and contract calls are 1 credit per call. The importer lookup is 20. Cache hits are free.

curl "https://www.socialcrawl.dev/v1/economy/consumer-spend?country_code=DE,FR&category=transport&unit=eur_millions" \
  -H "x-api-key: sc_your_api_key_here"
curl "https://www.socialcrawl.dev/v1/economy/government-spend?naics=4811&geo=state" \
  -H "x-api-key: sc_your_api_key_here"
curl "https://www.socialcrawl.dev/v1/economy/imports?company=Nike&limit=10" \
  -H "x-api-key: sc_your_api_key_here"
Economy on SocialCrawl

Same key as the rest of the catalog

Endpoints

What data does the Economy API return?

Every endpoint returns structured JSON in a unified envelope. Computed fields such as engagement rate and content category are included only where the endpoint supports them and the required source inputs are present.

Comparison

How does SocialCrawl compare to Calling each source directly for Economy data?

Same Economy data, two very different paths. Auth, rate limits, schema, and cost, side by side.

Request shape

SocialCrawl
A plain GET with query parameters on every endpoint
Calling each source directly
Eurostat expects dataset codes and JSON-stat parsing; USAspending.gov expects a JSON POST body

Response shape

SocialCrawl
Series with year and value points, ranked regions, award rows, or a supplier dossier
Calling each source directly
Multi-dimensional JSON-stat cubes and nested filter payloads you flatten yourself

Missing values

SocialCrawl
Unpublished years come back as null, never 0
Calling each source directly
Gaps are encoded in status flags you must read yourself

Importer suppliers

SocialCrawl
Brand name in, top overseas suppliers and latest bills of lading out
Calling each source directly
No free official lookup by company name

Pricing

SocialCrawl
1cr per spending call, 20cr per importer lookup; 100 free credits, no card
Calling each source directly
Free official APIs, but you build and run the integration
FAQ

Have a question? We got answers

Find answers to frequently asked questions about SocialCrawl's API, pricing, and capabilities.

Contact us
What is the SocialCrawl Economy API?
It is 5 endpoints that return official economic data as JSON on the same key as the social endpoints: household and travel spending by country, US federal spending and contract awards, and a US importer's overseas suppliers. Eurostat and USAspending.gov are the data origin for the first four, and US customs bill-of-lading records back the importer lookup.
Is there an API for Eurostat consumer spending data?
Yes. GET /v1/economy/consumer-spend takes one or more country codes and returns annual household spending by COICOP category, such as food, housing and transport, as a series of year and value points. Choose euro millions, euro per capita or share of total. A year Eurostat has not published is null, never 0.
How do I find how much US federal money goes to an industry?
Call GET /v1/economy/government-spend with a NAICS code, for example naics=4811 for scheduled air transportation. You get spending by state, county or country, largest first, with a total for the window. Narrow it with psc, keyword, a date range or award_type, and it defaults to the last full US federal fiscal year.
Can I search individual US federal contract awards?
Yes. GET /v1/economy/government-contracts needs one of recipient, keyword, naics or psc and returns award rows with recipient, amount, awarding agency, NAICS, description, dates and place of performance. Paginate with page or the cursor. A search with no match returns an empty list and is not billed.
Can I see who a US company imports from?
Yes. GET /v1/economy/imports takes a company name and returns its top overseas suppliers with shipment counts, the HS headings it ships, and the latest bills of lading. The brand name Nike resolves to the filer Nike Usa, and the selection field says how the match was chosen. Only US ocean-freight imports are covered.
How much does the Economy API cost?
Spending and contract endpoints cost 1 credit per call, and the importer lookup costs 20 credits whatever the limit. New accounts get 100 free credits with no card. A search that finds nothing returns 404 or an empty list and is refunded, and exact repeats within the cache window cost 0 credits.
How current is the Economy data?
It follows each source's own publishing schedule. Eurostat figures are annual and the latest years are often provisional, USAspending.gov reflects awards as agencies report them, and customs manifests post in daily batches with a lag of days. Responses are cached for up to a day, and the response carries the dataset and source note so you can see what you received.
Is scraping Economy data legal?
SocialCrawl returns publicly available Economy data and does not access private or login-gated content. Whether scraping fits your project depends on your use case and jurisdiction. You are responsible for complying with Economy's terms of service and applicable data-protection laws such as GDPR and CCPA. This is general information, not legal advice.
Economy scraping API vs the official Economy API: what's the difference?
With SocialCrawl there is no app review or approval queue. Sign up and call Economy endpoints immediately with a single x-api-key. Responses share one unified schema with every other SocialCrawl platform, and credit-based pricing replaces per-platform quotas. Official APIs are still the right choice for posting and other write actions: SocialCrawl is read-only data.

Ask AI about SocialCrawl

Read the Economy API reference in the docs

🤖 AI agent or LLM? Read this page as markdown