What Is the Swordfish API?
The Swordfish "Search by Data" API lets you use existing data points you have for a person—like their name, email, phone, or social profile—and retrieve verified contact details programmatically. It's perfect for teams who want to integrate Swordfish data into their own tools and workflows.
Who Can Use the API?
API access is available on:
- Team & Scale Plan and higher
- Enterprise Plan
API access requires approval. Contact support@swordfish.ai with your use case to get started.
Getting Your API Key
- Log into Swordfish
- Go to Settings → API Key
- Your unique API key is displayed (format:
live-xxxxxxxxxxxx) - Click to copy it, or click Renew API Key to generate a new one
Keep your API key secret — Never share it publicly or commit it to public code repositories.
API Endpoint
All person searches use a single endpoint:
https://api.swordfish.ai/searchPersonRequests must be sent as POST with a JSON body, over HTTPS (SSL required).
Request Headers
Include these headers with every request:
| Key | Value | Required |
|---|---|---|
apikey | live-xxxxxxxxxxxx | Mandatory |
content-type | application/json | Mandatory |
summary | true or 1 | Optional |
You can also pass your API key as a URL parameter:
https://api.swordfish.ai/searchPerson?apikey=live-xxxxxxxxxxxxSupported Search Combinations
The API requires one of these base combinations to return results. Requests that don't match a supported combination return an error or no results.
Supported combinations:
social_profile— LinkedIn, Facebook, or Twitter/X URLfirst_name+last_name+website(company domain)first_name+last_name+company+websitefirst_name+last_name+company+titlefirst_name+last_name+emailfirst_name+last_name+phonefirst_name+last_name+street+zipcode(US addresses only)
Standalone search fields (can be used alone with no additional data):
social_profileemailphone
Important: Only one value can be sent for each data point. You cannot send multiple emails or multiple phones in a single request.
The must_have Key
The must_have key helps ensure you only pay for the data you need. It verifies that any valid response includes the data you specify—exactly like the "must have" toggles in the Extension, Reverse Lookup, and File Enrichment.
Set must_have to a number between 1 and 7:
| Value | Description |
|---|---|
| 1 | Any email |
| 2 | Any phone |
| 3 | Mobile phone |
| 4 | Email OR any phone |
| 5 | Email AND any phone |
| 6 | Email OR mobile phone |
| 7 | Email AND mobile phone |
Note: If you use summary, the must_have key is ignored.
Example Request
A search by full name requiring any email:
{
"must_have": 1,
"fullname": "Bruce Wayne"
}A search by email only:
{
"email": "bruce@wayne.com"
}A search by name and company:
{
"must_have": 5,
"first_name": "Bruce",
"last_name": "Wayne",
"company": "Wayne Enterprises"
}Responses
The API returns one of two responses:
No match — You'll see "no match found" in the JSON response. This means that based on the data sent and the must_have value, we couldn't match a single person.
Match — You'll see the contact details in the JSON response (name, emails, phones, social profiles).
Error Handling
General Errors
| Error message | Possible issue |
|---|---|
| Access denied | API key is wrong, missing, or inactive |
| Account is suspended | Contact success@swordfish.ai |
| Bad request | Bad JSON syntax, or request not sent as POST |
| Too many connections for the team | More than one concurrent query made by the same key |
| The request has not been executed | Server-side error — resend the request |
| Bad request: JSON data is missing | Missing the Content-Type: application/json header |
Data-Related Errors
| Error message | Description |
|---|---|
| Exceed limit credit | Weekly fair use threshold reached. Contact support@swordfish.ai for an increase |
| Credits exceed | (Credit-based plans) Account credits used up. Contact support@swordfish.ai |
| (url) is not accepted | social_profile field sent without a valid social profile URL |
| No data found | Body doesn't contain search data |
| The query does not contain any valid name/phone/email/address/social_profile | Body doesn't contain valid search data |
| This type of input data is not included on your plan | The search combination used isn't supported on your plan |
Limits
- Concurrent requests: Each API key is limited to 5 active requests at the same time
- Fair use: API usage counts toward your weekly fair use threshold (unlimited plans) or credits (legacy plans)
If you hit the limit, contact support@swordfish.ai to request a fair use increase.
Additional Endpoints
The API also includes:
- Get credits balance — Returns the number of credits remaining on your account
- Get history of requests — Retrieve your past API requests by parameter
See the full API documentation for details on these endpoints, including request and response formats.
Security & Authorization
- All requests must be encrypted using SSL (HTTPS)
- Your API key authenticates each request
- Store your key securely (environment variables, not hardcoded)
- Rotate your key periodically via Settings → API Key → Renew API Key
Full Documentation
For complete API documentation including all endpoints, request/response examples, and code samples, visit:
You can also click Run in Postman on that page to test requests directly.
Getting Started
- Make sure you're on Team & Scale or higher
- Email support@swordfish.ai to request API access
- Once approved, go to Settings → API Key to get your key
- Review the full documentation
- Start building!
Questions? Email support@swordfish.ai with your use case and we'll help.