Exports / Imports by Country
Retrieve Pakistan's export and import data broken down by trading partner countries, with bilateral trade flows and historical trends.
Description
This endpoint retrieves detailed bilateral trade data for Pakistan showing exports and imports disaggregated by trading partner countries. The data enables tracking of trade relationships with major partners, identification of growing/declining markets, and analysis of market share trends and trade dynamics. Understanding bilateral trade patterns is crucial for market penetration strategies, trade negotiation preparation, export promotion, and identifying supply chain dependencies. This data is essential for comprehending Pakistan's trading patterns and geographical trade diversification. Data is sourced from the State Bank of Pakistan (SBP) and the Pakistan Bureau of Statistics (PBS).
Request
Authentication
- Type: Bearer Token
- Required: Yes
Parameters
This endpoint does not accept any query parameters.
Response
Success Response (200)
{
"status": "ok",
"message": "",
"data": [
{
"period": "Nov 2025",
"values": [
{
"country": "USA",
"exports": 850,
"imports": 34.7
},
{
"country": "China",
"exports": 620,
"imports": 25.3
}
]
}
]
}
Response Fields
| Field | Type | Description |
|---|---|---|
period | string | Period identifier (e.g., "Nov 2025") |
values | array | Array of country trade objects (see below) |
Country Trade Object
| Field | Type | Description |
|---|---|---|
country | string | Trading partner country name |
exports | number | Exports to the country (US$ millions) |
imports | number | Imports from the country (US$ millions) |
Error Responses
For detailed Common Error responses, see the Error Handling.
Invalid Country Code (400)
{
"status": "error",
"message": "Invalid country code or name"
}
Invalid Direction Parameter (400)
{
"status": "error",
"message": "Invalid direction. Use 'exports', 'imports', or 'both'"
}
Examples
Get Latest Export/Import Data
curl -X GET "https://csapis.com/3.0/economy/exp-imp" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Use Cases
- Market Analysis: Identify largest trading partners and market trends
- Export Strategy: Understand export performance by destination market
- Import Dependency: Track reliance on imports from specific countries
- Trade Negotiations: Analyze bilateral trade patterns for negotiations
- Supply Chain: Assess geographic diversification of supply sources
- Investment Research: Understand Pakistan's trade relationships for business decisions