# Social Fetch API - Economy endpoints # Base URL: https://api.socialfetch.dev # Auth: x-api-key header (sfk_...) # Full catalog: https://www.socialfetch.dev/llms-endpoints.txt | JSON: https://www.socialfetch.dev/llms.json # Docs hub: https://www.socialfetch.dev/docs/api | OpenAPI: https://www.socialfetch.dev/openapi.json 5 documented Economy operations. Do not invent paths - only the routes below (and their linked markdown pages) are supported. ## GET /v1/economy/consumer-spend Get household spending by country and category Credit cost: 1 credit. Failed requests are free. Auth: API key or x402 payment (no key needed for payment) Docs: https://www.socialfetch.dev/docs/api/v1/economy/consumer-spend/get.mdx SDK: client.economy.getConsumerSpend({ country: "DE,FR", category: "total,transport" }) Parameters: - country (required, array) - Up to 10 countries, comma-separated: ISO 3166-1 alpha-2 codes of EU and EFTA members and candidate countries, e.g. `DE,FR,GR`, or `EU27` (European Union) and `EA` (euro area). `EL` (Greece) and `UK` are accepted too. - category (optional, array) - Spending categories, comma-separated: `total`, `food`, `alcohol_tobacco`, `clothing`, `housing`, `furnishings`, `health`, `transport`, `information_communication`, `recreation`, `education`, `restaurants_hotels`, `insurance_financial_services`, `personal_care_miscellaneous`, `personal_care`, `insurance`, `financial_services`. Without it: `total` and the 13 main categories. - unit (optional, string, enum: eur_millions | eur_per_capita | share_of_total | share_of_gdp | national_currency_millions | national_currency_per_capita | real_growth_percent) - `eur_millions` (default), `eur_per_capita`, `share_of_total` (percent of all household spending), `share_of_gdp`, `national_currency_millions`, `national_currency_per_capita` or `real_growth_percent` (change on the previous year in volume terms). - fromYear (optional, integer) - First year, e.g. `2015`. Default: five years before the current year. - toYear (optional, integer) - Last year, e.g. `2024`. Default: the latest year published. curl "https://api.socialfetch.dev/v1/economy/consumer-spend?country=DE,FR" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/economy/tourism-spend Get travel spending by country and category Credit cost: 1 credit. Failed requests are free. Auth: API key or x402 payment (no key needed for payment) Docs: https://www.socialfetch.dev/docs/api/v1/economy/tourism-spend/get.mdx SDK: client.economy.getTourismSpend({ country: "DE,FR", purpose: "business" }) Parameters: - country (required, array) - The travellers' home countries, up to 10, comma-separated: ISO 3166-1 alpha-2 codes of EU and EFTA members and candidate countries, e.g. `DE,FR`, or `EU27` for the European Union. `EL` (Greece) and `UK` are accepted too. - category (optional, array) - Spending categories, comma-separated: `total` (everything except durables), `transport`, `restaurants`, `accommodation`, `package` (package holidays), `other`, `durables` (valuables and durable goods). Without it: all seven. - purpose (optional, string, enum: total | personal | business) - Why people travelled: `total` (default), `personal` or `business`. - destination (optional, string, enum: world | domestic | foreign | eu | non_eu) - Where they went: `world` (default), `domestic`, `foreign`, `eu` (other EU countries) or `non_eu`. - measure (optional, string, enum: total | per_trip | per_night) - `total` (default, all spending in euro), `per_trip` (average per trip) or `per_night` (average per night). - tripLength (optional, string, enum: any | short | long) - Trip length: `any` (default, one night or more), `short` (1 to 3 nights) or `long` (4 nights or more). - fromYear (optional, integer) - First year, e.g. `2015`. Default: five years before the current year. - toYear (optional, integer) - Last year, e.g. `2024`. Default: the latest year published. curl "https://api.socialfetch.dev/v1/economy/tourism-spend?country=DE,FR" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/economy/government-spend Get US federal spending by state, county or country Credit cost: 1 credit. Failed requests are free. Auth: API key or x402 payment (no key needed for payment) Docs: https://www.socialfetch.dev/docs/api/v1/economy/government-spend/get.mdx SDK: client.economy.getGovernmentSpend({ level: "state", naics: "4811" }) Parameters: - level (optional, string, enum: state | county | country) - What to sum by: `state` (default), `county` or `country` (spending abroad included). - scope (optional, string, enum: place_of_performance | recipient_location) - `place_of_performance` (default, where the work is done) or `recipient_location` (where the recipient is based). - state (optional, string, enum: AL | AK | AZ | AR | CA | CO | CT | DE | DC | FL | GA | HI | ID | IL | IN | IA | KS | KY | LA | ME | MD | MA | MI | MN | MS | MO | MT | NE | NV | NH | NJ | NM | NY | NC | ND | OH | OK | OR | PA | RI | SC | SD | TN | TX | UT | VT | VA | WA | WV | WI | WY | AS | GU | MP | PR | VI) - Only this state, as a two-letter USPS code, e.g. `CA`. With `level=county`, its counties. - awardType (optional, string, enum: contracts | grants | loans | direct_payments | other | all) - `contracts` (default), `grants`, `loans`, `direct_payments`, `other` or `all`. - naics (optional, array) - NAICS industry codes, comma-separated, up to 20. Each has 2, 4 or 6 digits; a shorter code covers its whole family, e.g. `4811` (scheduled air transport) or `54`. - psc (optional, array) - Federal product and service codes (PSC), comma-separated, up to 20. 1 to 4 characters; a shorter code covers its family, e.g. `D3` (IT services) or `R425`. - keyword (optional, string) - Text matched against award descriptions, e.g. `cybersecurity`. 3 to 120 characters. - from (optional, string) - Start of the window, `YYYY-MM-DD`, not before `2007-10-01`. Without `from` and `to`: the latest US federal fiscal year (1 October to 30 September) that ended at least 90 days ago. With only `from`: to today. - to (optional, string) - End of the window, `YYYY-MM-DD`. With only `to`: the year up to that day. curl "https://api.socialfetch.dev/v1/economy/government-spend?level=state&naics=4811" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/economy/government-contracts Search US federal contract awards Credit cost: 1 credit. Failed requests are free. Auth: API key or x402 payment (no key needed for payment) Docs: https://www.socialfetch.dev/docs/api/v1/economy/government-contracts/get.mdx SDK: client.economy.searchGovernmentContracts({ recipient: "Lockheed Martin" }) Parameters: - recipient (optional, string) - Company or organisation name, matched as text against the recipient's legal name, e.g. `Lockheed Martin`. Contracts are filed under legal names: `Space Exploration Technologies` finds SpaceX, `SpaceX` does not. - keyword (optional, string) - Text matched against award descriptions, e.g. `cybersecurity`. 3 to 120 characters. - naics (optional, array) - NAICS industry codes, comma-separated, up to 20. Each has 2, 4 or 6 digits; a shorter code covers its whole family, e.g. `4811` (scheduled air transport) or `54`. - psc (optional, array) - Federal product and service codes (PSC), comma-separated, up to 20. 1 to 4 characters; a shorter code covers its family, e.g. `D3` (IT services) or `R425`. - state (optional, string, enum: AL | AK | AZ | AR | CA | CO | CT | DE | DC | FL | GA | HI | ID | IL | IN | IA | KS | KY | LA | ME | MD | MA | MI | MN | MS | MO | MT | NE | NV | NH | NJ | NM | NY | NC | ND | OH | OK | OR | PA | RI | SC | SD | TN | TX | UT | VT | VA | WA | WV | WI | WY | AS | GU | MP | PR | VI) - Only contracts performed in this state, as a two-letter USPS code, e.g. `VA`. - type (optional, string, enum: all | bpa_call | purchase_order | delivery_order | definitive_contract) - `all` (default), `definitive_contract`, `purchase_order`, `delivery_order` or `bpa_call`. - from (optional, string) - Start of the window, `YYYY-MM-DD`, not before `2007-10-01`. A contract matches when it had activity in the window. Without `from` and `to`: the latest US federal fiscal year (1 October to 30 September) that ended at least 90 days ago. With only `from`: to today. - to (optional, string) - End of the window, `YYYY-MM-DD`. With only `to`: the year up to that day. - sort (optional, string, enum: amount | start_date | end_date | recipient) - `amount` (default), `start_date`, `end_date` or `recipient`. - order (optional, string, enum: desc | asc) - `desc` (default) or `asc`. - limit (optional, integer) - Contracts per page, 1 to 100. Default 25. - cursor (optional, string) - Cursor from `page.nextCursor` of the previous response. It only works with the same filters, sort and order. Pagination: send query `cursor` from prior `data.page.nextCursor`; stop when `data.page.hasMore` is false. curl "https://api.socialfetch.dev/v1/economy/government-contracts?recipient=Lockheed%20Martin" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/economy/imports Get a US importer's suppliers and shipments Credit cost: 1 credit. Failed requests are free. Auth: API key or x402 payment (no key needed for payment) Docs: https://www.socialfetch.dev/docs/api/v1/economy/imports/get.mdx SDK: client.economy.getImports({ company: "Nike" }) Parameters: - company (required, string) - The importer: a brand, e.g. `Nike`, a name as it appears on shipping documents, e.g. `Nike Usa`, or the `company.id` of an earlier answer, e.g. `nike-usa`. Endings such as Inc, LLC and USA are ignored when matching. Outcome field: `data.lookupStatus` in `found`, `not_found` curl "https://api.socialfetch.dev/v1/economy/imports?company=Nike" \ -H "x-api-key: YOUR_API_KEY"