### Order Domain Emails (Node.js axios) Source: https://anymailfinder.com/email-finder-api/docs/domain-email/pay This Node.js example shows how to order a file of domain emails using the `axios` library. It configures the request with the necessary headers and endpoint. ```javascript const axios = require('axios'); const domain = "example.com"; const apiKey = "YOUR_API_KEY"; axios.post(`https://api.anymailfinder.com/v5.1/domain/${domain}/email/order`, null, { headers: { "Authorization": `Bearer ${apiKey}` } }) .then(response => { console.log(response.data); }) .catch(error => { console.error("Error:", error); }); ``` -------------------------------- ### Get Account Details (cURL) Source: https://anymailfinder.com/email-finder-api/docs/account Use this cURL command to fetch your account details, including remaining credits and your associated email. Ensure you replace 'YOUR_API_KEY' with your actual API key. ```bash curl -X GET "https://api.anymailfinder.com/v5.1/account" \ -H "Authorization: YOUR_API_KEY" ``` -------------------------------- ### 200 OK Response (Without Webhook) Source: https://anymailfinder.com/email-finder-api/docs/find-person-email This is an example of a successful response when the search completes and no webhook is configured. It includes details about the found email and associated person data. ```json { "credits_charged": 1, "email": "john.doe@microsoft.com", "email_status": "valid", "person_company_name": null, "person_full_name": null, "person_job_title": null, "valid_email": "john.doe@microsoft.com" } ``` -------------------------------- ### Order Domain Emails (PHP) Source: https://anymailfinder.com/email-finder-api/docs/domain-email/pay This PHP example demonstrates how to order a file of domain emails using cURL. It shows how to set the Authorization header and the POST request to the API endpoint. ```php ``` -------------------------------- ### Payment Needed Response Example Source: https://anymailfinder.com/email-finder-api/docs/domain-email/pay This JSON structure is returned when an account lacks sufficient credits to complete the request. It suggests purchasing more credits via a provided link. ```json { "error": "upgrade_needed", "message": "Your account does not have enough credits. Purchase more at https://app.anymailfinder.com/purchase." } ``` -------------------------------- ### Download Domain Emails (Node.js fetch) Source: https://anymailfinder.com/email-finder-api/docs/domain-email/download Example using Node.js fetch to download domain emails. Requires the domain and API key to be set, and specifies an output file path. ```javascript const domain = "{domain}"; const apiKey = "YOUR_API_KEY"; const outputFile = "./domain-emails.csv"; fetch(`https://api.anymailfinder.com/v5.1/domain/${domain}/email/download`, { method: 'GET', headers: { 'Authorization': apiKey } }) .then(response => { if (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`); } const fileStream = require('fs').createWriteStream(outputFile); return response.body.pipe(fileStream); }) .catch(error => { console.error('Error downloading file:', error); }); ``` -------------------------------- ### GeoLead Search Creation Response (200 OK) Source: https://anymailfinder.com/email-finder-api/docs/geolead/create Example of a successful response when a GeoLead search is created. It includes details about the search status, created at, credits needed, and identifiers. ```json { "counts": { "failed": 0, "found_unknown": 0, "found_valid": 0, "not_found": 0, "total": 0 }, "created_at": "2025-01-08T13:25:36.457Z", "credits_needed": 0, "file_name": "string", "find_company_emails": true, "find_decision_maker_categories": [ "ceo" ], "id": "string", "latitude": 40.7127753, "longitude": -74.0059728, "paid": false, "query": "restaurants", "radius_km": 2, "result_limit": null, "started_running_at": "2025-09-15T13:50:42.000Z", "status": "queued" } ``` -------------------------------- ### cURL Example for Bulk Email Search Source: https://anymailfinder.com/email-finder-api/docs/bulk/create-file This cURL command demonstrates how to create a bulk email search by uploading a CSV file. Ensure you replace 'YOUR_API_KEY' with your actual API key and 'your-leads-file.csv' with your file path. ```bash curl -X POST "https://api.anymailfinder.com/v5.1/bulk/multipart" \ -H "Authorization: YOUR_API_KEY" \ -H "Content-Type: multipart/form-data" \ -F "file=@your-leads-file.csv" \ -F "domain_field_index=0" \ -F "first_name_field_index=1" \ -F "last_name_field_index=2" \ -F "file_name=tech_ceos" ``` -------------------------------- ### Get Domain Email Count (cURL) Source: https://anymailfinder.com/email-finder-api/docs/domain-email/count Use this cURL command to make a GET request to the Anymail Finder API to retrieve the email count and download cost for a specific domain. Replace {domain} with the target domain and YOUR_API_KEY with your actual API key. ```curl curl -X GET "https://api.anymailfinder.com/v5.1/domain/{domain}/email" \ -H "Authorization: YOUR_API_KEY" ``` -------------------------------- ### Download Domain Emails (Node.js axios) Source: https://anymailfinder.com/email-finder-api/docs/domain-email/download Example using Node.js axios to download domain emails. Requires the domain and API key to be set, and specifies an output file path. ```javascript const domain = "{domain}"; const apiKey = "YOUR_API_KEY"; const outputFile = "./domain-emails.csv"; const axios = require('axios'); const fs = require('fs'); axios({ method: 'get', url: `https://api.anymailfinder.com/v5.1/domain/${domain}/email/download`, headers: { 'Authorization': apiKey }, responseType: 'stream' }) .then(function (response) { response.data.pipe(fs.createWriteStream(outputFile)); }) .catch(error => { console.error('Error downloading file:', error); }); ``` -------------------------------- ### Get Account Details Source: https://anymailfinder.com/email-finder-api/docs/account Retrieves information about your account, including the associated email and the number of credits remaining. ```APIDOC ## GET /v5.1/account ### Description Use this API endpoint to retrieve information about your account, including the associated email and the number of credits remaining. ### Method GET ### Endpoint `https://api.anymailfinder.com/v5.1/account` ### Authentication Include your API key using the `Authorization` header. ### Request Example ``` curl -X GET "https://api.anymailfinder.com/v5.1/account" \ -H "Authorization: YOUR_API_KEY" ``` ### Response #### Success Response (200) The request was successful. The response contains details about your account, including the associated email address and the number of credits remaining. ```json { "credits_left": 8698, "email": "john.doe@microsoft.com" } ``` Property| Type| Description ---|---|--- `credits_left`| integer| The number of credits currently available in your account. `email`| string| The email address associated with your account. #### Error Response (401) The request did not include a valid API key. ```json { "error": "unauthorized", "message": "Missing or invalid API key." } ``` ``` -------------------------------- ### GeoLead Search Request Parameters Source: https://anymailfinder.com/email-finder-api/docs/geolead/create Example of JSON payload for creating a GeoLead search. Includes parameters for company email search, decision maker categories, location, query, and radius. ```json { "file_name": null, "find_company_emails": true, "find_decision_maker_categories": [ "ceo" ], "latitude": 40.7127753, "longitude": -74.0059728, "query": "restaurants", "radius_km": 10, "result_limit": null } ``` -------------------------------- ### Download Domain Emails (PHP) Source: https://anymailfinder.com/email-finder-api/docs/domain-email/download PHP script to download domain emails. It makes a GET request with the Authorization header and saves the response to a CSV file. ```php ``` -------------------------------- ### Bad Request Response Example Source: https://anymailfinder.com/email-finder-api/docs/domain-email/download This JSON structure represents a 'Bad Request' error. It indicates missing or improperly formatted data in the request. Review the 'message' field for specific details. ```json { "error": "bad_request", "message": "..." } ``` -------------------------------- ### GET /v5.1/domain/{domain}/email Source: https://anymailfinder.com/email-finder-api/docs/domain-email/count Retrieves the total number of emails available for a specified domain and the cost in credits to download the entire list. It also provides the status of the download file if ordered. ```APIDOC ## GET /v5.1/domain/{domain}/email ### Description Use this API endpoint to retrieve the number of emails available in the database for a specified domain and the cost to download the entire list. The response includes the total email count, the credits required for download, and the file status. ### Method GET ### Endpoint `https://api.anymailfinder.com/v5.1/domain/**{domain}**/email` ### Parameters #### Path Parameters - **domain** (string) - Required - The domain for which to retrieve email count and cost. #### Request Body This endpoint does not accept a request body. ### Request Example ``` curl -X GET "https://api.anymailfinder.com/v5.1/domain/{domain}/email" \ -H "Authorization: YOUR_API_KEY" ``` ### Response #### Success Response (200 OK) - **credits_required** (integer) - The number of credits required to download all emails for the domain. - **domain** (string) - The requested domain. - **email_count** (integer) - The total number of emails available in the database for this domain. - **status** (string | null) - The status of the requested file. Can be `null` (File not yet ordered), `queued` (File being prepared), or `ready` (File ready to download). #### Response Example ```json { "credits_required": 10689, "domain": "microsoft.com", "email_count": 427551, "status": null } ``` #### Error Response (400 Bad Request) - **error** (string) - Indicates the type of error, e.g., `bad_request`. - **message** (string) - A description of the error. #### Error Response (401 Unauthorized) - **error** (string) - Indicates the type of error, e.g., `unauthorized`. - **message** (string) - A description of the error, typically related to missing or invalid API key. ``` -------------------------------- ### Download Bulk Search Results Source: https://anymailfinder.com/email-finder-api/docs/bulk/download Use this GET endpoint to download the results of a bulk email search. You can specify the download format and other options via query parameters. Authentication is required via the Authorization header. ```APIDOC ## GET /v5.1/bulk/{searchId}/download ### Description Downloads the results of a previously completed Bulk Email Search. Credits are deducted based on the search type and the number of valid emails found. This charge is applied only on the first download. ### Method GET ### Endpoint `https://api.anymailfinder.com/v5.1/bulk/{searchId}/download` ### Parameters #### Path Parameters - **searchId** (string) - Required - The unique identifier of the bulk search. #### Query Parameters - **download_as** (string) - Optional - Specifies the output file format. Available values: `csv` (default), `json_arr`, `json_obj`, `xlsx`. - **format** (string) - Optional - Determines how the output file is formatted. Available values: `default`, `company-one-email-per-line`. - **file_name_column_name** (string) - Optional - If specified, appends a column containing the file name to the downloaded file. - **preview_only** (string) - Optional - When true, downloads a preview version of the results without charging credits. Defaults to false. ### Request Example ```curl curl -X GET "https://api.anymailfinder.com/v5.1/bulk/{searchId}/download?download_as=csv" \ -H "Authorization: YOUR_API_KEY" \ --output "./output.csv" ``` ### Response #### Success Response (200 OK) Bulk Email Search results will be downloaded in the format specified by the `download_as` query parameter (e.g., `csv` or `xlsx`). #### Error Responses - **400 Bad Request**: The request is missing required data or is improperly formatted. - **401 Unauthorized**: The request did not include a valid API key. - **402 Payment Needed**: Your account does not have enough credits to complete this request. - **404 Not Found**: The specified bulk search ID was not found. ``` -------------------------------- ### Retrieve GeoLead Search Info (cURL) Source: https://anymailfinder.com/email-finder-api/docs/geolead/info Use this cURL command to make a GET request to retrieve details about a specific GeoLead search. Ensure you replace `{searchId}` with the actual search ID and `YOUR_API_KEY` with your valid API key. ```bash curl -X GET "https://api.anymailfinder.com/v5.1/geo-lead/{searchId}" \ -H "Authorization: YOUR_API_KEY" ``` -------------------------------- ### Get Bulk Search Info Source: https://anymailfinder.com/email-finder-api/docs/bulk Retrieves the status and progress of an ongoing or completed bulk email search. ```APIDOC ## GET /bulk/search/{search_id}/status ### Description Retrieves the current status and progress of a specific bulk search job. ### Method GET ### Endpoint /bulk/search/{search_id}/status ### Parameters #### Path Parameters - **search_id** (string) - Required - The unique identifier for the bulk search job. ``` -------------------------------- ### Order Domain Emails (Node.js fetch) Source: https://anymailfinder.com/email-finder-api/docs/domain-email/pay This Node.js snippet demonstrates how to order a file of domain emails using the `fetch` API. It includes setting the Authorization header and the correct endpoint. ```javascript const domain = "example.com"; const apiKey = "YOUR_API_KEY"; fetch(`https://api.anymailfinder.com/v5.1/domain/${domain}/email/order`, { method: "POST", headers: { "Authorization": `Bearer ${apiKey}` } }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error("Error:", error)); ``` -------------------------------- ### POST /bulk/create-file Source: https://anymailfinder.com/email-finder-api/docs/bulk/create-file Initiates a bulk search by accepting a multipart/form-data request. The search is processed asynchronously, and results can be monitored via the Bulk Search Detail API or webhook notifications. ```APIDOC ## POST /bulk/create-file ### Description Creates a new bulk search by processing an uploaded file. This operation is asynchronous, meaning the results are not immediately available. You can track the progress and retrieve results later using other API endpoints or by setting up webhook notifications. ### Method POST ### Endpoint /bulk/create-file ### Parameters #### Request Body (multipart/form-data) - **file** (file) - Required - A CSV or Excel file containing your data. The first row is expected to contain headers unless `has_header` is set to false. - **company_name_field_index** (integer) - Optional - The zero-based index of the column containing the company name. - **decision_maker_category** (string[]) - Optional - One or more categories of decision maker to search for. If multiple are provided, they are tried in order. - **domain_field_index** (integer) - Optional - The zero-based index of the column containing the domain. - **email_field_index** (integer) - Optional - The zero-based index of the column containing the emails to validate. - **file_name** (string) - Optional - A label to identify the bulk search. - **first_name_field_index** (integer) - Optional - The zero-based index of the column containing the first name. - **full_name_field_index** (integer) - Optional - The zero-based index of the column containing the full name. - **has_header** (boolean) - Optional - Whether the first row of the file contains headers. Defaults to true. - **last_name_field_index** (integer) - Optional - The zero-based index of the column containing the last name. - **linkedin_url_field_index** (integer) - Optional - The zero-based index of the column containing the LinkedIn URL. - **webhook_url** (string) - Optional - URL to receive a webhook notification when processing completes. ### Response #### Success Response (200 OK) The search has been successfully created and will process asynchronously. - **counts** (object) - Contains counts of processed rows. - **failed** (integer) - Number of rows where the search failed. - **found_unknown** (integer) - Number of rows with risky emails found. - **found_valid** (integer) - Number of rows with valid emails found. - **not_found** (integer) - Number of rows where no email was found. - **total** (integer) - Total number of rows in the search. - **created_at** (string) - The datetime when the search was created. - **credits_needed** (integer) - The maximum credits required to download the results. - **decision_maker_category** (string) - The decision maker categories specified during search creation. - **file_name** (string) - The label provided to identify this search. - **id** (string) - Unique identifier for this bulk search. - **paid** (boolean) - Indicates whether this search was paid for. - **started_running_at** (string) - The datetime when the search started processing. - **status** (string) - The current status of the bulk search (e.g., `queued`, `running`, `completed`, `failed`). ### Request Example ``` --boundary Content-Disposition: form-data; name="file"; filename="your-leads-file.csv" Content-Type: text/csv [CSV file content] --boundary Content-Disposition: form-data; name="decision_maker_category" ["finance", "ceo"] --boundary-- ``` ### Response Example (200 OK) ```json { "counts": { "failed": 0, "found_unknown": 0, "found_valid": 0, "not_found": 0, "total": 0 }, "created_at": "2025-01-08T13:25:36.457Z", "credits_needed": 0, "decision_maker_category": "finance,ceo", "file_name": "tech_ceos", "id": "string", "paid": true, "started_running_at": "2025-01-08T13:25:36.457Z", "status": "queued" } ``` ### Error Handling #### 400 Bad Request The request is missing required data or is improperly formatted. ```json { "error": "bad_request", "message": "..." } ``` #### 401 Unauthorized The request did not include a valid API key. ```json { "error": "unauthorized", "message": "Missing or invalid API key." } ``` ``` -------------------------------- ### Download Domain Emails (Python) Source: https://anymailfinder.com/email-finder-api/docs/domain-email/download Python script to download domain emails. It uses the requests library to make the GET request and saves the response content to a CSV file. ```python import requests domain = "{domain}" apiKey = "YOUR_API_KEY" outputFile = "./domain-emails.csv" url = f"https://api.anymailfinder.com/v5.1/domain/{domain}/email/download" h = { 'Authorization': apiKey } response = requests.get(url, headers=h, stream=True) if response.status_code == 200: with open(outputFile, 'wb') as f: for chunk in response.iter_content(chunk_size=8192): f.write(chunk) else: print(f"Error: {response.status_code}") print(response.json()) ``` -------------------------------- ### GeoLead Search Download Error Responses Source: https://anymailfinder.com/email-finder-api/docs/geolead/download Examples of error responses when downloading GeoLead search results, including bad request, unauthorized, payment needed, and not found scenarios. ```json { "error": "bad_request", "message": "..." } ``` ```json { "error": "unauthorized", "message": "Missing or invalid API key." } ``` ```json { "error": "upgrade_needed", "message": "Your account does not have enough credits. Purchase more at https://app.anymailfinder.com/purchase." } ``` ```json { "error": "not_found", "message": "The requested resource could not be found." } ``` -------------------------------- ### Order Domain Emails (Python) Source: https://anymailfinder.com/email-finder-api/docs/domain-email/pay This Python snippet illustrates how to order a file of domain emails using the `requests` library. It includes setting the Authorization header and the target API endpoint. ```python import requests domain = "example.com" api_key = "YOUR_API_KEY" url = f"https://api.anymailfinder.com/v5.1/domain/{domain}/email/order" headers = { "Authorization": f"Bearer {api_key}" } response = requests.post(url, headers=headers) if response.status_code == 200: print(response.json()) else: print(f"Error: {response.status_code}") print(response.text) ``` -------------------------------- ### Order Domain Emails (cURL) Source: https://anymailfinder.com/email-finder-api/docs/domain-email/pay Use this cURL command to send a POST request to order a file of emails for a given domain. Ensure you replace `{domain}` with the target domain and `YOUR_API_KEY` with your actual API key. ```bash curl -X POST "https://api.anymailfinder.com/v5.1/domain/{domain}/email/order" \ -H "Authorization: YOUR_API_KEY" ``` -------------------------------- ### POST /v5.1/domain/{domain}/email/order Source: https://anymailfinder.com/email-finder-api/docs/domain-email/pay Orders a file containing all available email addresses for a given domain. The request is processed asynchronously, and results can be sent to a webhook URL. Pricing is based on credits, and emails are not verified. ```APIDOC ## POST /v5.1/domain/{domain}/email/order ### Description Use this API endpoint to pay for and download a file containing all available email addresses for a specific domain. The request is processed asynchronously. You can provide a webhook URL to be notified once the file is ready. Note: the emails in this file are not verified and may require validation before use. ### Method POST ### Endpoint `https://api.anymailfinder.com/v5.1/domain/**{domain}**/email/order` ### Parameters #### Path Parameters - **domain** (string) - Required - The domain for which to retrieve the email count and cost. #### Headers - **Authorization** (string) - Required - Include your API key using the `Authorization` header. - **x-webhook-url** (string) - Optional - If provided, the result will be POSTed to this URL instead of waiting for the response. ### Request Example ``` curl -X POST "https://api.anymailfinder.com/v5.1/domain/{domain}/email/order" \ -H "Authorization: YOUR_API_KEY" ``` ### Response #### Success Response (200 OK) The file has been successfully ordered and is now being prepared for download. #### Error Response (400 Bad Request) The request is missing required data or is improperly formatted. Review the `message` field to identify and correct the issue. ```json { "error": "bad_request", "message": "..." } ``` #### Error Response (401 Unauthorized) The request did not include a valid API key. Refer to the Authentication page to ensure your API key is properly included. ```json { "error": "unauthorized", "message": "Missing or invalid API key." } ``` #### Error Response (402 Payment Needed) Your account does not have enough credits to complete this request. You can purchase additional credits to continue. ```json { "error": "upgrade_needed", "message": "Your account does not have enough credits. Purchase more at https://app.anymailfinder.com/purchase." } ``` ``` -------------------------------- ### Download Bulk Search Results (cURL) Source: https://anymailfinder.com/email-finder-api/docs/bulk/download Use this cURL command to download the results of a bulk email search. Ensure you replace YOUR_API_KEY with your actual API key and {searchId} with the correct search identifier. The --output flag specifies the local file path for the downloaded results. ```bash curl -X GET "https://api.anymailfinder.com/v5.1/bulk/{searchId}/download?download_as=csv" \ -H "Authorization: YOUR_API_KEY" \ --output "./output.csv" ``` -------------------------------- ### Create Bulk Search Source: https://anymailfinder.com/email-finder-api/docs/bulk/create-json Initiates a bulk search operation. The search is processed asynchronously. A webhook notification can be sent upon completion, or the status can be checked using the Bulk Search Detail API. ```APIDOC ## POST /bulk/create-json ### Description Creates a new bulk search job. This operation is asynchronous, meaning the search results are not immediately available. You will be notified via webhook if one is configured, or you can poll the status using the Bulk Search Detail API. ### Method POST ### Endpoint /bulk/create-json ### Parameters #### Request Body - **file_name** (string) - Required - The label provided to identify this search. - **decision_maker_category** (string) - Optional - A comma-separated list of decision maker categories to filter by. ### Request Example ```json { "file_name": "my_search_label", "decision_maker_category": "finance,ceo" } ``` ### Response #### Success Response (200 OK) Indicates that the bulk search has been successfully created and queued for processing. - **counts** (object) - Contains counts for different search outcomes (failed, found_unknown, found_valid, not_found, total). - **failed** (integer) - Number of rows where the search failed. - **found_unknown** (integer) - Number of rows with risky emails found. - **found_valid** (integer) - Number of rows with valid emails found. - **not_found** (integer) - Number of rows where no email was found. - **total** (integer) - Total number of rows in the search. - **created_at** (string) - The datetime when the search was created. - **credits_needed** (integer) - The maximum credits required to download the results. Duplicate searches within a month are not charged. - **decision_maker_category** (string) - The decision maker categories specified during search creation. - **file_name** (string) - The label provided to identify this search. - **id** (string) - Unique identifier for this bulk search. - **paid** (boolean) - Indicates whether this search was paid for. - **started_running_at** (string) - The datetime when the search started processing. - **status** (string) - The current status of the bulk search (e.g., `queued`, `running`, `completed`, `failed`). #### Response Example ```json { "counts": { "failed": 0, "found_unknown": 0, "found_valid": 0, "not_found": 0, "total": 0 }, "created_at": "2025-01-08T13:25:36.457Z", "credits_needed": 0, "decision_maker_category": "finance,ceo", "file_name": "string", "id": "string", "paid": true, "started_running_at": "2025-01-08T13:25:36.457Z", "status": "queued" } ``` #### Error Response (400 Bad Request) Indicates that the request is missing required data or is improperly formatted. - **error** (string) - Error code, e.g., `bad_request`. - **message** (string) - A message detailing the specific issue with the request. #### Error Response (401 Unauthorized) Indicates that the request did not include a valid API key. - **error** (string) - Error code, e.g., `unauthorized`. - **message** (string) - A message indicating the issue with the API key. ``` -------------------------------- ### Download GeoLead Search Results (cURL) Source: https://anymailfinder.com/email-finder-api/docs/geolead/download Use this cURL command to download GeoLead search results. Replace `{searchId}` with your search ID and `YOUR_API_KEY` with your actual API key. The `--output` flag specifies the local file path for the downloaded CSV. ```bash curl -X GET "https://api.anymailfinder.com/v5.1/geo-lead/{searchId}/download?download_as=csv" \ -H "Authorization: YOUR_API_KEY" \ --output "./output.csv" ``` -------------------------------- ### POST /v5.1/bulk/multipart Source: https://anymailfinder.com/email-finder-api/docs/bulk/create-file Creates a Bulk Email Search by uploading a file (CSV or Excel). The system determines the type of email search to perform based on the fields you map. ```APIDOC ## POST /v5.1/bulk/multipart ### Description Use this API endpoint to create a Bulk Email Search by uploading a file (CSV or Excel). The system determines the type of email search to perform based on the fields you map. ### Method POST ### Endpoint https://api.anymailfinder.com/v5.1/bulk/multipart ### Authentication Include your API key using the `Authorization` header. ### Parameters #### Request Body - **file** (file) - Required - The CSV or Excel file containing the leads. - **domain_field_index** (integer) - Optional - The index of the column containing the domain name. - **first_name_field_index** (integer) - Optional - The index of the column containing the first name. - **last_name_field_index** (integer) - Optional - The index of the column containing the last name. - **company_name_field_index** (integer) - Optional - The index of the column containing the company name. - **linkedin_url_field_index** (integer) - Optional - The index of the column containing the LinkedIn URL. - **email_field_index** (integer) - Optional - The index of the column containing the email address. - **decision_maker_category** (string) - Optional - Specifies the category for finding Decision Maker Emails. - **file_name** (string) - Optional - A name for the uploaded file. ### Request Example ``` curl -X POST "https://api.anymailfinder.com/v5.1/bulk/multipart" \ -H "Authorization: YOUR_API_KEY" \ -H "Content-Type: multipart/form-data" \ -F "file=@your-leads-file.csv" \ -F "domain_field_index=0" \ -F "first_name_field_index=1" \ -F "last_name_field_index=2" \ -F "file_name=tech_ceos" ``` ### Search Type Determination - **Find Person Email**: Map any one of: person name (`full_name_field_index`, or `first_name_field_index` + `last_name_field_index`) and company (`domain_field_index` or `company_name_field_index`); `linkedin_url_field_index` only; or both LinkedIn URL and name + company. - **Find Decision Maker Email**: Map `domain_field_index` or `company_name_field_index`, and specify `decision_maker_category`. - **Find Company Emails**: Map `domain_field_index` or `company_name_field_index`. - **Verify Email**: Map `email_field_index` only. **Note on Domain vs. Company Name:** `domain_field_index` provides more accurate results. If only a company name is available, use `company_name_field_index` to resolve a domain. If both are provided, `domain_field_index` is prioritized. ``` -------------------------------- ### Account Details Response Source: https://anymailfinder.com/email-finder-api/docs/account A successful response (200 OK) will return a JSON object containing the number of credits left and the account's email address. ```json { "credits_left": 8698, "email": "john.doe@microsoft.com" } ``` -------------------------------- ### Webhook Configuration Source: https://anymailfinder.com/email-finder-api/docs/webhook To enable webhook notifications, include the `x-webhook-url` header in your API requests. This header should contain the URL where you want to receive the asynchronous results. ```APIDOC ## Webhook Usage ### Description Webhooks allow you to receive results asynchronously once an email search or verification is complete. This is useful for long-running requests where you don't want to wait for a synchronous response. ### Method Any HTTP method (GET, POST, etc.) used for the supported endpoints. ### Endpoint Refer to the documentation for the specific endpoint you are using (e.g., Find Person Email, Find Company Emails, etc.). ### Headers - **x-webhook-url** (string) - Required - The publicly accessible URL where the webhook results should be sent. ### Request Example ```http GET /v2/find?domain=example.com&company=ExampleCorp Host: api.anymailfinder.com Content-Type: application/json x-api-key: YOUR_API_KEY x-webhook-url: https://your-callback-url.com/webhook-handler ``` ### Response Webhooks do not directly return a response to the initial request. Instead, the results will be sent to the URL specified in the `x-webhook-url` header once the processing is complete. #### Success Response (from webhook URL) Details will vary based on the specific endpoint called. Refer to the documentation for each endpoint for specific response formats. #### Response Example (from webhook URL) ```json { "email": "john.doe@example.com", "confidence": 0.95, "source": "linkedin", "first_name": "John", "last_name": "Doe", "domain": "example.com", "company": "ExampleCorp" } ``` ``` -------------------------------- ### Bulk Search Info Response (Success) Source: https://anymailfinder.com/email-finder-api/docs/bulk/info A successful response provides details about the bulk search, including its status, counts of found/not found emails, and creation metadata. This data is useful for monitoring search progress. ```json { "counts": { "failed": 0, "found_unknown": 0, "found_valid": 0, "not_found": 0, "total": 0 }, "created_at": "2025-01-08T13:25:36.457Z", "credits_needed": 0, "decision_maker_category": "finance,ceo", "file_name": "string", "id": "string", "paid": true, "started_running_at": "2025-01-08T13:25:36.457Z", "status": "queued" } ``` -------------------------------- ### Create Bulk Email Search with JSON (cURL) Source: https://anymailfinder.com/email-finder-api/docs/bulk/create-json Use this cURL command to create a bulk email search by submitting data in JSON format. Ensure to replace YOUR_API_KEY with your actual API key and adjust the JSON payload as needed. ```bash curl -X POST "https://api.anymailfinder.com/v5.1/bulk/json" \ -H "Authorization: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "data": [ ["domain", "first", "last"], ["microsoft.com", "Bill", "Gates"], ["amazon.com", "Jeff", "Bezos"] ], "domain_field_index": 0, "first_name_field_index": 1, "last_name_field_index": 2, "file_name": "tech_ceos" }' ``` -------------------------------- ### Download Domain Emails (cURL) Source: https://anymailfinder.com/email-finder-api/docs/domain-email/download Use this cURL command to download a purchased list of domain emails. Ensure your API key is included in the Authorization header and specify an output file path. ```bash curl -X GET "https://api.anymailfinder.com/v5.1/domain/{domain}/email/download" \ -H "Authorization: YOUR_API_KEY" \ --output "./domain-emails.csv" ``` -------------------------------- ### Verify Email Address (cURL) Source: https://anymailfinder.com/email-finder-api/docs/verify-email Use this cURL command to send a POST request to the email verification endpoint. Ensure you replace 'YOUR_API_KEY' with your actual API key and 'john.doe@microsoft.com' with the email you want to verify. ```bash curl -X POST "https://api.anymailfinder.com/v5.1/verify-email" \ -H "Content-Type: application/json" \ -H "Authorization: YOUR_API_KEY" \ -d '{"email": "john.doe@microsoft.com"}' ``` -------------------------------- ### 200 OK Response (Without Webhook) Source: https://anymailfinder.com/email-finder-api/docs/find-company-email This JSON object represents a successful API request where the search completes and returns all found emails. It includes the number of credits used, the overall email status, and arrays of all found emails and specifically valid emails. ```json { "credits_charged": 1, "email_status": "valid", "emails": [ "susan.smith@microsoft.com", "john.doe@microsoft.com", "jane.johnson@microsoft.com", "michael.brown@microsoft.com", "linda.white@microsoft.com", "robert.davis@microsoft.com", "karen.martin@microsoft.com", "david.jackson@microsoft.com", "patricia.clark@microsoft.com", "james.robinson@microsoft.com", "elizabeth.moore@microsoft.com", "christopher.wilson@microsoft.com", "mary.taylor@microsoft.com", "daniel.anderson@microsoft.com", "nancy.thomas@microsoft.com", "thomas.thompson@microsoft.com", "laura.hall@microsoft.com", "joshua.wright@microsoft.com", "emily.harris@microsoft.com", "sarah.lewis@microsoft.com" ], "valid_emails": [ "susan.smith@microsoft.com", "john.doe@microsoft.com", "jane.johnson@microsoft.com", "michael.brown@microsoft.com", "linda.white@microsoft.com", "robert.davis@microsoft.com", "karen.martin@microsoft.com", "david.jackson@microsoft.com", "patricia.clark@microsoft.com", "james.robinson@microsoft.com", "elizabeth.moore@microsoft.com", "christopher.wilson@microsoft.com", "mary.taylor@microsoft.com", "daniel.anderson@microsoft.com", "nancy.thomas@microsoft.com", "thomas.thompson@microsoft.com", "laura.hall@microsoft.com", "joshua.wright@microsoft.com", "emily.harris@microsoft.com", "sarah.lewis@microsoft.com" ] } ``` -------------------------------- ### Create GeoLead Search with cURL Source: https://anymailfinder.com/email-finder-api/docs/geolead/create Use this cURL command to send a POST request to create a GeoLead Search. Include your API key in the Authorization header and specify search parameters in the JSON body. ```curl curl -X POST "https://api.anymailfinder.com/v5.1/geo-lead" \ -H "Authorization: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "file_name": "restaurants_in_new_york", "find_company_emails": true, "find_decision_maker_categories": ["ceo"], "latitude": 40.7127753, "longitude": -74.0059728, "query": "restaurants", "radius_km": 1 }' ``` -------------------------------- ### Retrieve Bulk Search Info Source: https://anymailfinder.com/email-finder-api/docs/bulk/info Use this cURL command to fetch details about a specific bulk email search. Replace YOUR_API_KEY and {searchId} with your actual credentials and search identifier. ```bash curl -X GET "https://api.anymailfinder.com/v5.1/bulk/{searchId}" \ -H "Authorization: YOUR_API_KEY" ``` -------------------------------- ### Create Bulk Search Source: https://anymailfinder.com/email-finder-api/docs/bulk Initiates a bulk email search by submitting data (JSON or file upload) and mapping columns. Supports an optional webhook for completion notifications. ```APIDOC ## POST /bulk/search ### Description Initiates a bulk email search by submitting your data and specifying search parameters. ### Method POST ### Endpoint /bulk/search ### Parameters #### Request Body - **data** (JSON or File) - Required - The data to be searched, either as a JSON object or a file (CSV, Excel). - **column_mapping** (JSON) - Required - Specifies how columns in your data map to search types (e.g., Person, Company, Decision-Maker, LinkedIn URL). - **webhook_url** (string) - Optional - A URL to receive a notification when the search is complete. ``` -------------------------------- ### GeoLead Search Info Response (200 OK) Source: https://anymailfinder.com/email-finder-api/docs/geolead/info A successful response (200 OK) provides detailed information about the GeoLead search, including its status, counts of found/not found emails, creation time, and search parameters. This data is useful for monitoring search progress and verifying completion. ```json { "counts": { "failed": 0, "found_unknown": 0, "found_valid": 0, "not_found": 0, "total": 0 }, "created_at": "2025-01-08T13:25:36.457Z", "credits_needed": 0, "file_name": "string", "find_company_emails": true, "find_decision_maker_categories": [ "ceo" ], "id": "string", "latitude": 40.7127753, "longitude": -74.0059728, "paid": false, "query": "restaurants", "radius_km": 2, "result_limit": null, "started_running_at": "2025-09-15T13:50:42.000Z", "status": "completed" } ``` -------------------------------- ### POST /v5.1/bulk/json Source: https://anymailfinder.com/email-finder-api/docs/bulk/create-json Creates a Bulk Email Search by submitting data in JSON format. The system determines the type of email search to perform based on the fields you map. ```APIDOC ## POST /v5.1/bulk/json ### Description Creates a Bulk Email Search by submitting data in JSON format. The system determines the type of email search to perform based on the fields you map. ### Method POST ### Endpoint https://api.anymailfinder.com/v5.1/bulk/json ### Authentication Include your API key using the `Authorization` header. ### Parameters #### Request Body - **data** (array) - Required - A multidimensional array containing rows and columns. The first row is expected to contain headers unless `has_header` is set to false. - **company_name_field_index** (integer) - Optional - The zero-based index of the column containing the company name. - **decision_maker_category** (string[]) - Optional - One or more categories of decision maker to search for. If multiple are provided, they are tried in order: the search returns the first category that resolves to a valid email and does not attempt the rest. - **domain_field_index** (integer) - Optional - The zero-based index of the column containing the domain. - **email_field_index** (integer) - Optional - The zero-based index of the column containing the emails to validate. - **file_name** (string) - Optional - A label to identify the bulk search. - **first_name_field_index** (integer) - Optional - The zero-based index of the column containing the first name. - **full_name_field_index** (integer) - Optional - The zero-based index of the column containing the full name. - **has_header** (boolean) - Optional - Whether the first row of the data array contains headers. Defaults to true. Set to false if the first row is data. - **last_name_field_index** (integer) - Optional - The zero-based index of the column containing the last name. - **linkedin_url_field_index** (integer) - Optional - The zero-based index of the column containing the LinkedIn URL. - **webhook_url** (string) - Optional - URL to receive a webhook notification when processing completes. ### Request Example ```json { "data": [ ["domain", "first", "last"], ["microsoft.com", "Bill", "Gates"], ["amazon.com", "Jeff", "Bezos"] ], "domain_field_index": 0, "first_name_field_index": 1, "last_name_field_index": 2, "file_name": "tech_ceos" } ``` ### Response #### Success Response (200) (Response details not provided in the source text) #### Response Example (Response example not provided in the source text) ```